FS-5265 --resolve
This commit is contained in:
parent
53b4dd3ec2
commit
bce6ad1968
|
@ -1042,6 +1042,7 @@ extern switch_endpoint_interface_t *sofia_endpoint_interface;
|
|||
void sofia_presence_set_chat_hash(private_object_t *tech_pvt, sip_t const *sip);
|
||||
switch_status_t sofia_on_hangup(switch_core_session_t *session);
|
||||
char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup);
|
||||
char *sofia_glue_get_path_from_contact(char *buf);
|
||||
void sofia_presence_set_hash_key(char *hash_key, int32_t len, sip_t const *sip);
|
||||
void sofia_glue_sql_close(sofia_profile_t *profile, time_t prune);
|
||||
int sofia_glue_init_sql(sofia_profile_t *profile);
|
||||
|
|
|
@ -5506,6 +5506,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;
|
||||
|
|
|
@ -2091,6 +2091,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||
char *route_uri = NULL, *o_contact_dup = NULL, *tmp, *to_uri, *dcs = NULL;
|
||||
const char *tp;
|
||||
char *cparams = NULL;
|
||||
char *path = NULL;
|
||||
|
||||
if (zstr(full_to) || zstr(full_from) || zstr(o_contact)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "MISSING DATA TO SEND NOTIFY.\n");
|
||||
|
@ -2101,8 +2102,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||
cparams += 3;
|
||||
}
|
||||
|
||||
|
||||
|
||||
path = sofia_glue_get_path_from_contact((char *) o_contact);
|
||||
|
||||
tmp = (char *)o_contact;
|
||||
o_contact_dup = sofia_glue_get_url_from_contact(tmp, 1);
|
||||
|
@ -2253,7 +2253,7 @@ static void _send_presence_notify(sofia_profile_t *profile,
|
|||
TAG_IF(route_uri, NUTAG_PROXY(route_uri)),
|
||||
TAG_IF(dst->route, SIPTAG_ROUTE_STR(dst->route)),
|
||||
TAG_IF(user_via, SIPTAG_VIA_STR(user_via)),
|
||||
|
||||
TAG_IF(path, SIPTAG_RECORD_ROUTE_STR(path)),
|
||||
|
||||
SIPTAG_FROM_STR(full_to),
|
||||
SIPTAG_TO_STR(full_from),
|
||||
|
|
Loading…
Reference in New Issue