diff options
author | Kinsey Moore <kmoore@digium.com> | 2012-07-06 22:03:44 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2012-07-06 22:03:44 +0000 |
commit | db59a3f12399fad704fb8977ab980f372c073068 (patch) | |
tree | d49fc35070b46d5eb377d69bbba7e60a8e1027dd /channels/chan_dahdi.c | |
parent | 49aa47171b03dd0425d7afa200e12870c1beddae (diff) |
Remove unnecessary generation of informational cause frames
It is not necessary to generate information cause code frames on every
protocol event that occurs. This removes all the instances where the
frame was not conveying a cause code and was instead just conveying a
protocol-specific message. This also corrects the generation of the
message associated with disconnects for MFC/R2 to use the MFC/R2
specific text for the disconnect cause.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 2e2770fc5..59841d1bd 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -4151,7 +4151,7 @@ static int dahdi_r2_cause_to_ast_cause(openr2_call_disconnect_cause_t cause) static void dahdi_r2_on_call_disconnect(openr2_chan_t *r2chan, openr2_call_disconnect_cause_t cause) { struct dahdi_pvt *p = openr2_chan_get_client_data(r2chan); - char cause_str[20]; + char cause_str[50]; struct ast_control_pvt_cause_code *cause_code; int datalen = sizeof(*cause_code); @@ -4164,7 +4164,7 @@ static void dahdi_r2_on_call_disconnect(openr2_chan_t *r2chan, openr2_call_disco return; } - snprintf(cause_str, sizeof(cause_str), "R2 DISCONNECT (%d)", dahdi_r2_cause_to_ast_cause(cause)); + snprintf(cause_str, sizeof(cause_str), "R2 DISCONNECT (%s)", openr2_proto_get_disconnect_string(cause)); datalen += strlen(cause_str); cause_code = alloca(datalen); ast_copy_string(cause_code->chan_name, ast_channel_name(p->owner), AST_CHANNEL_NAME); |