freeswitch/src
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
..
dotnet add syntax field to the api interface struct. 2006-10-08 05:04:34 +00:00
include Ringback (sponsored by Front Logic) 2006-11-19 01:05:06 +00:00
mod Ringback (sponsored by Front Logic) 2006-11-19 01:05:06 +00:00
switch.c catch up with api, add option to switch_core_destroy call. 2006-11-18 06:43:37 +00:00
switch_buffer.c more optimizationification 2006-09-22 02:10:27 +00:00
switch_caller.c Rename ani2 to aniii and ANI2 to ANI-II where appropriate. Because its not ANI2 its ANI II (eye eye) 2006-10-17 23:33:32 +00:00
switch_channel.c Ringback (sponsored by Front Logic) 2006-11-19 01:05:06 +00:00
switch_config.c make snprintf commands use the path seperator macro. 2006-06-05 18:12:33 +00:00
switch_console.c find missing ret = and put them back 2006-10-16 19:56:42 +00:00
switch_core.c Ringback (sponsored by Front Logic) 2006-11-19 01:05:06 +00:00
switch_event.c let's make sure realloc works 2006-11-11 19:40:41 +00:00
switch_ivr.c Ringback (sponsored by Front Logic) 2006-11-19 01:05:06 +00:00
switch_loadable_module.c Finalization of speech detect interface and API 2006-11-09 05:39:04 +00:00
switch_log.c update 2006-11-16 21:20:00 +00:00
switch_resample.c change resample quality 2006-11-09 05:36:03 +00:00
switch_rtp.c logic fix on rtp_common_read on a not ready session, init bytes to 0 so the checks outside of the while loop work. 2006-11-16 18:48:53 +00:00
switch_stun.c Fix issue pointed out by Fanzhou Zhao <fanzhou@gmail.com> 2006-08-22 14:48:35 +00:00
switch_swig.c swig stuff 2006-11-09 05:33:30 +00:00
switch_swig.i changes to language stuff 2006-09-20 21:59:50 +00:00
switch_utils.c hack to fix udp sockets 2006-11-15 03:17:28 +00:00
switch_xml.c type tweak 2006-10-01 21:29:03 +00:00