From: Chris Rienzo Date: Thu, 30 Jan 2014 19:42:31 +0000 (-0500) Subject: mod_rayo: added platform-code to end reason X-Git-Tag: v1.5.8~25^2~259 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bda098a3a576363c8866c0142b01a4e4203a7b76;p=thirdparty%2Ffreeswitch.git mod_rayo: added platform-code to end reason --- diff --git a/src/mod/event_handlers/mod_rayo/mod_rayo.c b/src/mod/event_handlers/mod_rayo/mod_rayo.c index 201ba267cd..b268ab6561 100644 --- a/src/mod/event_handlers/mod_rayo/mod_rayo.c +++ b/src/mod/event_handlers/mod_rayo/mod_rayo.c @@ -993,12 +993,17 @@ static void rayo_call_cleanup(struct rayo_actor *actor) iks_insert(end, RAYO_END_REASON_HANGUP_LOCAL); } else { /* remote hangup... translate to specific rayo reason */ + iks *reason; switch_call_cause_t cause = SWITCH_CAUSE_NONE; char *cause_str = switch_event_get_header(event, "variable_hangup_cause"); + char *cause_q850_str = switch_event_get_header(event, "variable_hangup_cause_q850"); if (cause_str) { cause = switch_channel_str2cause(cause_str); } - iks_insert(end, switch_cause_to_rayo_cause(cause)); + reason = iks_insert(end, switch_cause_to_rayo_cause(cause)); + if (!zstr(cause_q850_str)) { + iks_insert_attrib(reason, "platform-code", cause_q850_str); + } } #if 0