aboutsummaryrefslogtreecommitdiffstats
path: root/channels/iax2-parser.c
diff options
context:
space:
mode:
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);