[mod_sofia] Url encode the sip_to_user before using in 200 ok contact

This commit is contained in:
surendrasignalwire authored and Andrey Volk committed 2021-03-16 20:13:39 +03:00
1 parent e8fa2d37b2
commit 16ee826e2b
1 file changed
+3 -2
+3 -2
View File
@@ -10891,9 +10891,10 @@ void sofia_handle_sip_i_invite(switch_core_session_t *session, nua_t *nua, sofia
if (switch_channel_get_variable(channel, "sip_to_uri")) {
const char *ipv6;
const char *tmp, *at, *url = NULL;
const char *tmp_user = switch_channel_get_variable(channel, "sip_to_user");
user = switch_core_session_url_encode(session, tmp_user);
host = switch_channel_get_variable(channel, "sip_to_host");
user = switch_channel_get_variable(channel, "sip_to_user");
switch_channel_set_variable(channel, "sip_to_comment", sip->sip_to->a_comment);