Is possibile to have a on_rx_rtp callback with PJSUA?

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

 



On 3/19/08, Davide Marrone <unidavide at email.it> wrote:
> Roland Klabunde wrote:
>  >> The the problem is: how can I understand from the statistics when the
>  >> remote phone is ringing ?
>  > If there is no explicit RINGING SIP message, you would have to analyze the
>  > received RTP in order to find the ringtone pattern... Nearly impossible, I
>  > guess.
>
> Is exactly what I want to do, I want to analyze the RTP traffic and
>  recognize the ringtone pattern. Firt of all I need to get the RTP
>  traffic, have you any suggestion to get it?

Ah right, I misunderstood what you're trying to do (and it seems that
we've been discussing the wrong topic!).

So you want to do some signal analysis. The good news is that the
media has been established, so we can just peek at the PCM signal
rather than hacking the incoming RTP packets, and this is very easy
with PJSUA-LIB!

What you need to do is something like this:
 - implement your signal analysis as a sink media port
(http://trac.pjsip.org/repos/wiki/FAQ#audio-man)
 - register this port to pjsua-lib's conference bridge (pjsua_conf_add_port())
 - once call's media is establish, connect the call's media slot to
your signal analysis port (with pjsua_conf_connect()) and begin your
signal analysis!

Cheers,
 -benny



[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