Enable understanding of service identifier and provisioning version
authorMark Spencer <markster@digium.com>
Tue, 25 May 2004 04:34:43 +0000 (04:34 +0000)
committerMark Spencer <markster@digium.com>
Tue, 25 May 2004 04:34:43 +0000 (04:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3065 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/iax2-parser.c
channels/iax2-parser.h
channels/iax2.h
contrib/firmware/iax/iaxy.bin

index 07ca8cf..cc15c95 100755 (executable)
@@ -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);
index 0b4ac56..aff6a68 100755 (executable)
@@ -50,6 +50,7 @@ struct iax_ies {
        unsigned int fwdesc;
        unsigned char *fwdata;
        unsigned char fwdatalen;
+       unsigned int provver;
 };
 
 #define DIRECTION_INGRESS 1
index 8997a71..afc4424 100755 (executable)
 #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)
index b17c61b..85d5071 100755 (executable)
Binary files a/contrib/firmware/iax/iaxy.bin and b/contrib/firmware/iax/iaxy.bin differ