Commit Graph

1249 Commits

Author SHA1 Message Date
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
Brian West 41c091e7bd $(HOME) instead of hard coded path.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2164 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 18:48:58 +00:00
Brian West 2210db1fa5 More tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2163 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 18:47:33 +00:00
Brian West 5553ae9d79 Last few saves and changes.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2162 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 18:15:27 +00:00
Brian West 330cc5c58c add 4 more modules to xcode build.
/b


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2161 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 18:14:41 +00:00
Brian West 0f7e47e1ea Fix version info on the newly added libs.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2160 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 17:22:37 +00:00
Brian West 0dd9c31dee Small tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2159 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 17:15:59 +00:00
Brian West 27aa389e30 Adding mod_exosip, osip2, osipparser2 and exosip2 to the xcode project.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2157 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 16:58:37 +00:00
Brian West db56ca4228 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2149 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-26 01:05:31 +00:00
Brian West 82445169af Woops forgot this one.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2148 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 00:47:18 +00:00
Brian West 538dc91b00 Add mod_port audio and portaudio.framework
/b


git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2147 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 00:46:02 +00:00
Brian West 9cad2bb89c Now here is mod_speex and the speex.framework
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2146 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 00:30:21 +00:00
Brian West d1f6cd2bb4 woops forgot this
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2145 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-26 00:00:41 +00:00
Anthony Minessale c48208e578 Add strftime app to the dp_tools
Use in the dialplan like so:

<!-- continue="true" means keep searching even when you have a match -->
<extension name="set-date" continue="true">
  <condition>
    <action application="strftime" data="NOW=%H:%M"/>
  </condition>
</extension>

<extension name="route-date">
  <condition field="$NOW" expression="^0[34].*">
    <action application="playback" data="/tmp/cluecon1.wav"/>
  </condition>
</extension>





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2144 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 23:51:38 +00:00
Brian West ea262c7dbc Final commit then I'm moving to my laptop :P
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2143 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 23:49:31 +00:00
Brian West ae1c2f6b43 More xcode goodness
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2142 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 23:41:20 +00:00
Brian West de61bd37f7 Add iax and mod_iax to xcode project.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2141 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 23:07:56 +00:00
Anthony Minessale da4ae7be4c add metadata functions to sound file api
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2139 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 22:37:52 +00:00
Brian West a4a82896b3 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2138 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-25 22:36:48 +00:00
Brian West 4088de4302 more fixes from a clean env
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2137 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 22:23:15 +00:00
Brian West da06bca21d git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2136 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-25 22:06:20 +00:00
Brian West ed25f48d5d one more small tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2135 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 22:02:56 +00:00
Brian West 23c2a58139 small fix for srtp
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2134 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 22:01:47 +00:00
Brian West fd817605e3 Added ilbc.framework and mod_ilbc to the xcode project.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2133 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 21:59:10 +00:00
Brian West 431c95688d Add mod_gsm and gsm.framework to xcodebuild..
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2132 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 21:49:02 +00:00
Brian West d7f4a45076 Three more modules added to xcode build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2131 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 21:37:34 +00:00
Brian West 2351d1720f Adding a few more things.. coming along great!
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2130 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 21:27:00 +00:00
Brian West d242d794d9 Bloody thing :P
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2129 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 20:57:26 +00:00
Brian West edf1a3bb6d git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2126 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-25 20:27:55 +00:00
Brian West 6334c9c725 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2125 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-25 20:18:17 +00:00
Brian West 7e9fc388aa Add Even more.. muhahah!
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2124 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 20:09:39 +00:00
Brian West 1bddad3bde Adding yet more modules to build process.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2122 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 19:36:33 +00:00
Brian West 4e650558c9 1. Update target names.
2. Add modules to build process.
3. More Clean up.

/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2121 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 18:49:11 +00:00
Brian West 86a80c0891 Few more tweaks ;)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2119 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 18:14:00 +00:00
Brian West 29d9f33f3d Order matters for dependant frameworks :P
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2118 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 17:36:23 +00:00
Brian West 8e69cba2f9 Welcome to the core of Freeswitch running totally under xcode 2.3 no modules are done yet.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2117 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 17:33:59 +00:00
Michael Jerris 301671fd88 update to new libs for msvc build.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2115 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 17:30:28 +00:00
Anthony Minessale da8484382c move unix builds to apr 1.2.7, sqlite 3.3.6 and libsndfile 1.0.16
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2112 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 15:11:15 +00:00
Brian West 52d46039b3 Update apr and sqlite version! ;)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2111 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 15:08:31 +00:00
Brian West 03407d571b Start libfreeswitch process in xcode.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2110 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 15:01:45 +00:00
Anthony Minessale 9727efd842 Change the socket protocol and the sample client to use multiline input
valid input:

-------------------------
<command>[ <args>]

-------------------------
or
-------------------------
<command>[ <args>]
Header1: Val
HeaderN: Val

-------------------------





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2109 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 14:14:07 +00:00
Brian West 7bd149c23a Ok SQLITE is done. The bulk of the core libs are done now.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2105 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 06:24:46 +00:00
Brian West 37651143d9 Adding srtp static lib to xcode project.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2104 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:52:22 +00:00
Brian West 9c236f1548 Update the info in the plists
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2103 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:38:53 +00:00
Brian West 2342c4d30b A little cleanup. Supress warnings on iksemel and apr just because it anoys me.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2102 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:36:32 +00:00
Brian West 847f158d98 Remove appkit ref
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2101 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:33:37 +00:00
Brian West 5e6aff11b6 Add iksemel, dingaling and libspeakup to xcode project.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2100 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:33:06 +00:00
Brian West a703cabc5e Add libresample static lib to the xcode project.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2099 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 05:05:43 +00:00
Brian West 238df2bda8 Adding teletone to xcode Project and aggregate FreeSWITCH build.
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2098 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-25 04:51:44 +00:00
Brian West 525560499c git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2097 d0543943-73ff-0310-b7d9-9358b9ac24b2 2006-07-25 04:45:44 +00:00