]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_verto] add verto_skip_set_user var to skip set_user in mod_verto
authorMichael Jerris <mike@signalwire.com>
Fri, 5 Feb 2021 21:31:17 +0000 (21:31 +0000)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 19:01:04 +0000 (22:01 +0300)
src/mod/endpoints/mod_verto/mod_verto.c

index f387e6ee8d3ffb1cb579e92d2159db994d2b0404..a8572f7a7610b91a9f7aed04dcd3cc79137c9081 100644 (file)
@@ -2930,7 +2930,9 @@ static switch_bool_t verto__answer_func(const char *method, cJSON *params, jsock
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Remote SDP %s:\n%s\n", switch_channel_get_name(tech_pvt->channel), sdp);
                switch_core_media_set_sdp_codec_string(session, sdp, SDP_TYPE_RESPONSE);
 
-               switch_ivr_set_user(session, jsock->uid);
+               if (!switch_channel_var_true(switch_core_session_get_channel(session),"verto_skip_set_user")) {
+                       switch_ivr_set_user(session, jsock->uid);
+               }
 
                if (switch_core_session_get_partner(tech_pvt->session, &other_session) == SWITCH_STATUS_SUCCESS) {
                        switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
@@ -4125,7 +4127,9 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
 
        }
 
-       switch_ivr_set_user(session, jsock->uid);
+       if (!switch_channel_var_true(channel,"verto_skip_set_user")) {
+               switch_ivr_set_user(session, jsock->uid);
+       }
 
        switch_mutex_lock(jsock->flag_mutex);
        for (hp = jsock->user_vars->headers; hp; hp = hp->next) {