diff options
author | David Vossel <dvossel@digium.com> | 2009-09-03 16:31:54 +0000 |
---|---|---|
committer | David Vossel <dvossel@digium.com> | 2009-09-03 16:31:54 +0000 |
commit | d09f9fd00a08c9e143ea68003ecf87dfe970a8a9 (patch) | |
tree | c83c86ded8f9d5a32fd96c2ee708c8185407971d /channels/iax2-parser.c | |
parent | 6d6ce303cbf2dbcacd4a84f4f6613a66fae56c48 (diff) |
Merge code associated with AST-2009-006
(closes issue #12912)
Reported by: rathaus
Tested by: tilghman, russell, dvossel, dbrooks
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@215955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/iax2-parser.c')
-rw-r--r-- | channels/iax2-parser.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/iax2-parser.c b/channels/iax2-parser.c index f87aa791a..24c3c57bb 100644 --- a/channels/iax2-parser.c +++ b/channels/iax2-parser.c @@ -277,6 +277,7 @@ static struct iax2_ie { { IAX_IE_RR_OOO, "RR_OUTOFORDER", dump_int }, { IAX_IE_VARIABLE, "VARIABLE", dump_string }, { IAX_IE_OSPTOKEN, "OSPTOKEN" }, + { IAX_IE_CALLTOKEN, "CALLTOKEN" }, }; static const struct iax2_ie prov_ies[] = { @@ -533,6 +534,9 @@ void iax_frame_subclass2str(enum iax_frame_subclass subclass, char *str, size_t case IAX_COMMAND_RTKEY: cmd = "RTKEY "; break; + case IAX_COMMAND_CALLTOKEN: + cmd = "CTOKEN "; + break; } ast_copy_string(str, cmd, len); } @@ -1052,6 +1056,12 @@ int iax_parse_ies(struct iax_ies *ies, unsigned char *data, int datalen) errorf(tmp); } break; + case IAX_IE_CALLTOKEN: + if (len) { + ies->calltokendata = (unsigned char *) data + 2; + } + ies->calltoken = 1; + break; default: snprintf(tmp, (int)sizeof(tmp), "Ignoring unknown information element '%s' (%d) of length %d\n", iax_ie2str(ie), ie, len); outputf(tmp); |