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
adding mod_park for putting channels in limbo state for remote control.
adding stuff to mod_event_socket to let you do the bgapi <command> <args>
this will let you execute a job in the bg and the result will be sent as an event with an
indicated uuid to match the reply to the command
adding switch_core_port_allocator (to be used soon)
adding "make sure" to do a full rebild of the freeswitch object files
There will be more to this committed as the week progresses
make sure you do a rebuild after this update or you'll be sowwie
./configure && make sure
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2540 d0543943-73ff-0310-b7d9-9358b9ac24b2
Ok,
This one adds a bunch of stuff on top of the framework restructuring from yesterday.
1) originate api function:
Usage: originate <call url> <exten> [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
This will call the specified url then transfer the call to the specified extension
example: originate exosip/1000@somehost 1000 XML default
2) mutiple destinations in outbound calls:
This means any dialstring may contain an '&' separated list of call urls
When using mutiple urls in this manner it is possible to map a certian key as required
indication of an accepted call. You may also supply a filename to play possibly instructing the
call recipiant to press the desired key etc...
The example below will call 2 locations playing prompt.wav to any who answer and
completing the call to the first offhook recipiant to dial "4"
<extension name="3002">
<condition field="destination_number" expression="^3002$">
<action application="set" data="call_timeout=60"/>
<action application="set" data="group_confirm_file=/path/to/prompt.wav"/>
<action application="set" data="group_confirm_key=4"/>
<action application="bridge" data="iax/guest@somebox/1234&exosip/1000@somehost"/>
</condition>
</extension>
The following is the equivilant but the confirm data is passed vial the bridge parameters
(This is for situations where there is no originating channel to set variables to)
<extension name="3002">
<condition field="destination_number" expression="^3002$">
<action application="bridge" data=/path/to/prompt.wav:4"confirm=iax/guest@somebox/1234&exosip/1000@somehost"/>
</condition>
</extension>
Omitting the file and key stuff will simply comeplete the call to whoever answers first.
(this is similar to how other less fortunate software handles the situation with thier best effort.)
This logic should be permitted in anything that establishes an outgoing call with
switch_ivr_originate()
Yes! That means even in this new originate api command you can call mutiple targets and send
whoever answers first to an extension that calls more mutiple targets. (better test it though!)
Oh, and you should be able to do the same in the mod_conference dial and dynamic conference features
please report any behaviour contrary to this account to me ASAP cos i would not be terribly
suprised if I forgot some scenerio that causes an explosion I did all this in 1 afternoon so it probably needs tuning still.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2311 d0543943-73ff-0310-b7d9-9358b9ac24b2
To Test:
uncomment or add from modules.conf
make installall again to compile it
uncomment the load line from freeswitch.xml
the default values are to bind to 127.0.0.1 port 8021
telnet to port 8021
enter "auth ClueCon" to authenticate
from here you can do the following:
*) events [xml|plain] <list of events to log or all for all>
*) noevents
*) log <level> // same as the console.conf values
*) nolog
*) api <command> <arg>
*) exit
there is a perl client in scripts/socket called fs.pl
with the module up and loaded:
cd scripts/socket
perl fs.pl <optional log level>
you can enter a few api commands like "show or status"
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2047 d0543943-73ff-0310-b7d9-9358b9ac24b2
*) Rename *event_handler* to state_handler to avoid confusion with newer eventing engine.
*) Allow application level of state_handler to be layered/stacked (up to 30)
*) Add new core global state_handler stack (also up to 30.. seems reasonable, constant in switch_types.h)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@554 d0543943-73ff-0310-b7d9-9358b9ac24b2