From cbca8b348057977affd52c030826a2928f272ec9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 16 Jul 2012 13:53:19 -0500 Subject: [PATCH] FS-4428 --resolve --- src/mod/endpoints/mod_sofia/sofia.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 5004fc8d27..fbd979c4b1 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -5137,7 +5137,11 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status return; } - if (status >= 500 && sip->sip_reason && sip->sip_reason->re_protocol && (!strcasecmp(sip->sip_reason->re_protocol, "Q.850") + if (status > 299) { + switch_channel_set_variable(channel, "sip_hangup_disposition", "recv_refuse"); + } + + if (status >= 500 && sip->sip_reason && sip->sip_reason->re_protocol && (!strcasecmp(sip->sip_reason->re_protocol, "Q.850") || !strcasecmp(sip->sip_reason->re_protocol, "FreeSWITCH") || !strcasecmp(sip->sip_reason->re_protocol, profile->username)) && sip->sip_reason->re_cause) { tech_pvt->q850_cause = atoi(sip->sip_reason->re_cause);