Commit Graph

136 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
Anthony Minessale 218b495bb3 fix probe presence stuff on conference, do a make sure
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3676 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-12-16 03:00:56 +00:00
Anthony Minessale 60434decf5 ENUM Support
mod_enum can be used as a dialplan app, an api call from the console or as a dialplan interface.


Dialplan Interface:
put enum as the dialplan parameter in an endpoint module
i.e. instead of "XML" set it to "enum" or "enum,XML" for fall through.

Dialplan App:
This example will do a lookup and set the a variable that is the proper
dialstring to call all of the possible routes in order of preference according to 
the lookup and the order of the routes in the enum.conf section.

<extension name="tollfree">
  <condition field="destination_number" expression="^(18(0{2}|8{2}|7{2}|6{2})\d{7})$">
    <action application="enum" data="$1"/>
    <action application="bridge" data="${enum_auto_route}"/>
  </condition>
</extension>

You can also pick an alrernate root:
<action application="enum" data="$1 myroot.org"/>	


API command:
at the console you can say:
enum <number> [<root>]

The root always defaults to the one in the enum.conf section.




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3494 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-30 21:28:32 +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 361dc67be2 no_media/ringback tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3461 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-27 21:52:38 +00:00
Anthony Minessale c08e943e44 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3460 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-27 17:12:40 +00:00
Anthony Minessale fd16c8f245 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3448 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-23 19:42:21 +00:00
Michael Jerris 28c875cfa9 add switch_ivr_digit_stream functions and switch_ivr_build_xml_menu_stack to switch ivr, merged from knhor branch. thanks neal!
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3341 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-13 16:29: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 0ce3f5b08b tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3286 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-09 05:13:59 +00:00
Anthony Minessale 278a69a0e4 someone said 240k was a cool stack size
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3248 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-31 21:57:59 +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
Anthony Minessale 08442ff2c4 signalling refactoring for media etc
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3192 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-25 04:28:49 +00:00
Michael Jerris 1f2d19e28e update more sip cause code to qsig cause code mappings from rfc 4497 sections 8.4.1 and 8.4.4
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3190 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-25 03:45:20 +00:00
Anthony Minessale 99e22d69bd refactor earlier junk from this eve and add ken's propagate variable thing
set this sometime before an origination (bridge etc).

<action application="set" data="propagate_vars=my_cool_var1,my_cool_var2,foo,bar"/>

and they should be cloned over to the new channel when it's substantiated



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3101 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-19 07:13:34 +00:00
Anthony Minessale 70bfba5b63 Christmas Presence
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3083 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-18 22:57:35 +00:00
Anthony Minessale 438cf0327e rpid for sofia
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3058 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-16 04:39:00 +00:00
Anthony Minessale a2b11dd93d in the name of interop
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3043 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-12 20:37:08 +00:00
Anthony Minessale ba46200539 refactoring and general improvement (do a make sure)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3035 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-12 00:59:09 +00:00
Anthony Minessale 0d23976f2a Insane amounts of yucky satanic code to make transfer and that kind of thing work.
Transfers work better when both legs of the call live in thier own channel eg bridged calls
A -> B where you want a to make B -> C

when you route a call to an IVR or playback app you are not really bridging you have
A all alone executing the script so it's hard to transfer that.

I do have it aparently working but it's goofy and you are better off
putting your IVR on it's own switch so they are all inbound calls
then you have A -> B -> IVR
now A can happily transfer B who can stay on line with IVR without stopping
the execution.  You can also accomplish this by calling in a loop back to the same box
if you dont want to have 2 boxes.


Also the beginning effort at bridging calls with no media is here
set this magic variable in your dialplan to convince mod_sofia
to pass A's sdp as it's own to B and return B's sdp back to A on 200 or 183

<action application="set" data="no_media=true"/>
<action application="bridge" data="sofia/id@host.com"/>

You will need a new sofia tarball for this version


There is a bunch of other odds and ends added like a function or 2 etc
Oh,

And don't be suprised if it introduces all kinds of bugs!



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2992 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-06 22:39:49 +00:00
Anthony Minessale 7de068b9ac sip work in progress changes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2969 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-04 23:11:11 +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
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 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 eed1180192 add dynamic buffers
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2585 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 19:17:23 +00:00
Anthony Minessale 5816256ce3 let g729 be setup for pass through compile like this... MOD_CFLAGS="-DG729_PASSTHROUGH" make installall
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2575 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-08 15:43:45 +00:00
Anthony Minessale 086676f6e9 what comes up must come down
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2555 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 15:15:39 +00:00
Anthony Minessale a4c778a00c fix namespace
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2548 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 14:23:31 +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
Anthony Minessale 6a91e4f3f9 cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2486 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-03 13:29:13 +00:00
Anthony Minessale 8543778b7c pack this mutha %^%$^&
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2483 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-02 23:04:25 +00:00
Anthony Minessale d94e810630 add some events
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2425 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-29 15:17:06 +00:00
Anthony Minessale aa196711a1 codec sql
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2387 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-25 01:33:28 +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 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