diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-07-20 15:48:55 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-07-20 15:48:55 +0000 |
commit | cb9756daa2042d6e5b91290def004b0f0c9eb168 (patch) | |
tree | 9ea585c25213ade435c83c95a055082f1e291f2a /channels/chan_iax2.c | |
parent | 499a445af213b1cbce99db9219f041ef053fbc18 (diff) |
Add hangupcause translation support
The HANGUPCAUSE hash (trunk only) meant to replace SIP_CAUSE has now
been replaced with the HANGUPCAUSE and HANGUPCAUSE_KEYS dialplan
functions to better facilitate access to the AST_CAUSE translations
for technology-specific cause codes. The HangupCauseClear application
has also been added to remove this data from the channel.
(closes issue SWP-4738)
Review: https://reviewboard.asterisk.org/r/2025/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 199834ddf..8efad88c8 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -5653,7 +5653,7 @@ static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_cha other = (who == c0) ? c1 : c0; /* the 'other' channel */ if ((f->frametype == AST_FRAME_CONTROL)) { if (f->subclass.integer == AST_CONTROL_PVT_CAUSE_CODE) { - ast_channel_hangupcause_hash_set(other, f->data.ptr); + ast_channel_hangupcause_hash_set(other, f->data.ptr, f->datalen); } else if (!(flags & AST_BRIDGE_IGNORE_SIGS) && (f->subclass.integer != AST_CONTROL_SRCUPDATE)) { *fo = f; @@ -10239,6 +10239,7 @@ static int socket_process_helper(struct iax2_thread *thread) cause_code = alloca(data_size); ast_copy_string(cause_code->chan_name, ast_channel_name(iaxs[fr->callno]->owner), AST_CHANNEL_NAME); + cause_code->ast_cause = ies.causecode; snprintf(cause_code->code, data_size - sizeof(*cause_code) + 1, "IAX2 %s(%d)", subclass, ies.causecode); iax2_queue_control_data(fr->callno, AST_CONTROL_PVT_CAUSE_CODE, cause_code, data_size); |