From: Josh Allmann Date: Tue, 3 Jan 2017 21:14:36 +0000 (-0500) Subject: FS-9910 [mod_sofia]: Set SIP reason header for BYE events. X-Git-Tag: v1.8.0~940^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7248a4f3eb0c956e17dc59ab2544e2ed4f0fa689;p=thirdparty%2Ffreeswitch.git FS-9910 [mod_sofia]: Set SIP reason header for BYE events. --- diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 508f5389ea..b184410a89 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -1011,6 +1011,7 @@ void sofia_handle_sip_i_bye(switch_core_session_t *session, int status, char *reason_header = sip_header_as_string(nh->nh_home, (void *) sip->sip_reason); if (!zstr(reason_header)) { + switch_channel_set_variable(channel, "sip_reason", reason_header); switch_channel_set_variable_partner(channel, "sip_reason", reason_header); } } @@ -1627,6 +1628,7 @@ static void our_sofia_event_callback(nua_event_t event, char *reason_header = sip_header_as_string(nh->nh_home, (void *) sip->sip_reason); if (!zstr(reason_header)) { + switch_channel_set_variable(channel, "sip_reason", reason_header); switch_channel_set_variable_partner(channel, "sip_reason", reason_header); } }