[Serusers] fix_nated_contact not rewriting contact?

Weiter Leiter bp4mls at googlemail.com
Wed Sep 13 19:47:21 CEST 2006


Every time you call xlog, it uses the original message (and not the
modification lumps) to retrieve info for the contact hf, every time you
invoke it. (Not sure the functionality was kept in openser.)

On 9/13/06, kjcsb <kjcsb at orcon.net.nz> wrote:
>
> I have the following config:
>
>         if (client_nat_test("3")) {
>                 #IP address in contact is private IP
>                 #Via is different to address client has contacted us from
>                 #If so then setflag7 to indicate that sender is behind NAT
>                 xlog("client nat test 3 returned true for r-uri <$ru> in
> route 3 so will setflag7");
>                 setflag(7);
>                 xlog("contact before update <$ct>");
>                 xlog("via before update <$hdr(via)>");
>                 force_rport();
>                 #Rewrite Contact: header to contain Sip client's public
> IP:port
>                 fix_nated_contact();
>                 xlog("contact is now <$ct>");
>                 xlog("via is now <$hdr(via)>");
>         };
>
> However the value returned by $ct is the same before and after
> fix_nated_contact(). Is that because I'm doing something wrong, or because
> I've misunderstood fix_nated_contact or because the $ct variable doesn't
> get
> updated by fix_nated_contact? If the latter, how can I find out the result
> of fix_nated_contact? The same applies to force_rport and the via details.
>
> Any advice appreciated.
>
> Regards
>
> Cameron
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20060913/1a79ff93/attachment.htm>


More information about the sr-users mailing list