Commit Graph

52 Commits

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