mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-10-31 02:37:10 +00:00 
			
		
		
		
	Enable understanding of service identifier and provisioning version
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		| @@ -118,13 +118,14 @@ static struct iax2_ie { | ||||
| 	{ IAX_IE_TRANSFERID, "TRANSFER ID", dump_int }, | ||||
| 	{ IAX_IE_RDNIS, "REFERRING DNIS", dump_string }, | ||||
| 	{ IAX_IE_PROVISIONING, "PROVISIONING" }, | ||||
| 	{ IAX_IE_AESPROVISIONING, "AES PROVISIONING" }, | ||||
| 	{ IAX_IE_AESPROVISIONING, "AES PROVISIONG" }, | ||||
| 	{ IAX_IE_DATETIME, "DATE TIME", dump_int }, | ||||
| 	{ IAX_IE_DEVICETYPE, "DEVICE TYPE", dump_string }, | ||||
| 	{ IAX_IE_SERVICEIDENT, "SERVICE IDENT", dump_string }, | ||||
| 	{ IAX_IE_FIRMWAREVER, "FIRMWARE VER", dump_short }, | ||||
| 	{ IAX_IE_FWBLOCKDESC, "FW BLOCK DESC", dump_int }, | ||||
| 	{ IAX_IE_FWBLOCKDATA, "FW BLOCK DATA" }, | ||||
| 	{ IAX_IE_PROVVER, "PROVISIONG VER", dump_int }, | ||||
| }; | ||||
|  | ||||
| const char *iax_ie2str(int ie) | ||||
| @@ -543,6 +544,13 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen) | ||||
| 			ies->fwdata = data + 2; | ||||
| 			ies->fwdatalen = len; | ||||
| 			break; | ||||
| 		case IAX_IE_PROVVER: | ||||
| 			if (len != sizeof(unsigned int)) { | ||||
| 				snprintf(tmp, sizeof(tmp), "Expected provisioning version to be %d bytes long but was %d\n", sizeof(unsigned int), len); | ||||
| 				errorf(tmp); | ||||
| 			} else | ||||
| 				ies->provver = ntohl(*((unsigned int *)(data + 2))); | ||||
| 			break; | ||||
| 		default: | ||||
| 			snprintf(tmp, sizeof(tmp), "Ignoring unknown information element '%s' (%d) of length %d\n", iax_ie2str(ie), ie, len); | ||||
| 			errorf(tmp); | ||||
|   | ||||
| @@ -50,6 +50,7 @@ struct iax_ies { | ||||
| 	unsigned int fwdesc; | ||||
| 	unsigned char *fwdata; | ||||
| 	unsigned char fwdatalen; | ||||
| 	unsigned int provver; | ||||
| }; | ||||
|  | ||||
| #define DIRECTION_INGRESS 1 | ||||
|   | ||||
| @@ -111,6 +111,7 @@ | ||||
| #define IAX_IE_FIRMWAREVER			34		/* Firmware revision -- u16 */ | ||||
| #define IAX_IE_FWBLOCKDESC			35		/* Firmware block description -- u32 */ | ||||
| #define IAX_IE_FWBLOCKDATA			36		/* Firmware block of data -- raw */ | ||||
| #define IAX_IE_PROVVER				37		/* Provisioning Version (u32) */ | ||||
|  | ||||
| #define IAX_AUTH_PLAINTEXT			(1 << 0) | ||||
| #define IAX_AUTH_MD5				(1 << 1) | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user