[SR-Users] rtp proxy - where to invoke?

Anders vaerge at gmail.com
Fri Oct 15 17:36:29 CEST 2010


Thanks for the references to examples. I've been through them, gotten
rid of force_rtp_proxy() since it's considered depreciated - but still
get the same error:

 /usr/local/sbin/kamailio[31035]: ERROR:nathelper:force_rtp_proxy:
incorrect port 0 in reply from rtp proxy

I do this in my main route

1. A force_rport() for everything
2. Check if it is likely NAT all with nat_uac_test("19"), and if true...
3. If it is anything but a REGISTER, fix_nated_contact()
4. If it is an INVITE, do rtpproxy_offer() - and an
unforce_rtp_proxy() if it is BYE
5. If there is no to tag, do add_rr_param(";nat=yet")

In the onreply_route[1] this is done:

A. xdbg("incoming reply\n") ...and I have no clue what this is for(!)
B. If it 183 or 200, rtpproxy_answer() is called

...and that is it, but still the "incorrect port 0 in reply from rtp proxy".

Any ideas?

On Fri, Oct 15, 2010 at 9:18 AM, Ovidiu Sas <osas at voipembedded.com> wrote:
> Check out the examples provided in the code:
> http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=modules_k/rtpproxy/examples/4to6.cfg;hb=ad7f00d840082989132f335914aa0db223a0e46e
> http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=blob_plain;f=modules_k/rtpproxy/examples/alg.cfg;hb=ad7f00d840082989132f335914aa0db223a0e46e
>
>
> Regards,
> Ovidiu Sas
>
> On Fri, Oct 15, 2010 at 8:40 AM, Anders <vaerge at gmail.com> wrote:
>> I've been looking around for documentation to understand rtp proxy
>> with Kamailio better, but with no luck (or I might be quite
>> thick-headed!).
>>
>> Anyone know of example configurations with rtp proxy and Kamailio, so
>> I can start seeing what is wrong with my config (below)?
>>
>> Thanks!
>>
>> //Anders
>>
>> On Wed, Oct 13, 2010 at 2:20 PM, Anders <vaerge at gmail.com> wrote:
>>>  Sorry, I didn't understand that. Is it good or bad that it is
>>>  asymmetrical? And if not, what should it be? As far as I understand
>>>  from my config, it first checks if NAT is set, and if so, it goes to
>>>  force_rtp_proxy if it's INVITE and unforce_rtp_proxy if it's a BYE. Is
>>>  that not correct?
>>>
>>>> On Wed, Oct 13, 2010 at 1:51 PM, Alex Balashov
>>>> <abalashov at evaristesys.com> wrote:
>>>>> This suggests asymmetrical invocation of rtpproxy, for example in 200 OK but
>>>>> not corresponding INVITE.
>>>>>
>>>>> --
>>>>> Alex Balashov - Principal
>>>>> Evariste Systems LLC
>>>>> 1170 Peachtree Street
>>>>> 12th Floor, Suite 1200
>>>>> Atlanta, GA 30309
>>>>> Tel: +1-678-954-0670
>>>>> Fax: +1-404-961-1892
>>>>> Web: http://www.evaristesys.com/
>>>>>
>>>>> On Oct 13, 2010, at 1:33 PM, Anders <vaerge at gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm trying to get the RTP proxy to work with Kamailio (1.5), but right
>>>>>> now I am getting this error here:
>>>>>>
>>>>>> Oct 13 16:54:44 vn1031 /usr/local/sbin/kamailio[13622]:
>>>>>> ERROR:nathelper:force_rtp_proxy: incorrect port 0 in reply from rtp
>>>>>> proxy
>>>>>>
>>>>>> There is probably something wrong in my cfg - for the use of
>>>>>> force_rtp_proxy that part of my config is here below. See anything odd
>>>>>> that could lead to the error above?
>>>>>>
>>>>>> route {
>>>>>>   ......
>>>>>>   route(4);
>>>>>>   ......
>>>>>> }
>>>>>>
>>>>>> route[4]{
>>>>>>   force_rport();
>>>>>>   if (nat_uac_test("19")) {
>>>>>>       if (method=="REGISTER") {
>>>>>>           fix_nated_register();
>>>>>>       } else {
>>>>>>           fix_nated_contact();
>>>>>>       }
>>>>>>       setflag(5);
>>>>>>   }
>>>>>>   return;
>>>>>> }
>>>>>>
>>>>>> route[5] {
>>>>>>   if (is_method("BYE")) {
>>>>>>       unforce_rtp_proxy();
>>>>>>   } else if (is_method("INVITE")){
>>>>>>       force_rtp_proxy();
>>>>>>   }
>>>>>>   if (!has_totag()) add_rr_param(";nat=yes");
>>>>>>   return;
>>>>>> }
>>>>>>
>>>>>> onreply_route[1] {
>>>>>>   xdbg("incoming reply\n");
>>>>>>
>>>>>>   if (!(status =~ "183" || status =~ "200"))
>>>>>>        exit;
>>>>>>       #fix_nated_contact();
>>>>>>       force_rtp_proxy();
>>>>>> }
>>>>>>
>>>>>> _______________________________________________
>>>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>>>> sr-users at lists.sip-router.org
>>>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>



More information about the sr-users mailing list