const char *use_to_tag;
char to_tag[13] = "";
char buf[80] = "";
+ char *orig_to_user = NULL;
if (!sip) {
return;
}
}
+ orig_to_user = su_strdup(nua_handle_home(nh), to_user);
+
if (to_user && strchr(to_user, '+')) {
char *h;
if ((proto = (d_user = strdup(to_user)))) {
if (contactstr && (p = strchr(contactstr, '@'))) {
if (strrchr(p, '>')) {
- new_contactstr = switch_mprintf("<sip:%s%s", to_user, p);
+ new_contactstr = switch_mprintf("<sip:%s%s", orig_to_user, p);
} else {
- new_contactstr = switch_mprintf("<sip:%s%s>", to_user, p);
+ new_contactstr = switch_mprintf("<sip:%s%s>", orig_to_user, p);
}
}