This patch adds a scheduler thread to the core and moves the heartbeat
event to use the new scheduler as an example.
Also The following features are implemented that use this scheduler:
sched_hangup dialplan application:
<action application="sched_hangup" data="+10 normal_clearing bleg"/>
** The cause code is optional and the optional bleg keyword will only hangup the
channel the current channel is bridged to if the call is in a bridge.
sched_transfer dialplan application:
<action application="sched_transfer" data="+10 1000 XML default"/>
** The last 2 args (dialplan and context) are optional
sched_broadcast dialplan application:
<action application="sched_broadcast" data="+10 playback:/tmp/foo.wav"/>
<action application="sched_broadcast" data="+10 playback!normal_clearing:/tmp/foo.wav"/>
** The optional !<cause_code> can be added to make the channel hangup after broadcasting the file.
sched_hangup api function:
sched_hangup +10 <uuid_string> normal_clearing
** The cause code is optional
sched_transfer api function:
sched_transfer +10 <uuid_string> 1000 XML default
** The last 2 args (dialplan and context) are optional
sched_broadcast api function:
sched_broadcast +10 <uuid_str> playback:/tmp/foo.wav
sched_broadcast +10 <uuid_str> playback!normal_clearing:/tmp/foo.wav
** The optional !<cause_code> can be added to make the channel hangup after broadcasting the file.
The new C functions in the core are documented in the doxeygen.
*NOTE* This commit should satisfy at least 2 bounties on the wiki
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4785 d0543943-73ff-0310-b7d9-9358b9ac24b2
originate_retries:
This variable controls how many times the system should retry the
entire dialstring before exiting on failure (default 1)
originate_retry_sleep_ms:
This variable controls how long in milliseconds to pause between
retries (default 1000)
*NOTE* when using the , and & symbols to call sequential or simultaneous channels in conjunction with this feature,
the *entire* dialstring will be repeated as many times as you specify in ${originate_retries}
Here is an example using the bridge application to originate the call. (The feature will also work anywhere else
an origination can be made.)
<extension name="1000">
<condition field="destination_number" expression="^1000$">
<action application="set" data="originate_retries=10"/>
<action application="set" data="originate_retry_sleep_ms=1000"/>
<action application="bridge" data="sofia/$${domain}/1000@somehost.com"/>
</condition>
</extension>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4776 d0543943-73ff-0310-b7d9-9358b9ac24b2
change most char * values in ivr_menu functions to const char *
change switch_core_strdup to get passed const char * instead of char *
change switch_xml_find_child to get passed const char * instead of char *
change the ivr dialplan application to free the xml config as soon as it is done building the xml menu and not hold it until the menu is done being run, so that you can do a reloadxml while someone is in a menu without blocking.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4260 d0543943-73ff-0310-b7d9-9358b9ac24b2
1) This commit adds the ability to override the To: header so you
can place an outbound SIP call to a paticular destination.
For instance, if you have a user registered to your machine as 'gateway' and
you want to call another extension at that machine 'foo' you can now call:
sofia/mydomain.com/gateway:foo@anydomain.com
or if you just want to call some SIP url and put an alternate To:
so you can do forwarding:
sofia/mydomain.com/1000@somwhere.com:12122551234@realdest.com
2) You can add headers to outbound SIP calls by
prefixing the string 'SIP_h_' to any channel variable:
<action application="set" data="SIP_h_X-Answer=42"/>
<action application="bridge" data="sofia/mydomain.com/1000@somehost.com"/>
3) All inbound SIP calls will install any X- headers into local variables
this means in conjunction with item 2, all X- headers will pass across
bridged calls auto-magicly.
4) The switch_ivr_transfer_variable function in switch_ivr.c has been modified so if the last arguement
'var' starts with a ~ it will copy anything that is prefixed with that string rather than an exact match.
*NOTE* you are not required to put an X- prefix in the SIP_h_ vars but
it is reccommended because most SIP devices will ignore any unknown headers that don't.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4216 d0543943-73ff-0310-b7d9-9358b9ac24b2