mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
let sip calls pass the exact response status across a bridge
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8237 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -222,7 +222,14 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_call_cause_t cause = switch_channel_get_cause(channel);
|
||||
int sip_cause = hangup_cause_to_sip(cause);
|
||||
|
||||
const char *ps_cause = switch_channel_get_variable(channel, SWITCH_PROTO_SPECIFIC_HANGUP_CAUSE_VARIABLE);
|
||||
|
||||
if (!switch_strlen_zero(ps_cause) && !strncasecmp(ps_cause, "sip:", 4)) {
|
||||
int new_cause = atoi(ps_cause + 4);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Overriding SIP cause %d with %d from the other leg\n",
|
||||
switch_channel_get_name(channel), sip_cause, new_cause);
|
||||
sip_cause = new_cause;
|
||||
}
|
||||
|
||||
if (switch_test_flag(tech_pvt, TFLAG_SIP_HOLD) && cause != SWITCH_CAUSE_ATTENDED_TRANSFER) {
|
||||
const char *buuid;
|
||||
|
Reference in New Issue
Block a user