From 16ee826e2b8172345aff12ac0c651c46791b5f67 Mon Sep 17 00:00:00 2001 From: surendrasignalwire <56929670+surendrasignalwire@users.noreply.github.com> Date: Sat, 21 Dec 2019 03:36:57 +0530 Subject: [PATCH] [mod_sofia] Url encode the sip_to_user before using in 200 ok contact --- src/mod/endpoints/mod_sofia/sofia.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 7d8b2fe6eb..32ed268b7e 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -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);