Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playing audio file using sipp

Tags:

sip

sipp

So using a syntax like

../sipp -sn uac SERVER_IP -s DESTINATION_NUMBER -ap AUTH_PASSWORD -aa -m 1 -l 1 -d 10000

I am able to initiate a sip call. What I want to achieve is, after the callee picks the call, play a .wav file and terminate the call after the file is finished playing.

I want to achieve this using the command line arguments. Has someone done this before?

like image 852
BTR Naidu Avatar asked Nov 21 '13 13:11

BTR Naidu


1 Answers

The latest SIPp version (3.4) does now support direct RTP streaming, from a correctly-encoded WAV file.

You'll want to create a custom scenario file (using the -sd uac option to dump out the sample UAC scenario as a starting point) and add <action><exec rtp_stream="file.wav" /></action> inside the <recv response="200"></recv> XML block, to trigger that WAV file to be played over RTP when the 200 OK is received.

http://sipp.sourceforge.net/doc/reference.html#Media%2FRTP+commands has more details on setting this up (such as looping or non-PCMA payload types).

(I'm the current maintainer of SIPp.)

like image 149
rkday Avatar answered Jan 23 '23 07:01

rkday