Commit Graph

189 Commits

Author SHA1 Message Date
Anthony Minessale 365b8c515d finish up merge
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5380 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-16 03:43:13 +00:00
Anthony Minessale 4ca73d77e0 upgrade fax_detect to tone_detect
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5379 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-16 02:25:40 +00:00
Anthony Minessale 8d0a8a0d47 add session_displace api and app
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5366 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-15 01:47:48 +00:00
Anthony Minessale 95f007586f stage 1 of wrecking ball (duck!)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5347 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-13 20:40:06 +00:00
Michael Jerris 50fe6fbac8 merge mod_bridgecall, mod_echo, mod_park, and mod_playback all into mod_dptools. You will need to remove these from your modules.conf and configuration files.
move some applications to use the new module interface macros.


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5342 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-06-13 16:00:14 +00:00
Anthony Minessale a1d4140ce6 add timout to record and time tables to all the channel events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5236 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-31 14:42:23 +00:00
Anthony Minessale b7c985096c fix locking bug
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5183 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-15 02:21:53 +00:00
Michael Jerris 521eac756e create macro to define api command prototypes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5167 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-12 21:36:15 +00:00
Michael Jerris a4ff7e88da adding const qualifiers across the api as appropriate.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5165 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-12 14:48:14 +00:00
Michael Jerris bf6a88e818 warnings cleanup.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5085 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-04 02:09:24 +00:00
Anthony Minessale 1be5b1ff45 general improvements
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5078 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-05-03 16:28:23 +00:00
Anthony Minessale 5a8bb14259 update msg txt
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5039 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-29 03:21:56 +00:00
Anthony Minessale b37345c370 fix potential NULL fiasco
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5020 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-26 15:02:46 +00:00
Anthony Minessale 7e23633ab2 stop ken's whining
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5008 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-24 01:15:27 +00:00
Michael Jerris d6fdf60fd6 add cumulative count of sessions from switch startup. Resolves http://jira.freeswitch.org/browse/FSCORE-18. Updated patch to change data type of session_id to avoid rollover (wouldn't that be nice) and added - 1 to accurately reflect count. Thanks bkw for the patch.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4999 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-22 01:25:02 +00:00
Michael Jerris fabed21ea8 fix msvc build, declaration after statement.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4935 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-15 01:06:29 +00:00
Anthony Minessale f3b1bec5fb update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4933 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-14 01:52:42 +00:00
Anthony Minessale eb2124ae32 refactor to avoid some potential issues with channels that are hungup instantly after being answered
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4926 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-13 22:15:58 +00:00
Brian West 6355091e0b fix warning as error
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4890 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-08 04:41:10 +00:00
Brian West 2bb347ddfd fix segfault thanks bblack
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4889 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-08 03:53:35 +00:00
Anthony Minessale 7c82c7abd7 add some api commands
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4884 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-04-07 20:30:28 +00:00
Anthony Minessale 33efc5eeb5 tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4805 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 14:57:06 +00:00
Anthony Minessale d518bc2119 add group param to shed_api
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4800 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:36:02 +00:00
Anthony Minessale c15d7892c0 indent again
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4799 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:15:25 +00:00
Anthony Minessale debdfb1aab indent
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4798 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:13:31 +00:00
Anthony Minessale 643ca5c4e7 add 'show tasks' and sched_api api commands
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4797 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-30 00:10:33 +00:00
Anthony Minessale 3a54126261 spring cleaning
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4795 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-29 22:31:56 +00:00
Anthony Minessale 8a4406ece2 Addition of scheduler engine and a few applications to use it.
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
2007-03-28 23:37:12 +00:00
Anthony Minessale d4f6fb8e8c update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4632 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-17 19:51:08 +00:00
Anthony Minessale 627f7781c0 add outcall support to nonexistant conferences (needs testing)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4434 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-03-03 01:01:37 +00:00
Anthony Minessale d7a28c73dd thanks _Vile
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4408 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-27 22:53:57 +00:00
Michael Jerris 875f87ab54 fix segfault on incorrect usage of originate api command (jira MODAPP-2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4378 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-23 21:00:20 +00:00
Michael Jerris 9f4ff8814b Breaking change: show command with no arguments now returns the usage syntax instead of the list of all registered interfaces. show api and show application now does not display items with no description set in their interface structs, allowing you to have "hidden" api's and applications, for example to keep an old api name for something for backwards compatibility sake, but you do not want it to show up in the help commands.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4377 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-23 20:32:31 +00:00
Michael Jerris f359f847f7 fix magic emacs and vi formatting comments in the bottom of our source files to use tabs instead of spaces
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4176 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-09 02:36:03 +00:00
Michael Jerris d8f906850b don't print null in show commands return values.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4166 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-02-08 18:10:21 +00:00
Michael Jerris b2016ca6ab fix session_record api interface param handling (from prof_HATE via irc)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4075 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-01-29 08:37:40 +00:00
Anthony Minessale f4267b0c51 add session_record api command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3951 d0543943-73ff-0310-b7d9-9358b9ac24b2
2007-01-12 16:05:49 +00:00
Anthony Minessale 44cc7d5cfe build progress break everything
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3682 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-12-17 01:01:09 +00:00
Michael Jerris 660159dff1 add extra input checking for valid input on some api's and functions.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3583 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-12-08 16:31:58 +00:00
Paul Tinsley a85ec77f99 Fix a few overflow problems
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3471 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-28 20:20:22 +00:00
Paul Tinsley e15479daae Get rid of the hard coded console help output, and add an api version command for fun.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3470 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-28 19:33:54 +00:00
Michael Jerris 44649c70b4 Add magic comments for emacs and vi in source and header files to properly format and display tabs vs. spaces in those editors:
/* For Emacs:
 * Local Variables:
 * mode:c
 * indent-tabs-mode:nil
 * tab-width:4
 * c-basic-offset:4
 * End:
 * For VIM:
 * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
 */


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3462 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-27 22:30:48 +00:00
Anthony Minessale bc3aceaf78 udpdate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3301 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 08:28:16 +00:00
Anthony Minessale 8dc1556b95 fix gremlins in code that worked before then changed it's mind
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3300 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 08:13:01 +00:00
Anthony Minessale 44fc26f7d4 Finalization of speech detect interface and API
This changes the core to have the necessary tools to create
a speech detection interface.

It also changes the code in javascript (mod_spidermonkey)
there are a few api changes in how it handles callbacks

It also adds grammars as a system dir to store asr grammars




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3291 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-09 05:39:04 +00:00
Anthony Minessale 9ab2b1db57 Media Management (Sponsored By Front Logic)
This modification makes it possible to change the media path of session in the switch on-the-fly and from the dialplan.
It adds some API interface calls usable from a remote client such as mod_event_socket or the test console.

1) media [off] <uuid>

   Turns on/off the media on the call described by <uuid>
   The media will be redirected as desiered either into the switch or point to point.

2) hold [off] <uuid>

   Turns on/off endpoint specific hold state on the session described by <uuid>

3) broadcast <uuid> "<path>[ <timer_name>]" or "speak:<tts_engine>|<tts_voice>|<text>[|<timer_name>]" [both]

   A message will be sent to the call described by uuid instructing it to play the file or speak the text indicated.

   If the 'both' option is specified both ends of the call will hear the message otherwise just the uuid specified
   will hear the message.

   During playback when only one side is hearing the message the other end will hear silence.

   If media is not flowing across the switch when the message is broadcasted, the media will be directed to the
   switch for the duration of the call and then returned to it's previous state.


Also the no_media=true option in the dialplan before a bridge makes it possible to place a call while proxying the session
description from one endpoint to the other and establishing an immidiate point-to-point media connection with no media
on the switch.

<action application="set" data="no_media=true"/>
<action application="bridge" data="sofia/mydomain.com/myid@myhost.com"/>


*NOTE* when connecting two outbound legs by using the "originate" api command with an extension that has no_media=true enabled,
the media for the first leg will be engaged with the switch until the second leg has answered and the other session description
is available to establish a point to point connection at which time point-to-point mode will be enabled.

*NOTE* it is reccommended you rebuild FreeSWITCH with "make sure" as there have been some changes to the core.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3245 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-31 21:38:06 +00:00
Michael Jerris 051b623bb0 formatting whitespace changes from knhor branch.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3239 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-31 05:04:47 +00:00
Michael Jerris dfb9845d85 making the world a little less ugly, one commit at a time.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3026 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-10 12:00:22 +00:00
Michael Jerris 3667da49b6 add description and syntax to interface database, add description and syntax headers to events for interface add for api and application interface, add appropriate output to show and help commands.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3003 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 08:35:27 +00:00
Michael Jerris e9af9e02fe make help an api command, still need to add syntax and descriptions to the db so we can output those as well.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3002 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 08:09:57 +00:00
Michael Jerris c822f94125 add syntax to api structures, use them for usage returns, do more checking on valid usage and cleanup some output of api commands.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3001 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 07:11:42 +00:00
Michael Jerris 2b53e80e34 add syntax field to the api interface struct.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3000 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 05:04:34 +00:00
Michael Jerris dd3cd99301 add more usage checking and return usage information on invalid usage of api commands.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2999 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 04:40:15 +00:00
Michael Jerris 0fbdfb60b4 update usage descriptions.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2983 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-05 20:49:09 +00:00
Anthony Minessale 90815616cc small core refactoring use -hp arg to gain high priority mode, add fsctl command USAGE: fsctl [hupall|pause|resume|shutdown]
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2765 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-20 20:25:26 +00:00
Michael Jerris 55c160506c Initialize http variable.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2759 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-19 22:57:25 +00:00
Anthony Minessale 7045c12e3b fix a bunch of stuff you want this version
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2752 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-19 15:33:02 +00:00
Anthony Minessale ccb32b0eb6 add uuid_bridge api call and ivr function Usage: uuid_bridge <uuid> <other_uuid> *should* take 2 existing channels and bridge them
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2748 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-19 02:18:24 +00:00
Anthony Minessale 19446804c7 pull down stack size another 128k, make the sql use mem cache and add session count to the status command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2747 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-18 22:22:25 +00:00
Anthony Minessale cb2da2328a pass cause from originate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2647 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 01:32:04 +00:00
Anthony Minessale 7142a03c9a add uuid to originate
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2591 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-09 04:03:30 +00:00
Anthony Minessale 80722357a6 Mega Changes
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
2006-09-07 03:58:01 +00:00
Michael Jerris d9d51826fb fix assert when running api originate and not passing an extension.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2519 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-05 20:34:17 +00:00
Michael Jerris 657ca535ed fix crash when passing null string to switch_core_session_locate (via killchan with no param)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2479 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-02 07:31:18 +00:00
Anthony Minessale 4f17ab7714 bunch of tweaks to make ivr more fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2350 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-21 19:14:51 +00:00
Anthony Minessale 78d060c6a7 *deep breath*
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
2006-08-17 00:53:09 +00:00
Anthony Minessale c4d890e0a4 Modify XML Dialplan
BTW, forget what I said yesterday RE: the strftime app I was at McDonalds, how can I concentrate there eh? 
see below....


The Definitive Guide To XML Dialplan:

The "dialplan" section of the freeswitch.xml meta document may contain several contexts

<?xml version="1.0"?>
<document type="freeswitch/xml">
  <section name="dialplan" description="Regex/XML Dialplan">
    <!-- the default context is a safe start -->
    <context name="default">

    <!-- one or more extension tags -->

    </context>
    
    <!-- more optional contexts -->
  </section>
</document>

The important thing to remember is that the dialplan is parsed once when the call
hits the dialplan parser in the RING state.  With one pass across the XML the result
will be a complete list of instructions installed into the channel based on
 parsed <action> or <anti-action> tags.

Those accustomed to Asterisk may expect the call to follow the dialplan by executing the 
applications as it parses them allowing data obtained from one action to influence the next action.
This not the case with the exception being the %{api func} {api arg} field type where an pluggable api call from
a module may be executed as the parsing occurs but this is meant to be used to draw realtime info such as
date and time or other quickly accessible information and shold *not* be abused.


The anatomy of an <extension> tag.

Legend: 
Text wrapped in [] indicates optional and is not part of the actual code.
a '|' inside [] indicates mutiple possible values and also is not part of the code.
Text wrapped in {} indicates it's a description of the parameter in place of the param itself.

<extension name="{exten_name}" [continue="[true|false]"]> 

