Is possibile to have a on_rx_rtp callback with PJSUA?

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

 



> 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.


----- Original Message ----- 
From: "Davide Marrone" <unidavide@xxxxxxxx>
To: "pjsip list" <pjsip at lists.pjsip.org>
Sent: Wednesday, March 19, 2008 3:45 PM
Subject: Re: Is possibile to have a on_rx_rtp callback with PJSUA?


> Benny Prijono wrote:
>>> Yes, I'm really sure that the only thing to do is to intercept the
>>>  incoming RTP traffic. I have discoverd it using xten-xlite, I have made
>>>  a lot of tries with tcpdump & ngrep, when I make a call to an external
>>>  phone I have saw that:
>>>  - the SIP packet 180 ringing doesn't arrive, never
>>>  - I receive a SIP packet: 183 Session Progress
>>>  - xten-xlite doesn't play the local ringing tone until the change of 
>>> RTP
>>>  traffic
>>>
>>>  I really made many tries and I'm sure that the only SIP packet that
>>>  arrive when the call in on going is 183 Session Progress and "viewing"
>>>  with ngrep the RTP packets is really clear that, at a moment when the
>>>  traffic change, the client start to play the local ringing tone that
>>>  simulate the remote ringing. This moment is exactly when the remote
>>>  phone is really ringing. So I'm sure at 100% that I have to get the RTP
>>>  traffic.
>>>  I don't already know what changes of the traffic I have to intercept 
>>> but
>>>  first of all I have to get it.
>>>
>>
>> Sorry now I'm a bit lost. If you said you've got 183, then why can't
>> you just "start the call" with the arrival of this 183 response
>> (rather than waiting for the 180 response). It is quite common to
>> receive 183 instead of 180 if you are calling a PSTN gateway, and if
>> you listen to the incoming audio most likely you will hear ringing
>> tone with the 183 response.
>
> Yes, I have to call mobile phones.
>
>> Since you've had 183 (and I assume there is SDP in the 183), your
>> media has been established, and your on_call_media_state() callback
>> should have been called.
>
> Yes, you right, in the 183 there is SDP, the media is established and
> the on_call_media_state is called.
>
>> So now you can just poll the media statistic of the call to see if
>> you've received RTP packets. You can use "dq" command in pjsua to show
>> the call's media statistic (and trace the implementation of this
>> command to see how to retrieve the media statistic programmatically).
>
> I have tried to do that, I saw that the "dq" calls the pjsua_call_dump
> and I saw in the implementation that it calls dump_media_session to
> retrive RTP statistic.
> The the problem is: how can I understand from the statistics when the
> remote phone is ringing ?
> I have to know exactly when the remote phone start to ring and I have to
> immediatly hang up the call.
> The program that I'm writing must do only a single ring on the remote
> phone, this is a kind of "cover signal" that wakeup the mobile phone.
>
> The program need to be perfectly synchronized because I have to minimize
> the ringing time so the user cannot answer to the call. If the user
> answer to the call I have a to pay for it, so the ringing time must be
> really short to avoid charge for me.
>
> cheers
> Davide
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 




[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