This updates mod_portaudio to use the new v19 api and also contains
major behavioural changes. This initial check-in should be tested to find
any obscure use cases that lead to crashes etc...
All of the old api interface commands are now depricated and any attempt to
use them should cause a polite warning asking you to try the new single "pa" command.
New Features:
*) Mulitiple calls with hold/call switching.
*) Inbound calls can play a ring file on specified device. (global and per call)
*) Optional hold music for backgrounded calls. (global and per call)
Example dialplan usage:
<extension name="2000">
<condition field="destination_number" expression="^2000$">
<!--if the next 3 lines are omitted the defaults will be used from portaudio.conf-->
<action application="set" data="pa_ring_file=/sounds/myring.wav"/>
<action application="set" data="pa_hold_file=/sounds/myhold.wav"/>
<action application="set" data="export_vars=pa_ring_file,pa_hold_file"/>
<action application="bridge" data="portaudio"/>
</condition>
</extension>
Example API interface usage:
call extension 1000
> pa call 1000
call extension 1001 putting the other call on hold
> pa call 1001
swap the calls between hold and active
> pa switch
view the current calls
> pa list
forground the call with id 1
> pa switch 1
background all calls
> pa switch none
send a dtmf string (1234) to the current call
> pa dtmf 1234
answer the oldest unanswered inbound call
> pa answer
answer the call with id 1
> pa answer 1
hangup the active call
> pa hangup
hangup the call with id 1
> pa hangup 1
get device info
> pa dump
print usage summary
> pa help
USAGE:
--------------------------------------------------------------------------------
pa help
pa dump
pa call <dest> [<dialplan> <cid_name> <cid_num> <rate>]
pa answer [<call_id>]
pa hangup [<call_id>]
pa list
pa switch [<call_id>|none]
pa_dtmf <digit string>
--------------------------------------------------------------------------------
The source of the portaudio v19 library will also be checked in for the
sake of the build system.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3981 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
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
the <param> tags that was in the <user>
are now nested in thier own <params> tag.
Also when using dingaling in component mode you can add a <vcard> to the
user that will be deliverd when requested when using an id like
user+stpeter@jabber.org assuming the comonent subdomain is jabber.org
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3152 d0543943-73ff-0310-b7d9-9358b9ac24b2
This is some brand new stuff to gateway chat/presence/audio from one protocol to another
So far it only works between google/jingle and SIP
All I had to test the SIP end was X-Lite and Eyebeam and GoogleTalk on the jingle end.
With this setup registered X-Lite's can chat with each other and call each other
as well as X-Lite to GoogleTalk and GoogleTalk to X-Lite audio calls.
Chat May also be done between X-Lite and jabber
You'll also need a jabber server configured for component login so you can interface.
We have only tested with jabberd2 so far.
Configure DNS so srv records for jabber for your subdomain (fs.mydomain.com in the example)
so the jabber records are pointed at your jabber server.
RELEVANT CONFIGS
<!-- Brian has no jingle support so send calls to him over to his iax url -->
<extension name="bkw">
<condition field="destination_number" expression="^jingle\+brian@agents.cylynx.com$">
<action application="bridge" data="iax/guest@brianwest.homeunix.org/9184290404"/>
</condition>
</extension>
<!-- Assumption is made here that both sip and jingle have the same profile/domain name as documented below -->
<extension name="jingle2sip">
<condition field="source" expression="mod_dingaling"/>
<condition field="destination_number" expression="^sip\+([^\@]+)\@(.*)$">
<action application="bridge" data="sofia/$2/$1%$2"/>
</condition>
</extension>
<extension name="sip2jingle">
<condition field="source" expression="mod_sofia"/>
<condition field="destination_number" expression="^jingle\+([^\@]+)\@(.*)$">
<action application="bridge" data="dingaling/sip+${sip_fromuser}@${sip_fromhost}/$1@$2"/>
</condition>
</extension>
<configuration name="sofia.conf" description="sofia Endpoint">
<global_settings>
<param name="log-level" value="0"/>
</global_settings>
<profiles>
<profile name="fs.mydomain.com">
<registrations/>
<settings>
<param name="debug" value="1"/>
<param name="rfc2833-pt" value="101"/>
<param name="sip-port" value="5060"/>
<param name="dialplan" value="XML"/>
<param name="dtmf-duration" value="100"/>
<param name="codec-prefs" value="PCMU"/>
<param name="codec-ms" value="20"/>
<param name="accept-blind-reg" value="true"/>
<param name="manage-presence" value="true"/>
<!--<param name="full-id-in-dialplan" value="true"/>-->
<!--<param name="auth-calls" value="true"/>-->
<!--<param name="auth-all-packets" value="true"/>-->
<param name="use-rtp-timer" value="true"/>
<param name="rtp-timer-name" value="soft"/>
<param name="rtp-ip" value="100.200.100.200"/>
<param name="sip-ip" value="fs.mydomain.com"/>
</settings>
</profile>
</profiles>
</configuration>
<configuration name="dingaling.conf" description="XMPP Jingle Endpoint">
<settings>
<param name="debug" value="0"/>
<param name="codec-prefs" value="PCMU"/>
</settings>
<profile type="component">
<param name="name" value="fs.mydomain.com"/>
<param name="password" value="secret"/>
<param name="dialplan" value="XML"/>
<param name="rtp-ip" value="208.64.200.42"/>
<param name="server" value="jabber.freeswitch.org:5347"/>
<!-- disable to trade async for more calls -->
<param name="use-rtp-timer" value="true"/>
<param name="exten" value="_auto_"/>
<!--<param name="vad" value="both"/>-->
</profile>
</configuration>
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3115 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
see sample config for new options.
the dingaling library has changed so you must rebuild it
rm libs/libdingaling/.complete
make installall
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2251 d0543943-73ff-0310-b7d9-9358b9ac24b2
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
DTMF:
1 = volume down
2 = volume default
3 = volume up
4 = gain down
5 = gain default
6 = gain up
7 = energy level down
8 = energy level default
9 = energy level up
* = toggle mute + deaf
0 = toggle mute
# = quit
new api commands to adj volume, gain and energy
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1787 d0543943-73ff-0310-b7d9-9358b9ac24b2