Commit Graph

84 Commits

Author SHA1 Message Date
Anthony Minessale d3758afbae fix a few js issues
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3472 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-28 20:52:04 +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
Michael Jerris ee4118ab86 tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3378 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-15 03:59:40 +00:00
Anthony Minessale bfb6127d57 try it on 10 boxes and you are bound to find one that still complains about the same code yay for gcc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3322 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-12 00:42:51 +00:00
Anthony Minessale 68bab16e37 make event_serialize dynamic
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3314 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-11 19:32:45 +00:00
Michael Jerris 4fde6dd0c8 windows build for new spidermonkey modules.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3310 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-11 06:06:18 +00:00
Anthony Minessale 4e1d518c0e spidermonkey has it's own loadable modules now good luck
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3307 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 21:49:57 +00:00
Michael Jerris 2a645dbc6c fix segfault when no filename is available to log.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3305 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 16:04:22 +00:00
Anthony Minessale 18998f3382 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3303 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 15:51:40 +00:00
Anthony Minessale 964e2e9886 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3299 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-10 01:40:22 +00:00
Michael Jerris 855b312ae6 Initialize. Was not set in some codepaths.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3293 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-09 16:01:47 +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
Brian West 614010db63 Rename ani2 to aniii and ANI2 to ANI-II where appropriate. Because its not ANI2 its ANI II (eye eye)
What is ANI II ?

Refer to:

http://en.wikipedia.org/wiki/Automatic_number_identification

Thanks,
/b



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3073 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-17 23:33:32 +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 28770b3b30 auth
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2859 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-28 21:21:44 +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 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
Anthony Minessale e1d499827d avoiding segfault i should never be called
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2485 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 04:29:42 +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 326e36e72d fix fileio
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2360 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-22 17:19:31 +00:00
Anthony Minessale 780edcd09d optimizations
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2354 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-22 00:56:27 +00:00
Anthony Minessale a0219008e9 fix js
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2353 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-22 00:03:47 +00:00
Michael Jerris 14d79cf500 Windows build tweaks.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2352 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-21 22:48:01 +00:00
Anthony Minessale c92e1cb79a bunch of tweaks to make ivr more fun
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2351 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-21 20:16:28 +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 d7f33e6aa7 add funcs to js
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2332 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 21:18:41 +00:00
Anthony Minessale 47192db741 Upgrade Dingaling to meet new googletalk spec upgrade your client if you have issues.
codecs need more work...

Expose events into javascript so you can create and fire events and 
and pick up chat events with chat-enabled clients like googletalk
EXAMPLE:

session.answer();

e = new Event("custom", "JS::Custom");
e.addHeader("subject", "cool");
e.addBody("hello this is a test");
e.fire;

while(session.ready()) {
    session.execute("sleep", "1000");
    event = session.getEvent();
    if (event) {
      str = event.serialize(); // or ("xml")
      console_log("debug", "Dump Event:\n" + str + "\n");


        e = new Event("custom", "JS::Chat");
        e.addHeader("works", "yes");
        e.addBody("you said: " + event.getBody());
        session.sendEvent(e);
      event.destroy();
    }
}





git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2323 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-18 01:28:50 +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 504beaa5c2 code before declaration as usual fixed for win32's sake
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2214 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-01 04:45:22 +00:00
Anthony Minessale db10a61d5c tweak js
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2194 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-27 21:39:50 +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 0c1c2748ed chage js to allow log levels in console_log()
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1852 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-12 21:23:22 +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 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
Michael Jerris e9563fbf5d make snprintf commands use the path seperator macro.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1544 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-05 18:12:33 +00:00
Anthony Minessale ab3f42c9c4 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1508 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-26 16:00:08 +00:00
Anthony Minessale d314140374 cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1445 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-12 15:33:49 +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 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
Anthony Minessale 7bacd1a0ad forgot a t
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1304 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-30 17:54:05 +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
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 d59cae60c7 add nitrous oxide tank to core event sql backend
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1260 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-04-26 17:18:33 +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 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
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