From d9bbf12963f219718f16f340d7cae6912083da42 Mon Sep 17 00:00:00 2001 From: Jeff Lenk Date: Fri, 8 Jul 2011 22:48:11 -0500 Subject: [PATCH] FS-3304 --resolve attended transfers, it fails to parse the Replaces when encoded --- src/mod/endpoints/mod_sofia/sofia.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia.c b/src/mod/endpoints/mod_sofia/sofia.c index 41cd10872b..ddb7f6dc31 100644 --- a/src/mod/endpoints/mod_sofia/sofia.c +++ b/src/mod/endpoints/mod_sofia/sofia.c @@ -6033,12 +6033,11 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t rep = switch_core_session_strdup(session, rep + 9); - if ((p = strchr(rep, ';'))) { - *p = '\0'; - } - if ((buf = switch_core_session_alloc(session, strlen(rep) + 1))) { rep = url_unescape(buf, (const char *) rep); + if ((p = strchr(rep, ';'))) { + *p = '\0'; + } switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Replaces: [%s]\n", rep); } else { switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Memory Error!\n");