Compare commits

...

2 Commits

Author SHA1 Message Date
Matteo 190b3cfbed
Merge 394c0eedad into 96de8fd377 2025-01-16 16:15:59 +00:00
Matteo Brancaleoni 394c0eedad Correcly handle route uri parsing from contact, fixes #1897
When the Path header contains <>, it will get stored along the contact,
but we cannot send as-is into the route_uri params, because is used as
an outbound proxy val (normally in NUTAG_PROXY which expects an uri), so
we are extracting from the <> containing route param the correct uri to
use.
2023-06-28 14:51:58 +02:00
1 changed files with 15 additions and 0 deletions

View File

@ -3057,6 +3057,21 @@ sofia_destination_t *sofia_glue_get_destination(char *data)
*p = '\0';
} while ((--p > route_uri) && *p == ' ');
}
if ((strlen(route_uri) > 1) && (p = strchr(route_uri, '<'))) {
for (;p && *p; p++) {
if (*p == '>' || *p == ';') {
*p = '\0';
break;
}
}
p = route_uri;
if (!(route_uri = strdup(p + 1))) {
goto mem_fail;
}
if (p) {
switch_safe_free(p);
}
}
}
if (!(to = strdup(data))) {