add presence events to proxy mode

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8724 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-05-29 20:25:58 +00:00
parent 6d463b5d0f
commit 62ef7f4756
2 changed files with 13 additions and 1 deletions

View File

@ -1923,6 +1923,18 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
msg.from = __FILE__;
msg.string_arg = (char *) r_sdp;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Passing SDP to other leg.\n%s\n", r_sdp);
if (switch_test_flag(tech_pvt, TFLAG_SIP_HOLD)) {
if (!switch_stristr("sendonly", r_sdp)) {
switch_clear_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
switch_channel_presence(tech_pvt->channel, "unknown", "unhold");
}
} else if (switch_stristr("sendonly", r_sdp)) {
switch_set_flag_locked(tech_pvt, TFLAG_SIP_HOLD);
switch_channel_presence(tech_pvt->channel, "unknown", "hold");
}
if (switch_core_session_receive_message(other_session, &msg) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Other leg is not available\n");
nua_respond(tech_pvt->nh, 403, "Hangup in progress", TAG_END());

View File

@ -706,7 +706,7 @@ char *sofia_overcome_sip_uri_weakness(switch_core_session_t *session, const char
}
}
}
printf("WTF [%s] %d\n", new_uri, uri_only);
return new_uri;
}