How to replace real-time voice with (e.g.) a mp3 file in PJSIP samples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I need to measure handover delays in wireless environments where VoIP
services are offered and I thought the PJSIP project was powerful enough to
let me tweak the given sample programs to achieve what I need. As I'm
completely new in PJSIP (although I've read some project documentation and
source code) I don't know if this can really be done, so I would like to get
some help from any of you.

AFAIK, the "Simple UA" (simpleua) sample application establishes a
SIP/RTP/RTCP session, gets audio from the sound input (mic) on one side and
dumps it on the sound ouput (speaker) on the other side, doesn't it? What I
would like to do is to stream an audio file (i.e. an mp3 file) instead of
real-time voice. I know I can stream WAV files with PJMEDIA's "Remote
Streaming" sample application, but I would like to do it within a SIP
session.

So, I don't know how I can tweak the source code to get the audio source
from a file instead audio input hardware. Could anybody tell me if this can
be done and how to get it working? Anyway, if there is any better way to do
this, please, tell me.

BTW, I tried "Remote Streaming" (streamutil) sample application but when
trying to stream on the sender side I get an error:

streamutil: ../src/pjmedia/master_port.c:67: pjmedia_master_port_create:
Assertion 'u_port->info.clock_rate == d_port->info.clock_rate' failed

Searching on the mailing list archive I
read<http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2008-November/005587.html>this
is because streamutil does no resampling or channel number adjustment,
so I need a mono WAV file with 8kHz clock rate. My question here is where
can I get an encoder in order to transcode an audio file to this format. I'm
using Debian Lenny 2.6.26-2.


Any help would be much appreciated. Thank you for your time.

Regards,
Javi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090519/4a0992b1/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux