update to originate syntax
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6613 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5c94cba800
commit
00265fe623
|
@ -156,7 +156,7 @@ static void write_cdr(const char *path, const char *log_line)
|
|||
static switch_status_t my_on_hangup(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
||||
const char *log_dir = NULL, *accountcode = NULL, *cid_buf = NULL, *a_template_str = NULL, *g_template_str = NULL;
|
||||
char *log_line, *path = NULL;
|
||||
switch_caller_profile_t *caller_profile, *ocp;
|
||||
|
|
|
@ -351,7 +351,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
if ((var_count = switch_separate_string(vars, ',', var_array, (sizeof(var_array) / sizeof(var_array[0]))))) {
|
||||
int x = 0;
|
||||
for (x = 0; x < var_count; x++) {
|
||||
char *inner_var_array[2];
|
||||
char *inner_var_array[2] = { 0 };
|
||||
int inner_var_count;
|
||||
if ((inner_var_count =
|
||||
switch_separate_string(var_array[x], '=', inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||
|
@ -559,26 +559,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
assert(peer_channels[i] != NULL);
|
||||
|
||||
|
||||
if (vdata) {
|
||||
char *var_array[1024] = { 0 };
|
||||
int var_count = 0;
|
||||
if ((var_count = switch_separate_string(vdata, ',', var_array, (sizeof(var_array) / sizeof(var_array[0]))))) {
|
||||
int x = 0;
|
||||
for (x = 0; x < var_count; x++) {
|
||||
char *inner_var_array[2];
|
||||
int inner_var_count;
|
||||
if ((inner_var_count =
|
||||
switch_separate_string(var_array[x], '=',
|
||||
inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||
|
||||
switch_channel_set_variable(peer_channels[i], inner_var_array[0], inner_var_array[1]);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (var_event) {
|
||||
switch_event_t *event;
|
||||
switch_event_header_t *header;
|
||||
|
@ -592,6 +572,24 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||
switch_event_fire(&event);
|
||||
}
|
||||
|
||||
if (vdata) {
|
||||
char *var_array[1024] = { 0 };
|
||||
int var_count = 0;
|
||||
if ((var_count = switch_separate_string(vdata, ',', var_array, (sizeof(var_array) / sizeof(var_array[0]))))) {
|
||||
int x = 0;
|
||||
for (x = 0; x < var_count; x++) {
|
||||
char *inner_var_array[2] = { 0 };
|
||||
int inner_var_count;
|
||||
if ((inner_var_count =
|
||||
switch_separate_string(var_array[x], '=',
|
||||
inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||
|
||||
switch_channel_set_variable(peer_channels[i], inner_var_array[0], inner_var_array[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!table) {
|
||||
table = &originate_state_handlers;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue