Thank you guys, it's working now.
Apparently, rewritehostport("<ip>:<port>") works great with rptproxy while forward does exactly that, forwards the call to the destination bypassing the force_rtp_proxy request. This should be documented somewhere.
ScriptHead
- I never used forward, see my example, I do not know if it actually relay call or not
- if you do not have NAT between client and server you do not need force_rport, and try to avoid any nat_uac_test, etc if you are actually working on private ips without nat
- you MUST enable proxy also for reply
route[x] {
…..
force_rtp_proxy();
t_on_reply("1");
rewritehostport("x.x.x.x:5060");
if (!t_relay()) {
sl_reply_error();
};
}
onreply_route[1] {
if (!(status=~"183" || status=~"200"))
break;
force_rtp_proxy("");
}
From: users-bounces@openser.org [mailto: users-bounces@openser.org] On Behalf Of Script Head
Sent: Wednesday, March 08, 2006 6:29 PM
To: users@openser.org
Subject: [Users] forcing rtpproxy on a call
Hello everyone,
I am trying to debug why my rtpproxy isn't working. I have the following setup, on my LAN.
The rtpproxy is running and I see commands flying thru it.
the following route works
if(method=="INVITE") {
if(uri=~"^sip:[0-9]{6}1[0-9]*{10}@") {forward(192.168.1.12,5060);
};
}
when I replace it with this route
if(method=="INVITE") {
if(uri=~"^sip:[0-9]{6}1[0-9]*{10}@") {forward(192.168.1.12,5060);
};
force_rport();
force_rtp_proxy();
}
I get dead air while asterisk logs show that my test message is playing. How should I proceed to debug this?
ScriptHead