[OpenSIPS-Users] inconsistence nathelper behavior

Leon Li Leon.Li at aarnet.edu.au
Fri Apr 8 03:59:31 CEST 2011


Sorry, forgot to add my config:

route[3] {
        #---- NAT fixup ----#
        #---- RTPproxy handling ----#
        if (is_method("BYE|CANCEL")) {
                unforce_rtp_proxy();
        } else if (is_method("INVITE")) {
                #---- Activates the RTP Proxy for the CALLEE ---#
                #force_rtp_proxy();
                if (has_body("application/sdp")) {
                        if (rtpproxy_offer())
                                rtpproxy_answer();
                        } else {
                                rtpproxy_offer();
                        }
        } else if (is_method("ACK") && has_body("application/sdp"))
                rtpproxy_answer();

        # catch and fix replies
        t_on_reply("2");
}

onreply_route[2] {
        xlog("incoming reply\n");

        #---- Handling of the SDP for the 200 or 183 reply ----#
        #---- If behind nat (flags 5 or 6) start RTP Proxy ----#
        #----    Activates the RTP Proxy for the CALLER    ----#
        if ( is_method("INVITE") && (isflagset(5) || isbflagset(6)) &&
                has_body("application/sdp")) {
                force_rtp_proxy();
        }

        #---- If the CALLEE is behind NAT, fix the CONTACT HF ----#
        if (isbflagset(6)) {
                fix_nated_contact();
                search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
        }
}

Regards,
Leon


-----Original Message-----
From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Leon Li
Sent: Friday, 8 April 2011 11:40 AM
To: Ovidiu Sas; OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] inconsistence nathelper behavior

Thanks Ovidiu,

I gave a go but no luck. 

The DSP is offered in a "200 OK" from NATed endpoint, however, I couldn't find a way to check against "200 OK" and offer rtpproxy (ie. rewrite c= part). anyway I can modify a 200 OK response?

Regards,
Leon


-----Original Message-----
From: sip.nslu at gmail.com [mailto:sip.nslu at gmail.com] On Behalf Of Ovidiu Sas
Sent: Friday, 1 April 2011 10:20 AM
To: OpenSIPS users mailling list
Cc: Leon Li
Subject: Re: [OpenSIPS-Users] inconsistence nathelper behavior



More information about the Users mailing list