mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-03 06:06:09 +00:00
FS-4620 --resolve expose to dl_to_user and dl_to_host as chan vars
This commit is contained in:
parent
ce3b875383
commit
a9c0a46141
@ -4238,6 +4238,22 @@ static ldl_status handle_signalling(ldl_handle_t *handle, ldl_session_t *dlsessi
|
|||||||
}
|
}
|
||||||
|
|
||||||
tech_pvt->them = switch_core_session_strdup(session, ldl_session_get_callee(dlsession));
|
tech_pvt->them = switch_core_session_strdup(session, ldl_session_get_callee(dlsession));
|
||||||
|
|
||||||
|
if (tech_pvt->them && (tmp = strdup(tech_pvt->them))) {
|
||||||
|
char *p, *q;
|
||||||
|
|
||||||
|
if ((p = strchr(tmp, '@'))) {
|
||||||
|
*p++ = '\0';
|
||||||
|
if ((q = strchr(p, '/'))) {
|
||||||
|
*q = '\0';
|
||||||
|
}
|
||||||
|
switch_channel_set_variable(channel, "dl_to_user", tmp);
|
||||||
|
switch_channel_set_variable(channel, "dl_to_host", p);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch_safe_free(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
tech_pvt->us = switch_core_session_strdup(session, ldl_session_get_caller(dlsession));
|
tech_pvt->us = switch_core_session_strdup(session, ldl_session_get_caller(dlsession));
|
||||||
|
|
||||||
if (tech_pvt->us && (tmp = strdup(tech_pvt->us))) {
|
if (tech_pvt->us && (tmp = strdup(tech_pvt->us))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user