I need to convert an audio file (any common format) into a rtp stream
saved in a .pcap
file with G.722
Codec.
The generated .pcap
file will be sent with SIPp using:
<exec play_pcap_audio="g722.pcap"/>
I know it is possible to send also .wav
file with the following command, if the .wav
is correctly encoded:
<exec rtp_stream="g711.wav"/>
But seems that is not possible to encode a .wav
with G722
.
There are multiple solutions on the web and SO on how to convert a .pcap into an audio file, but I'm actually looking for the opposite.
Steps to convert wav
audio to .pcap
file:
G.722
encoder.pcap
I've never used SIPp, but if it can process encoded G.722
stream, then use ffmpeg for encoding:
ffmpeg -i sample.wav -ar 16000 -acodec g722 sample.g722