Commit Graph

29 Commits

Author SHA1 Message Date
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