git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7871 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-03-12 00:30:52 +00:00
parent 2afd0fed8f
commit 5fae364cfd
3 changed files with 16 additions and 3 deletions
@@ -205,10 +205,15 @@ SWITCH_STANDARD_APP(transfer_function)
int argc;
char *argv[4] = { 0 };
char *mydata;
int bleg = 0, both = 0;
if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
if ((argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) >= 1) {
if (!strcasecmp(argv[0], "-bleg")) {
bleg = !strcasecmp(argv[0], "-bleg");
both = !strcasecmp(argv[0], "-both");
if (bleg || both) {
const char *uuid;
switch_channel_t *channel = switch_core_session_get_channel(session);
if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
@@ -218,6 +223,9 @@ SWITCH_STANDARD_APP(transfer_function)
switch_core_session_rwunlock(b_session);
}
}
if (both) {
switch_ivr_session_transfer(session, argv[1], argv[2], argv[3]);
}
} else {
switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
}