[Freeswitch-svn] [commit] r7326 - freeswitch/trunk/src/mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Wed Jan 23 13:13:24 EST 2008
Author: anthm
Date: Wed Jan 23 13:13:23 2008
New Revision: 7326
Modified:
freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
Log:
update
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c Wed Jan 23 13:13:23 2008
@@ -326,8 +326,11 @@
nua_bye(tech_pvt->nh, TAG_END());
} else {
if (switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
+ switch_call_cause_t cause = switch_channel_get_cause(channel);
+
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sending CANCEL to %s\n", switch_channel_get_name(channel));
- nua_cancel(tech_pvt->nh, TAG_END());
+ nua_cancel(tech_pvt->nh, TAG_IF(cause == SWITCH_CAUSE_PICKED_OFF,
+ SIPTAG_REASON_STR("SIP;cause=200;text=\"Call completed elsewhere\"")), TAG_END());
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Responding to INVITE with: %d\n", sip_cause);
nua_respond(tech_pvt->nh, sip_cause, NULL, TAG_END());
More information about the Freeswitch-svn
mailing list