mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-27 13:44:16 +00:00
FS-5265 --resolve
This commit is contained in:
1 parent
cdac39a6e4
commit
52c1d3c76b
3 files changed
+35
-3
No files matched your search
@@ -1467,6 +1467,37 @@ void sofia_glue_pass_sdp(private_object_t *tech_pvt, char *sdp)
|
||||
}
|
||||
}
|
||||
|
||||
char *sofia_glue_get_path_from_contact(char *buf)
|
||||
{
|
||||
char *p, *e, *path = NULL, *contact = NULL;
|
||||
|
||||
if (!buf) return NULL;
|
||||
|
||||
contact = sofia_glue_get_url_from_contact(buf, SWITCH_TRUE);
|
||||
|
||||
if (!contact) return NULL;
|
||||
|
||||
if ((p = strstr(contact, "fs_path="))) {
|
||||
p += 8;
|
||||
|
||||
if (!zstr(p)) {
|
||||
path = strdup(p);
|
||||
}
|
||||
}
|
||||
|
||||
if (!path) return NULL;
|
||||
|
||||
if ((e = strrchr(path, ';'))) {
|
||||
*e = '\0';
|
||||
}
|
||||
|
||||
switch_url_decode(path);
|
||||
|
||||
free(contact);
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup)
|
||||
{
|
||||
char *url = NULL, *e;
|
||||
|
||||
Reference in new issue
Block a user