- 26 7月, 2006 13 次提交
-
-
由 Anthony Minessale 提交于
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
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2164 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2163 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2162 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2161 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2160 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2159 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2157 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
http://svn.freeswitch.org/svn/freeswitch/trunk@2149…由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2149 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2148 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2147 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2146 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2145 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
- 25 7月, 2006 27 次提交
-
-
由 Anthony Minessale 提交于
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
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2143 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2142 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2141 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Anthony Minessale 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2139 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
http://svn.freeswitch.org/svn/freeswitch/trunk@2138…由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2138 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2137 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
http://svn.freeswitch.org/svn/freeswitch/trunk@2136…由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2136 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2135 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2134 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2133 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2132 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2131 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2130 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2129 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
http://svn.freeswitch.org/svn/freeswitch/trunk@2126…由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2126 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
http://svn.freeswitch.org/svn/freeswitch/trunk@2125…由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2125 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2124 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2122 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
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
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2119 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2118 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
/b git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2117 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Michael Jerris 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2115 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Anthony Minessale 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2112 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2111 d0543943-73ff-0310-b7d9-9358b9ac24b2
-
由 Brian West 提交于
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2110 d0543943-73ff-0310-b7d9-9358b9ac24b2
-