iax: Support the new CALLINGANI2 IE

This was introduced in Asterisk IAX2 in
3072c540bb
This commit is contained in:
Harald Welte 2022-09-11 14:07:02 +02:00
parent f727a1dd3a
commit d313646712
2 changed files with 4 additions and 0 deletions

View File

@ -224,6 +224,7 @@ const TokenDict IAXInfoElement::s_ieData[] = {
{"CALLTOKEN", CALLTOKEN},
{"CAPABILITY2", CAPABILITY2},
{"FORMAT2", FORMAT2},
{"CALLINGANI2", CALLINGANI2},
{0,0}
};
@ -455,6 +456,7 @@ bool IAXIEList::createFromFrame(const IAXFullFrame* frame, bool incoming)
case IAXInfoElement::RR_PKTS:
case IAXInfoElement::RR_DROPPED:
case IAXInfoElement::RR_OOO:
case IAXInfoElement::CALLINGANI2:
if (data[i] != 4) {
i = 0xFFFF;
break;
@ -683,6 +685,7 @@ void IAXIEList::toString(String& dest, const char* indent)
case IAXInfoElement::RR_DROPPED:
case IAXInfoElement::RR_OOO:
case IAXInfoElement::RR_DELAY:
case IAXInfoElement::CALLINGANI2:
dest << (unsigned int)((static_cast<IAXInfoElementNumeric*>(ie))->data());
break;
case IAXInfoElement::TRANSFERID:

View File

@ -158,6 +158,7 @@ public:
CALLTOKEN = 0x36, // BIN
CAPABILITY2 = 0x37, // BIN 1 byte version + array
FORMAT2 = 0x38, // BIN 1 byte version + array
CALLINGANI2 = 0x39, // DW
};
/**