[OpenSIPS-Users] NAT configuration residential script [SOLVED?]
campusvtv
campusvtv at gmail.com
Wed Dec 3 16:34:30 CET 2014
Hello,
I don't know if is the best solution but I changed this block:
onreply_route[handle_nat] {
if (nat_uac_test("1"))
fix_nated_contact();
if ( isflagset(NAT) )
rtpproxy_answer("ro");
xlog("incoming reply\n");
}
with
onreply_route[handle_nat] {
if (nat_uac_test("1"))
fix_nated_contact();
if(status=="200") && has_body("application/sdp") {
if (nat_uac_test("8")) {
xlog("Detect NAT on 200 OK\n");
fix_nated_sdp("7");
}
}
if ( isflagset(NAT) )
rtpproxy_answer("ro");
xlog("incoming reply\n");
}
So if OpenSIPs detect 200 ok SDP c line is a private IP
(nat_uac_test("8")), change this IP with public IP taked from source
message address.
Now calls from XLite to Jitsi and from Jitsi to Xlite work correctly.
Regards
El 03/12/2014 08:19, campusvtv escribió:
> Hello,
>
> I'm using USE_NAT during OpenSIPs instalation, but OpenSIPs don't work
> for Jitsi 200 OK.
>
> Where do I have to modify the script to detect Jitsi 200 OK contain a
> local IP on SDP c Line?
>
> On route relay:
>
> route[relay] {
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
>
> if (isflagset(NAT)) {
> rtpproxy_offer("ro");
> }
>
> t_on_branch("per_branch_ops");
> t_on_reply("handle_nat");
> t_on_failure("missed_call");
> }
>
> if (isflagset(NAT)) {
> add_rr_param(";nat=yes");
> }
>
> if (!t_relay()) {
> send_reply("500","Internal Error");
> };
> exit;
> }
>
> Or on t_on_reply("handle_nat"):
>
> onreply_route[handle_nat] {
> if (nat_uac_test("1"))
> fix_nated_contact();
> if ( isflagset(NAT) )
> rtpproxy_answer("ro");
> xlog("incoming reply\n");
> }
>
> Thank you.
>
> Regards
>
>
More information about the Users
mailing list