[Serusers] HELP: Why does my BYE go to the wrong port?

Evan Borgstrom evan.borgstrom at ca.mci.com
Mon Mar 7 22:45:36 CET 2005


Try something like this:


if (client_nat_test("3")) {
         if ((method=="REGISTER") or 
(!search("^Record-Route:"))) {
                 fix_nated_contact();
                 force_rport();
         };
};


-Evan

On Mon, 7 Mar 2005 16:36:21 -0500
  Java Rockx <javarockx at gmail.com> wrote:
> Greg,
> 
> I am using client_nat_test("3") in the INVITE handler. 
>Are you saying
> that I should not be calling fix_nated_contact() because 
>the INVITE
> was received on a different port than what the <contact> 
>headers
> shows?
> 
> How do I test for this condition in ser.cfg?
> 
> Right now I do this (using mediaproxy)
> 
> if (client_nat_test("3")) {
>    force_rport();
>    fix_nated_contact();
> };
> 
> lookup("aliases");
> ...
> lookup("location") stuff
> 
> Regards,
> Paul
> 
> 
> On Mon, 7 Mar 2005 22:27:34 +0100, Greger V. Teigre 
><greger at teigre.com> wrote:
>> Hi Paul,
>> You are probably doing a fix_nated_contact() on the 
>>INVITE before sending it
>> to the Grandstream. From the second INVITE message going 
>>to
>> 66.90.46.29:5060:
>> Contact: <sip:4073192279 at 10.3.0.3:57687>.
>> 
>> You should exclude the GW from INVITE NAT processing as 
>>the initial INVITE
>> is sent from a different port than what is found in the 
>>contact.
>> g-)
>> 




More information about the sr-users mailing list