MODAPP-395
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16864 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
ad4eb5e019
commit
b8e1221e00
|
@ -5136,7 +5136,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
|
|||
sofia_clear_flag_locked(b_tech_pvt, TFLAG_SIP_HOLD);
|
||||
switch_channel_clear_flag(channel_b, CF_LEG_HOLDING);
|
||||
sofia_clear_flag_locked(tech_pvt, TFLAG_HOLD_LOCK);
|
||||
switch_channel_set_variable(channel_b, "park_timeout", "2");
|
||||
switch_channel_set_variable(channel_b, "park_timeout", "2:attended_transfer");
|
||||
switch_channel_set_state(channel_b, CS_PARK);
|
||||
|
||||
} else {
|
||||
|
|
|
@ -689,6 +689,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
|||
int timeout = 0;
|
||||
time_t expires = 0;
|
||||
switch_codec_implementation_t read_impl = { 0 };
|
||||
switch_call_cause_t timeout_cause = SWITCH_CAUSE_NORMAL_CLEARING;
|
||||
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_CONTROLLED)) {
|
||||
|
@ -701,6 +702,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
|||
}
|
||||
|
||||
if ((to = switch_channel_get_variable(channel, "park_timeout"))) {
|
||||
char *cause_str;
|
||||
|
||||
if ((cause_str = strstr(to, ':'))) {
|
||||
timeout_cause = switch_channel_str2cause(cause_str + 1);
|
||||
}
|
||||
|
||||
if ((timeout = atoi(to)) < 0) {
|
||||
timeout = 0;
|
||||
} else {
|
||||
|
@ -737,7 +744,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_park(switch_core_session_t *session,
|
|||
break;
|
||||
} else {
|
||||
if (expires && switch_epoch_time_now(NULL) >= expires) {
|
||||
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
|
||||
switch_channel_hangup(channel, timeout_cause);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue