aboutsummaryrefslogtreecommitdiffstats
path: root/channels/iax2-parser.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-01 22:59:06 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2003-10-01 22:59:06 +0000
commit05be3214f5316c5949170b6cff5d419875348dba (patch)
treeb54d06c4a2a8217cb171edef2bed5931122b50cf /channels/iax2-parser.c
parentbbb4b9588ee52a41e4ee8aba7ede10449c894aff (diff)
Update IAX2 parser for sending caller info
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1599 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/iax2-parser.c')
-rwxr-xr-xchannels/iax2-parser.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c
index 4d9244ba9..5b78a50c4 100755
--- a/channels/iax2-parser.c
+++ b/channels/iax2-parser.c
@@ -119,6 +119,7 @@ static struct iax2_ie {
{ IAX_IE_RDNIS, "REFERRING DNIS", dump_string },
{ IAX_IE_PROVISIONING, "PROVISIONING" },
{ IAX_IE_AESPROVISIONING, "AES PROVISIONING" },
+ { IAX_IE_DATETIME, "DATE TIME", dump_int },
};
const char *iax_ie2str(int ie)
@@ -499,6 +500,13 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen)
} else
ies->transferid = ntohl(*((unsigned int *)(data + 2)));
break;
+ case IAX_IE_DATETIME:
+ if (len != sizeof(unsigned int)) {
+ snprintf(tmp, sizeof(tmp), "Expecting date/time to be %d bytes long but was %d\n", sizeof(unsigned int), len);
+ errorf(tmp);
+ } else
+ ies->datetime = 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);