mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-05 12:41:38 +00:00
FSCORE-631
This commit is contained in:
parent
73e6e03d37
commit
54bf657502
@ -2596,6 +2596,22 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
|
|||||||
switch_separate_string(var_array[x], '=',
|
switch_separate_string(var_array[x], '=',
|
||||||
inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
inner_var_array, (sizeof(inner_var_array) / sizeof(inner_var_array[0])))) == 2) {
|
||||||
|
|
||||||
|
/* this is stupid but necessary: if the value begins with ^^ take the very next char as a delim,
|
||||||
|
increment the string to start the next char after that and replace every instance of the delim with a , */
|
||||||
|
|
||||||
|
if (*inner_var_array[1] == '^' && *(inner_var_array[1] + 1) == '^') {
|
||||||
|
char *iv;
|
||||||
|
char d = 0;
|
||||||
|
inner_var_array[1] += 2;
|
||||||
|
d = *inner_var_array[1]++;
|
||||||
|
|
||||||
|
if (d) {
|
||||||
|
for(iv = inner_var_array[1]; iv && *iv; iv++) {
|
||||||
|
if (*iv == d) *iv = ',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "local variable string %d = [%s=%s]\n",
|
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "local variable string %d = [%s=%s]\n",
|
||||||
x, inner_var_array[0], inner_var_array[1]);
|
x, inner_var_array[0], inner_var_array[1]);
|
||||||
switch_event_add_header_string(local_var_event, SWITCH_STACK_BOTTOM, inner_var_array[0], inner_var_array[1]);
|
switch_event_add_header_string(local_var_event, SWITCH_STACK_BOTTOM, inner_var_array[0], inner_var_array[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user