Build and run FreeSWITCHThis is based on debian wheezy, and uses master FreeSWITCH. You can switch to stable when cloning.
In my experience this is the quickest way to get to a working, vanilla setup that you can use to automate tests with PJSUA (the PJSIP command-line client).
# To get master
git clone https://stash.freeswitch.org/scm/fs/freeswitch.git
# If changes are needed to the list of modules to be compiled
sudo make install
# Launch FS (in foreground)
You can find here the process for building it from source recommended by the FreeSWITCH team.
In /etc/freeswitch/vars.xml you may want to change the default password in:
If you're enabling SILK, add it to the list in modules.conf.xml:
and add it to global_codec_prefs and outbound_codec_prefs inside vars.xml, e.g.:
Build and run PJSUANote that you need to retrieve a copy of the SILK SDK, once available from skype's developer site (and put it in ~/silk-1.0.9.zip):
mkdir pjsip && cd pjsip
svn co http://svn.pjsip.org/repos/pjproject/trunk/@4806 pjproject
cp ~/silk-1.0.9.zip .
unzip silk-1.0.9.zip && cd SILK_SDK_SRC_FLP_v1.0.9 && make clean all
make dep && make
Now create a configuration file for PJSUA in pjproject dir, e.g. pjsua_test.cfg:
# SRTP - 0:disabled, 1:optional, 2:mandatory (def:0)
# SRTP require secure SIP? 0:no, 1:tls, 1:sips (def:1)
# Disable the sound device. Calls will behave normally, except that no audio will be transmitted or played locally.
# Automatically stream the WAV file to incoming calls.
where 192.168.0.10 is FreeSWITCH's listening IP address.
PJSUA can be local (i.e. run on the same host as FreeSWITCH), or remote (with obvious network reachability constraints).
Run PJSUA from pjproject with:
and let's the tests begin!
You may want to increase FreeSWITCH verbosity by enabling SIP traces and debug messages in fs_cli with:
sofia global siptrace onIt's also easy to use the same configuration and have PJSUA as one of the parties (caller or callee) and have a softphone on the other side, like Blink or X-Lite.
console loglevel debug
The advantage of PJSUA is that you can easily automate its execution and result parsing, for example with its python module.