]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] [FS-9188] added channel var to suppress auto-answer notify
authorkarl anderson <karl@2600hz.com>
Thu, 2 Apr 2015 23:30:14 +0000 (19:30 -0400)
committerLuis Azedo <luis@2600hz.com>
Fri, 20 May 2016 09:49:40 +0000 (10:49 +0100)
src/mod/endpoints/mod_sofia/sofia.c

index 0312195f0c24a0e764090dc623ce937715352569..f151956bd05b659c916d530892cdbc0d4f679e4d 100644 (file)
@@ -6919,8 +6919,9 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
        if (channel && (status == 180 || status == 183) && switch_channel_direction(channel) == SWITCH_CALL_DIRECTION_OUTBOUND) {
                const char *full_to = NULL;
-               const char *val;
-               if ((val = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(val)) {
+               const char *var;
+               if ((var = switch_channel_get_variable(channel, "sip_auto_answer")) && switch_true(var) &&
+                    !((var = switch_channel_get_variable(channel, "sip_auto_answer_suppress_notify")) && switch_true(var))) {
                        full_to = switch_str_nil(switch_channel_get_variable(channel, "sip_full_to"));
 
                        nua_notify(nh,