Command line SIP dialer

Solution 1:

With sipcmd https://github.com/tmakkonen/sipcmd you can do it on one line:

sipcmd -u <login> -c <passwd> -P sip -w <sipproxy> -x "c<phonenum>;ws3000;v<audiofile>;h"

Solution 2:

There is a free (GPL) tool called SIPp (distributed as sip-tester by Debian and its derivatives) that will allow you do something along these lines.

For example:

./sipp -sn uac <IP address>

tells it to use the built in UAC scenario and to send the request to the IP address specified.

Once the call is answered it can play audio, but this needs to be provided as a raw RTP stream (passing a .pcap capture file works well) and you will need to build your own 'scenario' for this, which involves writing/modifying a bit of XML.


Solution 3:

If you already have Asterisk running, setting up a task to dial a number and wait for the other side to answer and play an audio file is not that hard. But 'having Asterisk running' does not answer 'simple'.

Google suggests pjsua.


Solution 4:

linphonec support remote_ring option(wav file to play to advertise remote ringing). You can configure Asterisk.