mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 09:36:46 +00:00
add import vars to fifo
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12722 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -841,7 +841,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
|
||||
return (!caller_channel || switch_channel_ready(caller_channel)) ? status : SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
static void process_import(switch_core_session_t *session, switch_channel_t *peer_channel)
|
||||
SWITCH_DECLARE(void) switch_process_import(switch_core_session_t *session, switch_channel_t *peer_channel, const char *varname)
|
||||
{
|
||||
const char *import, *val;
|
||||
switch_channel_t *caller_channel;
|
||||
@@ -849,7 +849,7 @@ static void process_import(switch_core_session_t *session, switch_channel_t *pee
|
||||
switch_assert(session && peer_channel);
|
||||
caller_channel = switch_core_session_get_channel(session);
|
||||
|
||||
if ((import = switch_channel_get_variable(caller_channel, "import"))) {
|
||||
if ((import = switch_channel_get_variable(caller_channel, varname))) {
|
||||
char *mydata = switch_core_session_strdup(session, import);
|
||||
int i, argc;
|
||||
char *argv[64] = { 0 };
|
||||
@@ -1956,7 +1956,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
} else {
|
||||
status = SWITCH_STATUS_FALSE;
|
||||
if (caller_channel && peer_channel) {
|
||||
process_import(oglobals.session, peer_channel);
|
||||
switch_process_import(oglobals.session, peer_channel, "import");
|
||||
}
|
||||
peer_channel = NULL;
|
||||
goto done;
|
||||
@@ -2007,7 +2007,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
||||
if (caller_channel) {
|
||||
switch_channel_set_variable(caller_channel, "originate_disposition", "call accepted");
|
||||
if (peer_channel) {
|
||||
process_import(oglobals.session, peer_channel);
|
||||
switch_process_import(oglobals.session, peer_channel, "import");
|
||||
}
|
||||
}
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Originate Resulted in Success: [%s]\n", switch_channel_get_name(peer_channel));
|
||||
|
Reference in New Issue
Block a user