mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-29 14:44:17 +00:00
working towards stability with new functions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2368 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
b2392afa2f
commit
31892070a6
4 files changed
+30
-18
No files matched your search
@@ -1963,6 +1963,7 @@ static switch_status_t audio_bridge_on_ring(switch_core_session_t *session)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CUSTOM RING\n");
|
||||
|
||||
/* put the channel in a passive state so we can loop audio to it */
|
||||
switch_channel_set_state(channel, CS_TRANSMIT);
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
@@ -1999,7 +2000,6 @@ static switch_status_t conference_outcall(conference_obj_t *conference,
|
||||
}
|
||||
|
||||
|
||||
switch_core_session_rwunlock(peer_session);
|
||||
peer_channel = switch_core_session_get_channel(peer_session);
|
||||
assert(peer_channel != NULL);
|
||||
|
||||
|
||||
@@ -1717,7 +1717,6 @@ static void handle_answer(eXosip_event_t *event)
|
||||
uint8_t pre_answer = 0;
|
||||
|
||||
|
||||
|
||||
if ((tech_pvt = get_pvt_by_call_id(event->cid)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "cannot answer nonexistant call [%d]!\n", event->cid);
|
||||
return;
|
||||
@@ -1729,7 +1728,6 @@ static void handle_answer(eXosip_event_t *event)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "one pre-answer is enough for call [%d]!\n", event->cid);
|
||||
return;
|
||||
}
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_PRE_ANSWER);
|
||||
}
|
||||
|
||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
@@ -1743,8 +1741,14 @@ static void handle_answer(eXosip_event_t *event)
|
||||
|
||||
/* Get all of the remote SDP elements... stuff */
|
||||
if ((remote_sdp = eXosip_get_sdp_info(event->response)) == 0) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
/* Exosip is daft, they send the same event for both 180 and 183 WTF!!*/
|
||||
if (!pre_answer) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cant Find SDP?\n");
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
|
||||
} else {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "I am daft, don't mind me.\n");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1767,13 +1771,8 @@ static void handle_answer(eXosip_event_t *event)
|
||||
tech_pvt->did = event->did;
|
||||
tech_pvt->tid = event->tid;
|
||||
|
||||
if (switch_test_flag(tech_pvt, TFLAG_USING_CODEC)) {
|
||||
switch_core_codec_destroy(&tech_pvt->read_codec);
|
||||
switch_core_codec_destroy(&tech_pvt->write_codec);
|
||||
switch_clear_flag_locked(tech_pvt, TFLAG_USING_CODEC);
|
||||
}
|
||||
|
||||
{
|
||||
if (!switch_test_flag(tech_pvt, TFLAG_USING_CODEC)) {
|
||||
|
||||
int rate = atoi(drate);
|
||||
int ms = globals.codec_ms;
|
||||
|
||||
@@ -1842,6 +1841,7 @@ static void handle_answer(eXosip_event_t *event)
|
||||
channel = switch_core_session_get_channel(tech_pvt->session);
|
||||
assert(channel != NULL);
|
||||
if (pre_answer) {
|
||||
switch_set_flag_locked(tech_pvt, TFLAG_PRE_ANSWER);
|
||||
switch_channel_pre_answer(channel);
|
||||
} else {
|
||||
switch_channel_answer(channel);
|
||||
|
||||
@@ -1470,8 +1470,6 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
switch_core_session_rwunlock(peer_session);
|
||||
|
||||
jss = switch_core_session_alloc(peer_session, sizeof(*jss));
|
||||
jss->session = peer_session;
|
||||
jss->flags = 0;
|
||||
|
||||
Reference in new issue
Block a user