git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8893 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris
2008-07-03 18:50:15 +00:00
parent 11cedd5fcb
commit 1d46f922e2
9 changed files with 290 additions and 80 deletions

View File

@@ -926,7 +926,8 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
char ref_to[128] = "";
if (!strstr(msg->string_arg, "sip:")) {
switch_snprintf(ref_to, sizeof(ref_to), "sip:%s@%s", msg->string_arg, tech_pvt->profile->sipip);
const char *format = strchr(tech_pvt->profile->sipip, ':') ? "sip:%s@[%s]" : "sip:%s@%s";
switch_snprintf(ref_to, sizeof(ref_to), format, msg->string_arg, tech_pvt->profile->sipip);
} else {
switch_set_string(ref_to, msg->string_arg);
}