[OpenSIPS-Users] opensips nat question

suifeng yxrmail at 163.com
Mon May 27 09:18:10 UTC 2024


HI,I has an NAT question;
img one:
img two:  Use fix_nated_sdp(10) processing:
opensips version OpenSIPS (3.2.17 (x86_64/linux))
opensips.cfg  part context:
 
route{
       if (nat_uac_test(23)) {
            if (is_method("REGISTER")) {
                setbflag("NAT");
                fix_nated_register();  
                xlog("request nat: $fd, rd: $rd, ru: $ru");
                xlog("request -1................");
            }
            if (is_method("INVITE")){
                xlog("request invite: $fd, rd: $rd, ru: $ru");
                fix_nated_contact();
                add_rr_param(";nat=yes"); 
                xlog("request -2................");
            }
        }


        if (is_method("INVITE") && has_body("application/sdp")) {
                xlog("request 13-1................si:[$si],cs:[$cs],uri:[uri]");
                fix_nated_sdp(10);
        }
}



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20240527/bdabf4e1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 企业微信截图_37451ff5-4b77-45a5-89c0-1c0759c23e62.png
Type: image/png
Size: 374682 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240527/bdabf4e1/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 企业微信截图_6a497ec5-96b6-46d8-95f2-dc038a3182fd.png
Type: image/png
Size: 413601 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20240527/bdabf4e1/attachment-0003.png>


More information about the Users mailing list