mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 15:14:17 +00:00
Modifying the behaviour of the dialplan engine
the 'data' field in action tags may now refer to variables and api functions
to be expanded at runtime.
Syntax:
$varname
${varname}
&func_name(func args)
Exception:
variables that are numeric are still expanded at dialplan compile time based on the regex eg $1 $2 etc
Example:
<extension name="1000">
<condition field="destination_number" expression="^(1000)$">
<action appplication="my_route_app" data="$1"/>
<action appplication="bridge" data="$destination"/>
</condition>
</extension>
Here the $1 is ecaluated before the call begins setting it to 1000 based on the regex ^(1000)$
$destination is evaluated on the fly in execution once the my_route_app has run and has had a
chance to set the variable 'destination' to the correct value.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2994 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
4ede7f7593
commit
741b8329b9
6 files changed
+150
-8
No files matched your search
+1
-1
@@ -223,7 +223,7 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel_t channel, char *file
|
||||
}
|
||||
} else {
|
||||
if (level == SWITCH_LOG_CONSOLE || !LOG_QUEUE || !THREAD_RUNNING) {
|
||||
fprintf(handle, data);
|
||||
fprintf(handle, "%s", data);
|
||||
free(data);
|
||||
} else if (level <= MAX_LEVEL) {
|
||||
switch_log_node_t *node;
|
||||
|
||||
Reference in new issue
Block a user