From: Anthony Minessale Date: Thu, 15 Mar 2007 18:46:16 +0000 (+0000) Subject: blind guess on 3pcc support X-Git-Tag: v1.0-beta1~813 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31a71a49b0c010bc955f91f77b98d4e3ed59e545;p=thirdparty%2Ffreeswitch.git blind guess on 3pcc support git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4607 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 71d5ad3533..ff0ec639f9 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2969,6 +2969,7 @@ static void sip_i_state(int status, nua_ack(nh, TAG_END()); break; case nua_callstate_received: + if (session && switch_core_session_running(session)) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Re-Entering Call State Received!\n"); goto done; @@ -3039,6 +3040,19 @@ static void sip_i_state(int status, nua_respond(nh, SIP_488_NOT_ACCEPTABLE, TAG_END()); } + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "3PCC Invite\n"); + switch_channel_set_variable(channel, SWITCH_ENDPOINT_DISPOSITION_VARIABLE, "RECEIVED_3PCC"); + set_local_sdp(tech_pvt, NULL, 0, NULL, 0); + + nua_respond(tech_pvt->nh, SIP_200_OK, + SIPTAG_CONTACT_STR(tech_pvt->profile->url), + SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), + SOATAG_AUDIO_AUX("cn telephone-event"), + NUTAG_INCLUDE_EXTRA_SDP(1), + TAG_END()); + + goto done; } }