]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: send the call state when requested
authorMathieu Parent <math.parent@gmail.com>
Thu, 20 May 2010 15:29:25 +0000 (17:29 +0200)
committerMathieu Parent <math.parent@gmail.com>
Thu, 20 May 2010 15:29:25 +0000 (17:29 +0200)
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

index b7a53b9074f0f5e1e4c25160e49eec4f6f0927a7..9cbdbb4d39ed28b560270dbdd496742411033444 100644 (file)
@@ -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);