From 65ad502caff990978d3e4a0d6ec85443eb7c110f Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 5 Feb 2021 21:31:17 +0000 Subject: [PATCH] [mod_verto] add verto_skip_set_user var to skip set_user in mod_verto --- src/mod/endpoints/mod_verto/mod_verto.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index f387e6ee8d..a8572f7a76 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -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) {