mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
add arrays to event headers and chanvars
This commit is contained in:
1 parent
b978d39d48
commit
c1c759526d
16 files changed
+889
-252
No files matched your search
@@ -79,6 +79,13 @@ static switch_status_t exec_app(switch_core_session_t *session, const char *app,
|
||||
return status;
|
||||
}
|
||||
|
||||
static void set_var_callback(const char *var, const char *val, void *user_data)
|
||||
{
|
||||
switch_core_session_t *session = (switch_core_session_t *) user_data;
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_channel_add_variable_var_check(channel, var, val, SWITCH_FALSE, SWITCH_STACK_PUSH);
|
||||
}
|
||||
|
||||
static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *caller_profile, switch_xml_t xexten, switch_caller_extension_t **extension)
|
||||
{
|
||||
switch_xml_t xcond, xaction, xexpression;
|
||||
@@ -222,6 +229,11 @@ static int parse_exten(switch_core_session_t *session, switch_caller_profile_t *
|
||||
proceed = 1;
|
||||
}
|
||||
} else {
|
||||
if (field && strchr(expression, '(')) {
|
||||
switch_channel_set_variable(channel, "DP_MATCH", NULL);
|
||||
switch_capture_regex(re, proceed, field_data, ovector, "DP_MATCH", set_var_callback, session);
|
||||
}
|
||||
|
||||
for (xaction = switch_xml_child(xcond, "action"); xaction; xaction = xaction->next) {
|
||||
char *application = (char *) switch_xml_attr_soft(xaction, "application");
|
||||
const char *loop = switch_xml_attr(xaction, "loop");
|
||||
|
||||
Reference in new issue
Block a user