Skinny: hangup and hold calls in PROCEED state

as those CONNECTED
This commit is contained in:
Mathieu Parent 2010-07-20 22:42:04 +02:00
parent b079eee5fb
commit 5e07bd336c
2 changed files with 4 additions and 4 deletions

View File

@ -756,7 +756,7 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
skinny_profile_find_listener_by_device_name_and_instance(helper->tech_pvt->profile, device_name, device_instance, &listener);
if(listener) {
if(call_state == SKINNY_CONNECTED) {
if((call_state == SKINNY_PROCEED) || (call_state == SKINNY_CONNECTED)) { /* calling parties */
send_stop_tone(listener, line_instance, call_id);
}
send_set_lamp(listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_OFF);
@ -776,7 +776,7 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
default:
send_display_prompt_status(listener, 0, switch_channel_cause2str(helper->cause), line_instance, call_id);
}
if(call_state == SKINNY_CONNECTED) { /* calling parties */
if((call_state == SKINNY_PROCEED) || (call_state == SKINNY_CONNECTED)) { /* calling parties */
skinny_session_stop_media(helper->tech_pvt->session, listener, line_instance);
}

View File

@ -898,8 +898,8 @@ switch_status_t skinny_hold_active_calls(listener_t *listener)
"ON skinny_active_lines.device_name = skinny_lines.device_name "
"AND skinny_active_lines.device_instance = skinny_lines.device_instance "
"AND skinny_active_lines.line_instance = skinny_lines.line_instance "
"WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d AND call_state=%d",
listener->device_name, listener->device_instance, SKINNY_CONNECTED))) {
"WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d AND (call_state=%d OR call_state=%d)",
listener->device_name, listener->device_instance, SKINNY_PROCEED, SKINNY_CONNECTED))) {
skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_hold_active_calls_callback, &helper);
switch_safe_free(sql);
}