Commit Graph

91 Commits

Author SHA1 Message Date
Anthony Minessale d20870e121 fix obscure bs, remove CR from dptools, add info app
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3463 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-28 02:23:26 +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 dd1f941744 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3458 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-26 20:06:04 +00:00
Anthony Minessale 32e293d67f ampersand was being used to indicate a function and a double call change it to carrot ^ for functions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3418 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-20 02:01:21 +00:00
Anthony Minessale d7baa16132 Ringback (sponsored by Front Logic)
This addition lets you set artifical ringback on a channel
that is waiting for an originated call to be answered.

the syntax is 

<action application="set" data="ringback=[data]"/>

where data is either the full path to an audio file
or a teletone generation script..


syntax of teletone scripts

LEGEND:

0-9,a-d,*,# (standard dtmf tones)

variables: c,r,d,v,>,<,+,w,l,L,%

c (channels)        - Sets the number of channels.
r (rate)            - Sets the sample rate.
d (duration)        - Sets the default tone duration.
v (volume)          - Sets the default volume.
> (decrease vol)    - factor to decrease volume by per frame (0 for even decrease across duration).
< (increase vol)    - factor to increase volume by per frame (0 for even increase across duration).
+ (step)            - factor to step by used by < and >.
w (wait)            - default silence after each tone.
l (loops)           - number of times to repeat each tone in the script.
L (LOOPS)           - number of times to repeat the the whole script.
% (manual tone)     - a generic tone specified by a duration, a wait and a list of frequencies.

standard tones can have custom duration per use with the () modifier
7(1000, 500) to generate DTMF 7 for 1 second then pause .5 seconds

EXAMPLES

UK Ring Tone [400+450 hz on for 400ms off for 200ms then 400+450 hz on for 400ms off for 2200ms]
%(400,200,400,450);%(400,2200,400,450)

US Ring Tone [440+480 hz on for 2000ms off for 4000ms]
%(2000,4000,440,480)

ATT BONG [volume level 4000, even decay, step by 2, # key for 60ms with no wait, volume level 2000, 350+440hz {us dialtone} for 940ms
v=4000;>=0;+=2;#(60,0);v=2000;%(940,0,350,440)

SIT Tone 913.8 hz for 274 ms with no wait, 1370.6 hz for 274 ms with no wait, 1776.7 hz for 380ms with no wait
%(274,0,913.8);%(274,0,1370.6);%(380,0,1776.7)

ATTN TONE (phone's off the hook!) 1400+2060+2450+2600 hz for 100ms with 100ms wait
%(100,100,1400,2060,2450,2600)



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3408 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-11-19 01:05:06 +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
Anthony Minessale 082a5a03c0 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3226 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-29 15:36:23 +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 1f29ce2749 add some more nifty stuff and fix a bug or 2
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3134 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-21 04:58:15 +00:00
Anthony Minessale 4943c5939f another step closer
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3119 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-20 06:55:30 +00:00
Anthony Minessale d44c204f5b fix goofy 183 madness
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3004 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 15:51:10 +00:00
Michael Jerris d95fdb0ccc type tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2997 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-08 04:37:03 +00:00
Anthony Minessale 741b8329b9 Modifying the behaviour of the dialplan engine
the 'data' field in action tags may now refer to variables and api functions
to be expanded at runtime.

Syntax:

$varname
${varname}
&func_name(func args)


Exception:
variables that are numeric are still expanded at dialplan compile time based on the regex eg $1 $2 etc

Example:

<extension name="1000">
  <condition field="destination_number" expression="^(1000)$">
    <action appplication="my_route_app" data="$1"/>
    <action appplication="bridge" data="$destination"/>
  </condition>
</extension>

Here the $1 is ecaluated before the call begins setting it to 1000 based on the regex ^(1000)$
$destination is evaluated on the fly in execution once the my_route_app has run and has had a 
chance to set the variable 'destination' to the correct value.



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2994 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-10-07 19:54:04 +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
Michael Jerris cd74bf6501 tweak types
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2754 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-19 19:09:10 +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
Michael Jerris 2343fdd8cf Attribution.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2734 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-18 05:08:55 +00:00
Anthony Minessale 555bd0af08 ok maybe this will fix the conditional mutext race we will readlock the session during any callbacks and cancel the operation if read_lock fails
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2709 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-16 00:43:58 +00:00
Anthony Minessale aa2a793e28 optimizations and disable the conditional thing till we see why it dies at 100cps X 800 calls
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2708 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-15 21:43:18 +00:00
Anthony Minessale b3c437630f use steve's g711 (thanks steve), chage the conditional mutex based on paul T's input (thanks paul) and take the yield away on switch_yield and just sleep
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2663 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-12 17:17:02 +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 2767a7d002 Changed SWITCH_EVENT_CHANNEL_STATE to SWITCH_EVENT_CHANNEL_HANGUP on the hangup state change, add Hangup-Cause event header.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2563 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-09-07 22:39:40 +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 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 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 5782555e70 redecorating
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2301 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-08-15 21:38:24 +00:00
Anthony Minessale 9c79c2a3fb Add mod_event_socket remote client module and sample client.
To Test:

uncomment or add from modules.conf
make installall again to compile it
uncomment the load line from freeswitch.xml

the default values are to bind to 127.0.0.1 port 8021

telnet to port 8021
enter "auth ClueCon" to authenticate

from here you can do the following:
*) events [xml|plain] <list of events to log or all for all>
*) noevents 
*) log <level> // same as the console.conf values
*) nolog
*) api <command> <arg>
*) exit

there is a perl client in scripts/socket called fs.pl

with the module up and loaded:
cd scripts/socket
perl fs.pl <optional log level>

you can enter a few api commands like "show or status"




git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2047 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-22 21:49:52 +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 e73ee221d2 add mod_dptools, for set variable and sleep from the dialplan
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1864 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-13 13:20:20 +00:00
Brian West d99c1605a1 dont pre_answer after actual answer
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1814 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-07-10 19:51: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 91049dae9b put some mutexes on some flags
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1662 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-22 23:56:09 +00:00
Michael Jerris 8e84e29693 add asserts to address segfaults on improper usage of the switch_channel api.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1617 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-13 22:25:58 +00:00
Michael Jerris 76dfa310c0 add access or function for channel variable iterator
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1612 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-13 01:49:18 +00:00
Anthony Minessale ae806dc793 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1553 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-06 23:49:02 +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 15b99a3bbf make extensions linkable (thanks mishehu)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1537 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-06-03 17:06:06 +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 23d6224dab gather 2833 into RTP core and a few tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1351 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 17:51:53 +00:00
Anthony Minessale 2546187cad update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1343 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 01:44:41 +00:00
Anthony Minessale de338c319d update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1336 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-04 00:07:20 +00:00
Anthony Minessale b124890e48 update
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1327 d0543943-73ff-0310-b7d9-9358b9ac24b2
2006-05-03 17:03:27 +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