MODAPP-376

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15838 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-12-08 00:05:40 +00:00
parent b7f4b4cd2b
commit 450e63c0d1
2 changed files with 12 additions and 4 deletions

View File

@ -3291,6 +3291,10 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
ptime = maxptime; ptime = maxptime;
} }
if (!ptime) {
ptime = 20;
}
for (i = first; i < last && i < tech_pvt->num_codecs; i++) { for (i = first; i < last && i < tech_pvt->num_codecs; i++) {
const switch_codec_implementation_t *imp = tech_pvt->codecs[i]; const switch_codec_implementation_t *imp = tech_pvt->codecs[i];
uint32_t codec_rate = imp->samples_per_second; uint32_t codec_rate = imp->samples_per_second;

View File

@ -1566,6 +1566,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
int local_clobber = 0; int local_clobber = 0;
const char *cancel_key = NULL; const char *cancel_key = NULL;
const char *holding = NULL; const char *holding = NULL;
const char *soft_holding = NULL;
const char *export_vars = NULL; const char *export_vars = NULL;
@ -2638,7 +2639,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
notready: notready:
if (caller_channel) { if (caller_channel) {
const char *soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE); soft_holding = switch_channel_get_variable(caller_channel, SWITCH_SOFT_HOLDING_UUID_VARIABLE);
holding = switch_channel_get_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE); holding = switch_channel_get_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE);
switch_channel_set_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE, NULL); switch_channel_set_variable(caller_channel, SWITCH_HOLDING_UUID_VARIABLE, NULL);
@ -2757,7 +2758,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
switch_core_session_rwunlock(peer_session); switch_core_session_rwunlock(peer_session);
} }
force_reason = SWITCH_CAUSE_ATTENDED_TRANSFER; force_reason = SWITCH_CAUSE_ATTENDED_TRANSFER;
} else { } else if (zstr(soft_holding)) {
if (peer_channel && switch_channel_ready(peer_channel)) { if (peer_channel && switch_channel_ready(peer_channel)) {
switch_core_session_t *holding_session; switch_core_session_t *holding_session;
@ -2845,9 +2846,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
} }
} }
if (oglobals.idx > IDX_NADA) { if (oglobals.idx > IDX_NADA) {
peer_session = originate_status[oglobals.idx].peer_session; if ((peer_session = originate_status[oglobals.idx].peer_session)) {
peer_channel = originate_status[oglobals.idx].peer_channel; peer_channel = switch_core_session_get_channel(originate_status[oglobals.idx].peer_session);
}
} else { } else {
status = SWITCH_STATUS_FALSE; status = SWITCH_STATUS_FALSE;
if (caller_channel && peer_channel) { if (caller_channel && peer_channel) {