[Serusers] NAT contat rewrite

Linus Surguy linus at magrathea-telecom.co.uk
Sun Jul 18 11:16:09 CEST 2004


Hi all,

I'm sure I must be doing something very stupid! I'm using fix_nated_contact
and then t_relay(). The INVITE is being sent with a rewriten contact field,
but if the UA issues a CANCEL the private IP address is sent in the contact
field and is not rewritten.

What basic mistake have I made?!

A cut down version of my ser.cfg is:

        record_route();
        # loose-route processing
        if (loose_route()) {
                t_relay();
                break;
        };


        fix_nated_contact();

        force_rport();

        if (method=="INVITE") {
               fix_nated_sdp("1");
               force_rtp_proxy();
                /* set up reply processing */
                t_on_reply("1");
                setflag(6);

       };

        rewritehostport("213.xxx.xxx.xxx:5060");

        if (!t_relay()) {
                sl_reply_error();
        };



  # all incoming replies for t_onrepli-ed transactions enter here

onreply_route[1] {

        fix_nated_contact();

       if (status=~"[12][0-9][0-9]")
                force_rtp_proxy();
}




More information about the sr-users mailing list