]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_sofia] Url encode the sip_to_user before using in 200 ok contact
authorsurendrasignalwire <56929670+surendrasignalwire@users.noreply.github.com>
Fri, 20 Dec 2019 22:06:57 +0000 (03:36 +0530)
committerAndrey Volk <andywolk@gmail.com>
Tue, 16 Mar 2021 17:13:39 +0000 (20:13 +0300)
src/mod/endpoints/mod_sofia/sofia.c

index 7d8b2fe6eb5a264b700eb3c6a0a7b7bcad32c0a1..32ed268b7e39175350452eb28bd18d5e944c77ea 100644 (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);