mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-02 19:29:31 +00:00
fix stupidness
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2419 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e262fb87b0
commit
c0849e1a40
@ -723,7 +723,6 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
|
|||||||
set_local_sdp(tech_pvt);
|
set_local_sdp(tech_pvt);
|
||||||
activate_rtp(tech_pvt);
|
activate_rtp(tech_pvt);
|
||||||
if (tech_pvt->nh) {
|
if (tech_pvt->nh) {
|
||||||
tech_pvt->contact = sip_contact_create(tech_pvt->home, URL_STRING_MAKE("sip:1000@208.64.200.40"), NULL);
|
|
||||||
nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
nua_respond(tech_pvt->nh, SIP_200_OK, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Local SDP:\n%s\n", tech_pvt->local_sdp_str);
|
||||||
}
|
}
|
||||||
@ -995,10 +994,12 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
|
|||||||
if (!switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
if (!switch_test_flag(tech_pvt, TFLAG_EARLY_MEDIA)) {
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
|
switch_set_flag_locked(tech_pvt, TFLAG_EARLY_MEDIA);
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Asked to send early media by %s\n", msg->from);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Asked to send early media by %s\n", msg->from);
|
||||||
|
|
||||||
/* Transmit 183 Progress with SDP */
|
/* Transmit 183 Progress with SDP */
|
||||||
tech_choose_port(tech_pvt);
|
tech_choose_port(tech_pvt);
|
||||||
set_local_sdp(tech_pvt);
|
set_local_sdp(tech_pvt);
|
||||||
activate_rtp(tech_pvt);
|
activate_rtp(tech_pvt);
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "183 SDP:\n%s\n", tech_pvt->local_sdp_str);
|
||||||
nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
nua_respond(tech_pvt->nh, SIP_183_SESSION_PROGRESS, SIPTAG_CONTACT(tech_pvt->contact), SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
||||||
//nua_respond(tech_pvt->nh, SIP_200_OK, SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
//nua_respond(tech_pvt->nh, SIP_200_OK, SOATAG_USER_SDP_STR(tech_pvt->local_sdp_str), TAG_END());
|
||||||
}
|
}
|
||||||
@ -1251,6 +1252,9 @@ static void sip_i_state(int status,
|
|||||||
uint8_t match = 0;
|
uint8_t match = 0;
|
||||||
|
|
||||||
|
|
||||||
|
tech_pvt->contact = sip_contact_create(tech_pvt->home, URL_STRING_MAKE("sip:1000@208.64.200.40"), NULL);
|
||||||
|
|
||||||
|
|
||||||
if (tech_pvt->num_codecs) {
|
if (tech_pvt->num_codecs) {
|
||||||
if ((sdp = sdp_session(parser))) {
|
if ((sdp = sdp_session(parser))) {
|
||||||
match = negotiate_sdp(session, sdp);
|
match = negotiate_sdp(session, sdp);
|
||||||
@ -1267,7 +1271,7 @@ static void sip_i_state(int status,
|
|||||||
switch_channel_set_state(channel, CS_INIT);
|
switch_channel_set_state(channel, CS_INIT);
|
||||||
switch_set_flag_locked(tech_pvt, TFLAG_READY);
|
switch_set_flag_locked(tech_pvt, TFLAG_READY);
|
||||||
switch_core_session_thread_launch(session);
|
switch_core_session_thread_launch(session);
|
||||||
//nua_respond(nh, SIP_180_RINGING, TAG_END());
|
//nua_respond(nh, SIP_100_TRYING, SIPTAG_CONTACT(tech_pvt->contact), TAG_END());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1531,9 +1535,14 @@ static void *SWITCH_THREAD_FUNC profile_thread_run(switch_thread_t *thread, void
|
|||||||
event_callback, /* Callback for processing events */
|
event_callback, /* Callback for processing events */
|
||||||
profile, /* Additional data to pass to callback */
|
profile, /* Additional data to pass to callback */
|
||||||
NUTAG_URL(profile->url),
|
NUTAG_URL(profile->url),
|
||||||
|
TAG_END()); /* Last tag should always finish the sequence */
|
||||||
|
|
||||||
|
nua_set_params(profile->nua,
|
||||||
NUTAG_EARLY_MEDIA(1),
|
NUTAG_EARLY_MEDIA(1),
|
||||||
SIPTAG_SUPPORTED_STR("100rel, precondition"),
|
SIPTAG_SUPPORTED_STR("100rel, precondition"),
|
||||||
TAG_END()); /* Last tag should always finish the sequence */
|
NUTAG_AUTOANSWER(0),
|
||||||
|
NUTAG_AUTOALERT(0));
|
||||||
|
|
||||||
|
|
||||||
for (node = profile->aliases; node; node = node->next) {
|
for (node = profile->aliases; node; node = node->next) {
|
||||||
node->nua = nua_create(profile->s_root, /* Event loop */
|
node->nua = nua_create(profile->s_root, /* Event loop */
|
||||||
@ -1542,8 +1551,16 @@ static void *SWITCH_THREAD_FUNC profile_thread_run(switch_thread_t *thread, void
|
|||||||
NUTAG_URL(node->url),
|
NUTAG_URL(node->url),
|
||||||
NUTAG_EARLY_MEDIA(1),
|
NUTAG_EARLY_MEDIA(1),
|
||||||
SIPTAG_SUPPORTED_STR("100rel, precondition"),
|
SIPTAG_SUPPORTED_STR("100rel, precondition"),
|
||||||
|
NUTAG_AUTOANSWER(0),
|
||||||
|
NUTAG_AUTOALERT(0),
|
||||||
TAG_END()); /* Last tag should always finish the sequence */
|
TAG_END()); /* Last tag should always finish the sequence */
|
||||||
|
|
||||||
|
nua_set_params(node->nua,
|
||||||
|
NUTAG_EARLY_MEDIA(1),
|
||||||
|
SIPTAG_SUPPORTED_STR("100rel, precondition"),
|
||||||
|
NUTAG_AUTOANSWER(0),
|
||||||
|
NUTAG_AUTOALERT(0));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
su_root_run(profile->s_root);
|
su_root_run(profile->s_root);
|
||||||
|
@ -1678,7 +1678,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_multi_threaded_bridge(switch_core_ses
|
|||||||
this_audio_thread->running = 2;
|
this_audio_thread->running = 2;
|
||||||
|
|
||||||
|
|
||||||
if (!switch_channel_test_flag(peer_channel, CF_TRANSFER)) {
|
if (!switch_channel_test_flag(peer_channel, CF_TRANSFER) && switch_channel_get_state(peer_channel) < CS_HANGUP) {
|
||||||
switch_core_session_kill_channel(peer_session, SWITCH_SIG_KILL);
|
switch_core_session_kill_channel(peer_session, SWITCH_SIG_KILL);
|
||||||
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
switch_channel_hangup(peer_channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||||
}
|
}
|
||||||
|
@ -547,7 +547,7 @@ SWITCH_DECLARE(void) switch_rtp_kill_socket(switch_rtp_t *rtp_session)
|
|||||||
|
|
||||||
SWITCH_DECLARE(uint8_t) switch_rtp_ready(switch_rtp_t *rtp_session)
|
SWITCH_DECLARE(uint8_t) switch_rtp_ready(switch_rtp_t *rtp_session)
|
||||||
{
|
{
|
||||||
return switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO) ? 1 : 0;
|
return (rtp_session != NULL && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_IO)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
|
SWITCH_DECLARE(void) switch_rtp_destroy(switch_rtp_t **rtp_session)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user