From d172e9febb6740206d5e9bd4be77c108d4361f37 Mon Sep 17 00:00:00 2001 From: Mathieu Parent Date: Thu, 20 May 2010 17:29:25 +0200 Subject: [PATCH] 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) --- src/mod/endpoints/mod_skinny/mod_skinny.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_skinny/mod_skinny.c b/src/mod/endpoints/mod_skinny/mod_skinny.c index b7a53b9074..9cbdbb4d39 100644 --- a/src/mod/endpoints/mod_skinny/mod_skinny.c +++ b/src/mod/endpoints/mod_skinny/mod_skinny.c @@ -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);