Commit Graph

55 Commits

Author SHA1 Message Date
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 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
Michael Jerris e7dae8a9d9 add missing Member-ID header to a couple events, merged from knhor's branch.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3267 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-05 19:32:32 +00:00
Anthony Minessale 252afb823f add some sanity code to originate and conference
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3189 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-25 01:00:26 +00:00
Anthony Minessale b30eb82b84 new sofia rollout
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3166 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-23 20:28:55 +00:00
Anthony Minessale 776919d5fd tweeks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3164 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-23 17:34:03 +00:00
Michael Jerris af23ce4853 whitespace cleanup.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3158 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-22 17:44:41 +00:00
Michael Jerris 1cd8709762 add "all" member target for vol and energy commands, fix init of len for record.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3157 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-22 17:07:28 +00:00
Anthony Minessale aba9c77c35 your run-of-the mill nightmarish attempt at normalizing not one crazy protocol but many....
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3151 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-22 04:37:19 +00:00
Michael Jerris dd5d73742a add ability to specify member "all" on conference api commands taking a member (thanks knhor).
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3142 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 23:01:17 +00:00
Anthony Minessale b2f9fae6d1 conference recording
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3139 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 21:19:40 +00:00
Anthony Minessale 7e61bcf9bb fix
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3133 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 03:19:48 +00:00
Michael Jerris beb4922646 fix typo, thanks knhor
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3132 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 01:33:23 +00:00
Anthony Minessale 59f3204d61 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3130 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 01:20:46 +00:00
Anthony Minessale 343fd5cea5 refactor the presence stuff and add it to mod_conference
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3124 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 22:11:26 +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
Anthony Minessale 6a96670267 refine code
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3006 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-09 02:24:43 +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
Anthony Minessale d80ce73564 umm, yeah, when it's dynamic, and there are no members, let's go ahead and ummmm exit the thread, mmmkay?
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2966 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-03 18:02:23 +00:00
Anthony Minessale 0fcf13bc34 misc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2704 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-14 22:11:30 +00:00
Anthony Minessale 387fdc5311 add justinu's patch
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2670 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 22:24:39 +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
Michael Jerris 89649d47d8 rever oops
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2606 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-10 05:52:45 +00:00
Anthony Minessale ae9d56e288 Adding bugs to the core
This is the primary commit to add bugs to the core (media bugs that is)
Media bugs are kind of like what ChanSpy is in Asterisk only cooler (I wrote ChanSpy too so I can say that)

Here is an example of using them to record a call by the higher level switch_ivr functionality passed
up to the dialplan via mod_playback.

The call will be recorded while the some.wav plays then stop for the rest of the call (when some_other.wav plays)

The bugs may have bugs since this is 1 day's work so happy hunting ......

<extension name="42">
  <condition field="destination_number" expression="^42$">
   <action application="set" data="RECORD_TITLE=recording test"/>
   <action application="set" data="RECORD_ARTIST=FreeSWITCH"/>
    <action application="record_session" data="/tmp/rtest.wav"/>
    <action application="playback" data="/tmp/some.wav"/>
    <action application="stop_record_session" data="/tmp/rtest.wav"/>
    <action application="playback" data="/tmp/some_other.wav"/>
  </condition>
</extension>



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2588 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-09 03:39:28 +00:00
Anthony Minessale f689b62fb6 add dynamic buffers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2583 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 18:57:24 +00:00
Michael Jerris 12d496bb75 make detecting if it's a soundfile more flexible on windows.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2577 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 16:35:58 +00:00
Michael Jerris 597e2becbc add flags to conference dial. add mute and/or deaf after the dial string, or none if you dont want any flags, but need to do cid number/name. Please test.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2571 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 04:49:38 +00:00
Michael Jerris 7863ad0d70 remove unnecessary muting on volume adjust and energy, bad bluetooth headsets find bugs, thanks Jason Garland for finding this one.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2541 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 05:34:11 +00:00
Michael Jerris 19a820229f make conf use default profile if none specified, make it work with soundfiles on windows, must have full drive letter and path (i.e. C:\Windows\Media\blah.wav)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2499 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-04 03:36:56 +00:00
Anthony Minessale 1569055084 conference update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2385 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-24 20:23:43 +00:00
Anthony Minessale d8703f5bd2 change conference
no more <rooms>
rooms will just be created on the fly.

<action application="conference" data="myconf@myprofile+1234"/>

+1234 is optional on-the-fly pin





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2381 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-24 02:22:57 +00:00
Anthony Minessale 9d3d3a5d69 add 1 person dyna conference
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2380 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-24 00:44:47 +00:00
Anthony Minessale 31892070a6 working towards stability with new functions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2368 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-22 22:34:48 +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 6175062b27 consolidate code in conference into todays changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2303 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-16 00:35:02 +00:00
Anthony Minessale 0562e38a51 add proper shutdown to mod_conference
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2302 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-15 22:19:38 +00:00
Anthony Minessale e54c549840 add bridge indication to conferences so sip disables the async rtp since we already have dual threaded i/o
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2293 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-14 21:16:17 +00:00
Michael Jerris f1e3aa5a96 time_t cast.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2256 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-11 15:01:48 +00:00
Anthony Minessale 3a5af506b3 remove naughty operation that makes things not work
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2253 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-11 01:11:16 +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 da67398911 add stricter checking
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2082 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-24 18:56:20 +00:00
Anthony Minessale 7712c6637c messaging stuff
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1902 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-17 14:12:07 +00:00
Anthony Minessale f45ecee214 fix command parser
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1885 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-14 21:15:26 +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
Anthony Minessale 4aab8842cd tweaks for wideband tests
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1883 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-14 19:42:09 +00:00
Michael Jerris 03ac8289e8 fix windows build
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1833 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-11 20:59:07 +00:00
Brian West e9fc56225f tweak (work in progress)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1816 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-10 20:28:22 +00:00
Anthony Minessale b9195e2db9 add ability to set mute and deaf flag from the dialplan +flags{<mute>|<deaf>}
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1811 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-10 16:28:54 +00:00