continue=true means even if an extension executes to continue
parsing the next extension too

The {exten_name} above may anything but if it's 
an exact match with the destination number the parser will leap to this extension
to begin the searching that does not mean it will execute the extension.

Searching will either begin at the first extension in the context or at the point
the the parser has jumped to in the case described above.

Each condition is parsed in turn first taking the 'field' param.
The parser will apply the perl regular expression to each 'field' param encountered.

If the expression matches, it will parse each existing <action> tag in turn and add 
the data from the <application> tags to the channels todo list.	

If a matched expression contains any data wrapped in () the variables
$1,$2..$N will be valid and expanded in any of 'data' params from the subsequent action tags.

If the expression does NOT match, it will parse each <anti-action> tag in turn and add 
the data from the <application> tags to the channels todo list.
*NOTE* since there was no match the () feature is not availabe in anti-actions

The 'break' param indicates how to behave in relation to matching:
*) 'on-true'  - stop searching conditions after the first successful match.
*) 'on-false' - stop searching after the first unsuccessful match.
*) 'always'   - stop at this conditon regardless of a match or non-match.
*) 'never'    - continue searching regardless of a match or non-match.

<condition field="[{field name}|${variable name}|%{api func} {api arg}]" expression="{expression}" break="[on-true|on-false|always|never]">
  <action application="{app name}" data="{app arg}"/>
  <anti-action application="{app name}" data="{app arg}"/>
</condition>

  <!-- any number of condition tags may follow where the same rules apply -->
</extension>




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2167 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 20:12:49 +00:00
Anthony Minessale ca98141ed7 enhance the show command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2011 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-20 03:55:07 +00:00
Anthony Minessale 031af56d99 add a count to show
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1992 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-19 19:16:42 +00:00
Anthony Minessale c7a4c4a1dc fix printf args
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1886 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-14 21:16:01 +00:00
Michael Jerris 0d82c97797 Fix win32 Build
Update win32 Setup
add show calls and show channels


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1884 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-14 19:55:55 +00:00
Michael Jerris 76f98bd034 add options to show api command to show applications, codecs, file formats, ect. and cleanup the output format of this command. Thanks jkr888 (Johny Kadarisman) for the contribution.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1630 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-15 06:02:08 +00:00
Anthony Minessale bf6d91c3fd reloadxml
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1509 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-26 17:27:09 +00:00
Michael Jerris 3230f6ef20 code before declaration.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1424 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 18:04:17 +00:00
Anthony Minessale 9eb3de9b9a update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1419 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 16:56:07 +00:00
Anthony Minessale ffedb5163a update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1418 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 16:47:02 +00:00
Anthony Minessale 87152f99ed update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1415 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 16:35:42 +00:00
Anthony Minessale f09491a69b XMLification (wave 4)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1412 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 15:47:54 +00:00
Anthony Minessale 93666f6dd7 XMLification (wave 1)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1401 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 03:23:05 +00:00
Anthony Minessale 51241ad37f update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1355 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 20:19:23 +00:00
Michael Jerris 81c4e9f959 add initial bits of show api command. This still needs some work.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1350 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 16:04:04 +00:00
Michael Jerris c904577269 C++ says we can't use "interface" as a variable name.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1305 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-30 18:24:24 +00:00
Michael Jerris 14fee78470 part 3 of 3 standardizing typedefed types to end in _t.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1300 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 23:43:28 +00:00
Michael Jerris 73a3adac8f part 2 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1294 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 06:05:03 +00:00
Anthony Minessale 35dc32018c add transfer capability and small ways to test it
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1290 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-28 19:46:57 +00:00
Anthony Minessale 1eb4d491a5 causes part 2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1226 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-22 03:05:25 +00:00
Anthony Minessale a680625e0a add load command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1209 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-20 00:58:06 +00:00
Brian West f029d97c64 small update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1081 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-07 03:57:03 +00:00
Anthony Minessale 5c5a0fe70b add mod_commands
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1045 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-04 22:03:59 +00:00