Skinny: send the call state when requested
This solves incorrect display on the phone. BUT: this creates a delta because the SQL value and the value known by the phone. I hope this doesn't break other things. (NB: the original problem here was the unability to do an UPDATE inside a SELECT callback)
This commit is contained in:
parent
924683a73c
commit
d172e9febb
|
@ -355,6 +355,7 @@ void skinny_line_perform_set_state(const char *file, const char *func, int line,
|
|||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Call-Id", "%d", call_id);
|
||||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "Skinny-Call-State", "%d", call_state);
|
||||
switch_event_fire(&event);
|
||||
send_call_state(listener, call_state, line_instance, call_id);
|
||||
switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_DEBUG,
|
||||
"Device %s:%d, Line %d, Call %d Change State to %s (%d)\n",
|
||||
listener->device_name, listener->device_instance, line_instance, call_id,
|
||||
|
@ -1788,7 +1789,6 @@ static void event_handler(switch_event_t *event)
|
|||
))) {
|
||||
skinny_execute_sql(listener->profile, sql, listener->profile->sql_mutex);
|
||||
switch_safe_free(sql);
|
||||
send_call_state(listener, call_state, line_instance, call_id);
|
||||
}
|
||||
switch_safe_free(line_instance_condition);
|
||||
switch_safe_free(call_id_condition);
|
||||
|
|
Loading…
Reference in New Issue