Commit Graph

102 Commits

Author SHA1 Message Date
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 a675393bb7 performance tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2298 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-15 17:52:12 +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 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
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
Anthony Minessale 8c51cc2934 small fix to sql shipping stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1963 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-19 01:19:46 +00:00
Anthony Minessale d77e574d4e rearrange the furnature
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1846 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-12 18:39:19 +00:00
Anthony Minessale b5a19020f7 add session counter and make all sessions hang up elegantly on shutdown
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1788 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-07 18:59:14 +00:00
Anthony Minessale fe32a839df use channel flag to tell when to read from channel during some stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1590 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-09 22:59:13 +00:00
Anthony Minessale 5c57580955 ivr stuff (part 1)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1573 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-08 19:22:54 +00:00
Anthony Minessale 9a43ccab24 add mod_rss
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1551 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-06 23:07:37 +00:00
Anthony Minessale 7c7c42a6bf update queue len
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1542 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-05 17:37:24 +00:00
Anthony Minessale cfae7d1581 fix sample goodies
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1525 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-30 17:19:01 +00:00
Anthony Minessale 9d68a23929 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1467 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-15 18:16:43 +00:00
Anthony Minessale d53d9d3997 rearrange some things please see conf/freeswitch.xml as there is a significant change to the conf that will break your stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1446 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-12 19:28:21 +00:00
Michael Jerris 64c80bd894 fix dox
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1428 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 21:28:28 +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
Michael Jerris 1b97a9b8a8 msvc build fixes to core from XMLification commit.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1408 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-10 04:06:01 +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
Anthony Minessale 23d6224dab gather 2833 into RTP core and a few tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1351 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 17:51:53 +00:00
Anthony Minessale e61acfba16 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1342 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 01:15:38 +00:00
Michael Jerris b6545379d6 add interfaces to sqlite db table for quick show api commands (coming soon)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1313 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-01 19:44:21 +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
Michael Jerris d0347b2a95 part 1 of many standardizing typedefed types to end in _t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1292 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-29 01:00:52 +00:00
Michael Jerris 751ca005d3 use macro for EXTERN "C" begin and end lines in header files to clean up the headers, and to eliminate a format bug in emacs.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1291 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-28 20:04:08 +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 5ab733c606 crash prevention
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1281 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-27 21:09:58 +00:00
Anthony Minessale 31e31566a5 set some key functions to report the file func line of the caller not of the actual function
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1278 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-27 15:02:35 +00:00
Anthony Minessale 92bba4dbe6 adjust
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1255 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-25 23:11:56 +00:00
Anthony Minessale ba6b7651b2 improve bridge code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1251 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-25 18:02:12 +00:00
Anthony Minessale a3d0b78ea0 tweak loadable module code to allow registration for langauges that can in turn fully implement modules of thier own (e.g. mono)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1244 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-25 00:33:00 +00:00
Anthony Minessale 1748885aae update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1229 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-22 16:06:55 +00:00
Anthony Minessale 377090fa46 cause part 1
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1223 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-21 23:16:26 +00:00
Anthony Minessale a9f86cb58a add VAD
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1222 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-21 22:31:08 +00:00
Anthony Minessale ed53c98d67 add yucky hacks to make googletalk work with ilbc (shame on them)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1204 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-19 20:38:02 +00:00
Michael Jerris 6deb8b35df create typedef for payload type\iana code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1188 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-18 16:50:34 +00:00
Anthony Minessale 021ea0e724 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1181 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-18 00:24:52 +00:00
Michael Jerris c3a77d23bb improvements
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1176 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-17 18:25:43 +00:00
Michael Jerris 026e8d39ca Set log levels on many existing log messages. A huge thanks to James Martelletti for going through all the log calls to do this.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1173 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-16 06:05:53 +00:00
Anthony Minessale d5457f8eca backend for session to session event trading
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1157 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-14 16:43:49 +00:00
Brian West 1bb893efae enhance logger stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1123 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-12 14:41:35 +00:00
Brian West 559b8ab26c Gut Logger and put it back modular style
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1117 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-11 21:13:44 +00:00
Brian West 628e59a3ae add some events and more data to core DB
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1115 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-11 14:55:14 +00:00
Brian West 82c1907380 2nd pass to add secure RTP
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1104 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-10 17:14:53 +00:00
Michael Jerris 9db533862d standardize to some more specific int types for frame size and rate variables.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1095 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-09 00:10:13 +00:00
Brian West 78e37908bc Add optional packetization and VAD buster options to RTP
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1090 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-07 17:32:14 +00:00
Anthony Minessale a203f3138e retool RTP API and downgrade previous constructor to back-compat convience function
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1069 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-06 20:56:29 +00:00
Anthony Minessale 0af60e1b2f move CNG into the core and rearrange a few things
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1066 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-06 19:50:53 +00:00