This HowTo describes the creation of an Echo service built with sipXecs and PJSIP.
You will be able to call an extension and hear your voice echoed back to you. We will be using the pjsua application provided with the PJSIP project.
PJSIP is a SIP stack supporting many SIP features. It is extremely portable, provides Python bindings and has a small footprint.
As part of PJSIP, the project makes available the pjsua application, a command-line SIP UA.
You will need a sipXecs user account to use with the echo service. The pjsua application can run on any computer with adequate connectivity to the sipXecs server. I have built and tested pjsua on both 32 and 64 bit Linux.
Create an account to be used with the echo service. You will need the extension and the SIP password of this user to configure pjsua.
pjsua can be launched with a configuration file. The parameters - with identical syntax - can also be given on the command line. Run 'pjsua --help' to see a list of all accepted parameters.
Start pjsua with configuration file
pjsua should print a 'status=200' message:
and the echo extension (181 in our example) should appear in the list of registered UA's in sipXconfig.
Call the Echo service
Call the extension chosen above (181) from any phone and you should hear your voice echoed back.
Test SIP and RTP connectivity
pjsua being a complete SIP UA, you can also setup the call from the remote end, of course. This allows you to test both SIP and RTP connectivity from a remote, unattended, headless machine. pjsua supports STUN (-stun-srv) and ICE (use-ice) as well as manually setting the IP address (-ip-addr).
Extension 111 should ring; when you answer the call you should be able to hear your voice echoed back (assuming you are using the same configuration file as above).
pjsua can also provide a minimalistic conference bridge. Add the following to your config and all callers will automatically be added to the conference. See also the cl, cd, cc and V commands of pjsua.
See also pjmedia conference bridge sample for a more complete conference bridge app built with PJSIP.