mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
FS-5934 force_transfer_context not being honored if you happen to do an attended this patch makes perfect sense.
This commit is contained in:
parent
a0ba6de40d
commit
a048d2b638
@ -1750,6 +1750,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
|
|||||||
if ((profile = switch_channel_get_caller_profile(channel))) {
|
if ((profile = switch_channel_get_caller_profile(channel))) {
|
||||||
const char *var;
|
const char *var;
|
||||||
|
|
||||||
|
if (zstr(dialplan) && (var = switch_channel_get_variable(channel, "force_transfer_dialplan"))) {
|
||||||
|
use_dialplan = var;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (zstr(context) && (var = switch_channel_get_variable(channel, "force_transfer_context"))) {
|
||||||
|
use_context = var;
|
||||||
|
}
|
||||||
|
|
||||||
if (zstr(use_dialplan)) {
|
if (zstr(use_dialplan)) {
|
||||||
use_dialplan = profile->dialplan;
|
use_dialplan = profile->dialplan;
|
||||||
if (!zstr(use_dialplan) && !strcasecmp(use_dialplan, "inline")) {
|
if (!zstr(use_dialplan) && !strcasecmp(use_dialplan, "inline")) {
|
||||||
@ -1773,14 +1781,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
|
|||||||
extension = "service";
|
extension = "service";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (zstr(dialplan) && (var = switch_channel_get_variable(channel, "force_transfer_dialplan"))) {
|
|
||||||
use_dialplan = var;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (zstr(context) && (var = switch_channel_get_variable(channel, "force_transfer_context"))) {
|
|
||||||
use_context = var;
|
|
||||||
}
|
|
||||||
|
|
||||||
new_profile = switch_caller_profile_clone(session, profile);
|
new_profile = switch_caller_profile_clone(session, profile);
|
||||||
|
|
||||||
new_profile->dialplan = switch_core_strdup(new_profile->pool, use_dialplan);
|
new_profile->dialplan = switch_core_strdup(new_profile->pool, use_dialplan);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user