Dear Bogdan,<br><br>Thanks you for your spending time on this.<br><br>It works like a charm :)<br><br>Thanks and Regards,<br>-LN<br><br><div class="gmail_quote">On Thu, Apr 2, 2009 at 5:42 PM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br>
<br>
even if this was already discussed on the #opensips IRC channel, for the sake of completion:<br>
<br>
The 400 Bad request was because of the malformed SDP - some bogus space were inserted while nathelper did some changes. This is an old bug and it was fixed starting wit 1.4.2.<br>
<br>
In this report 1.4.1 was used, so upgrading to 1.4.5 should solve the problem.<div class="im"><br>
<br>
Regards,<br>
Bogdan<br>
<br>
oso che bol wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear Bogdan,<br>
<br><div><div></div><div class="h5">
I meet the issues of callee reply "400 - bad request"<br>
<br>
Attach is my trace from opensips server.<br>
<br>
Bellow is my configure of Opensips. Please take a time for my issues:<br>
<br>
route {<br>
log(1, "----------------------------------------------------------------------------------");<br>
log(1, " ENTER MAIN LOOP\n");<br>
log(1, "----------------------------------------------------------------------------------");<br>
#---------<br>
#Sanity Check<br>
#-------------<br>
if (!mf_process_maxfwd_header("10")) {<br>
sl_send_reply("483","Too Many Hops");<br>
exit;<br>
};<br>
if ( msg:len >= max_len ) {<br>
sl_send_reply("513", "Message too big");<br>
exit;<br>
}<br>
#--------------------------------------<br>
#Record-Route all messages<br>
#-- to make sure subsequent messages will go through our proxy<br>
#--------------------------------------<br>
if (method!="REGISTER") {<br>
record_route();<br>
}<br>
#-------------------------------<br>
# Loose-Route<br>
#-------------------------------<br>
if (loose_route()) {<br>
append_hf("P-hint: rr-enforced\r\n");<br>
route(1);<br>
exit;<br>
}<br>
#--------------------------------<br>
# uri != myself<br>
#--------------------------------------<br>
if (uri!=myself) {<br>
append_hf("P-hint: Outbound\r\n");<br>
route(1);<br>
exit;<br>
}<br>
#----------------------------------<br>
# uri==myself<br>
#--------------------------------<br>
if (uri==myself) {<br>
if (method=="REGISTER") {<br>
if (nat_uac_test("19")) {<br>
setbflag(6);<br>
force_rport();<br>
fix_nated_register();<br>
}<br>
sl_send_reply("100", " Trying\r\n");<br>
#AUTHENTICATE<br>
if(!www_authorize("174.132.X.Y", "subscriber")) {<br>
www_challenge("174.132.X.Y", "0");<br>
exit;<br>
}<br>
consume_credentials();<br>
save("location");<br>
exit;<br>
}<br>
lookup("aliases");<br>
if (uri!=myself) {<br>
append_hf("P-hint: outbound alias\r\n");<br>
route(1);<br>
exit;<br>
}<br>
if (!lookup("location")) {<br>
sl_send_reply("404", " Not Found");<br>
exit;<br>
}<br>
} #End uri==myself<br>
#<br>
#<br>
#<br>
if (method=="INVITE") {<br>
t_on_failure("1");<br>
} else if (method=="BYE" || method=="CANCEL") {<br>
unforce_rtp_proxy();<br>
}<br>
#---------------------------------------------------------------------<br>
# LOOSE_ROUTE - INVITE - FORCE_RTP_PROXY<br>
#-----------------------------------------------------------------------<br>
if (loose_route()) {<br>
if (method=="INVITE" || method=="ACK") {<br>
append_hf("P-hint:- LOOSE ROUTE - Relay re-INVITE + FORCE_RTP_PROXY\r\n");<br>
force_rtp_proxy();<br>
}<br>
# t-relay()<br>
t_relay();<br>
exit;<br>
}<br>
#-----------------------------------------------------------------------<br>
#NAT - fix_nated_contact()<br>
#------------------------------------------------------------------------<br>
if (nat_uac_test("19") && !search("^Record-Route:")) {<br>
append_hf("P-hint: Fix nated contact\r\n");<br>
force_rport();<br>
fix_nated_contact();<br>
}<br>
if (method=="INVITE") {<br>
append_hf("P-hint: INVITE go to on_reply_route[1]\r\n");<br>
t_on_reply("1");<br>
}<br>
if (method=="INVITE" || method=="ACK") {<br>
append_hf("P-hint: INVITE||ACK + FORCE_RTP_PROXY\r\n");<br>
force_rtp_proxy();<br>
}<br>
if (!t_relay()) {<br>
append_hf("P-hint: INVITE||ACK - UNFORCE_RTP_PROXY\r\n");<br>
if (method=="INVITE" || method=="ACK") {<br>
unforce_rtp_proxy();<br>
}<br>
sl_reply_error();<br>
}<br>
append_hf("P-hint: usrloc applied\r\n");<br>
<br>
}<br>
<br>
route[1] {<br>
append_hf("P-hint:Route[1] Processing\r\n");<br>
if (!t_relay()) {<br>
sl_reply_error();<br>
}<br>
}<br>
<br>
failure_route[1] {<br>
unforce_rtp_proxy();<br>
}<br>
<br>
onreply_route[1] {<br>
append_hf("P-hint: On_reply_route[1] processing\r\n");<br>
if (status=~"(180)|(183)|2[0-9][0-9]") {<br>
if (nat_uac_test("1")) {<br>
fix_nated_contact();<br>
}<br>
force_rtp_proxy();<br>
}<br>
}<br>
<br>
Thanks and Regards,<br>
-LN<br></div></div><div class="im">
On Wed, Apr 1, 2009 at 5:46 PM, Bogdan-Andrei Iancu <<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>> wrote:<br>
<br>
Hi,<br>
<br></div><div class="im">
risntance is just an URI parameter and from server pov it is<br>
opaque - has no meaning. It is exclusively used by phone (X-lite).<br>
Tipically such param is used by phones that register multiple<br>
accounts, in order to make distinction between the accounts (as<br>
for all of them , the IP and port from contact will be the same).<br>
<br>
To see why the call is drop, you need to take a sip trace (use<br>
ngrep) to see the signalling on the proxy.<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<br>
<br>
oso che bol wrote:<br>
<br>
Dear Bogdan,<br>
<br>
Regarding about old question, could you please tell me why:<br>
- Contact of Mobile: sip:8000@212.15.B.C:1120<br>
- Contact of X-Lite:<br>
sip:6000@58.186.Y.Z:14553;rinstance=abb597b601e7398b<br>
<br>
What is rinstance and does it impact to the call. I make call<br>
from Mobile (SJPhone on winCE) to X-Lite and after 32s, it<br>
drop call. Both UAs behind NAT.<br>
<br>
But, x-lite --to/from -- x-lite: call successful, no drop.<br>
<br>
Thanks,<br>
-LN<br>
<br>
On Tue, Mar 31, 2009 at 11:09 PM, oso che bol<br>
<<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a> <mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a>><br></div><div class="im">
<mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a> <mailto:<a href="mailto:ndlgroup1@gmail.com" target="_blank">ndlgroup1@gmail.com</a>>>> wrote:<br>
<br>
Dear Bogdan,<br>
<br>
Thanks very much for your time.<br>
<br>
Regards,<br>
-LN<br>
<br>
<br>
On Tue, Mar 31, 2009 at 8:53 PM, Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br></div><div><div></div>
<div class="h5">
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>> wrote:<br>
<br>
Please use fix_nated_register() for REGISTER requests -<br>
this<br>
will set the appropriate info to be saved in usrloc.<br>
<br>
fix_nated_register() is not changing the contact (so the<br>
usrloc will save the real contact), but is just setting<br>
some<br>
additional info to be saved in usrloc (the received field)<br>
<br>
fix_nated_contact() is actually changing the contact<br>
from the<br>
request - this is to be used for non-REGISTER requests.<br>
<br>
<br>
Regards,<br>
Bogdan<br>
<br>
oso che bol wrote:<br>
<br>
<br>
Dear Bogdan<br>
<br>
I change the config of NATed REGISTER request to:<br>
<br>
/ if (nat_uac_test("19")) {<br>
if (is_method("REGISTER") ||<br>
!search("^Record-Route")) {<br>
log("LOG: Someone trying to register from<br>
private IP, rewriting\n");<br>
fix_nated_contact(); # Rewrite contact with<br>
source IP of signalling<br>
force_rport(); # Add rport parameter to<br>
topmost Via<br>
setbflag(6); # Mark as NATed<br>
if (method=="INVITE") {<br>
fix_nated_sdp("1"); # Add<br>
direction=active to SDP<br>
force_rport(); # Add rport parameter to<br>
topmost Via<br>
setbflag(6); # Mark as NATed<br>
};<br>
};/<br>
<br>
Output of "opensipsctl ul show":<br>
<br>
/[root@LN]# opensipsctl ul show<br>
database engine 'MYSQL' loaded<br>
Control engine 'FIFO' loaded<br>
entering fifo_cmd ul_dump<br>
Mar 31 07:17:27 [6412] DBG:mi_fifo:mi_parse_node:<br>
end of<br>
input tree<br>
Mar 31 07:17:27 [6412] DBG:mi_fifo:mi_fifo_server: done<br>
parsing the mi tree<br>
Domain:: aliases table=512 records=0 max_slot=0<br>
Domain:: location table=512 records=2 max_slot=1<br>
AOR:: 5000<br>
Contact::<br>
sip:5000@77.69.220.94:5060;transport=UDP Q=<br>
Expires:: 1038<br>
Callid:: A9AOj5F5oIeDS04U53IMr4_65zZvf5<br>
Cseq:: 6049<br>
User-agent:: E66-1 RM-343 102.07.81<br>
State:: CS_SYNC<br>
Flags:: 0<br>
Cflag:: 64<br>
Socket:: udp:174.132.X.Y:5060<br>
Methods:: 4294967295<br>
AOR:: 6000<br>
Contact::<br>
sip:6000@58.186.156.135:11370;rinstance=dbe921dccef4bee4 Q=<br>
Expires:: 1060<br>
Callid::<br>
MDdmOTVkNzAzODAxN2JiMjk0MTk1NTEwNThjOWE2ZTM.<br>
Cseq:: 6<br>
User-agent:: X-Lite release 1100l stamp<br>
47546<br>
State:: CS_SYNC<br>
Flags:: 0<br>
Cflag:: 64<br>
Socket:: udp:174.132.X.Y:5060<br>
Methods:: 5951<br>
FIFO command was:<br>
:ul_dump:opensips_receiver_6568/<br>
<br>
Could you please explain why with mobile user 5000, the<br>
contact /sip:5000@77.69.220.94:5060;transport=UDP /and<br>
with X-Lite User 6000 the contact is<br>
/6000@58.186.156.135:11370;rinstance=dbe921dccef4bee4/<br>
<br>
How fix_nated_register() differ with<br>
fix_nated_register(),<br>
do we need to call fix_nated_register() at REGISTER<br>
processing?<br>
<br>
Thanks and Regards,<br>
<br>
-LN<br>
<br>
On Tue, Mar 31, 2009 at 6:19 PM, Bogdan-Andrei Iancu<br>
<<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>> <mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a><br>
<mailto:<a href="mailto:bogdan@voice-system.ro" target="_blank">bogdan@voice-system.ro</a>>>>> wrote:<br>
<br>
Hi,<br>
<br>
if the online-user info is correct, it looks<br>
like the<br>
fix_nated_register() is not done.<br>
<br>
Please post the output of "opensipsctl ul show", for<br>
that specific<br>
user.<br>
<br>
Also test by using xlog if the at register time your<br>
processing<br>
gets inside the "if (!search("^Contact:[ ]*\*") &&<br>
nat_uac_test("19")) {".<br>
<br>
Regards,<br>
Bogdan<br>
<br>
oso che bol wrote:<br>
<br>
Dear All,<br>
<br>
I use Opensips 1.4.1 with rtpproxy 1.2 for<br>
NAT support.<br>
<br>
I use X-Lite which is Behind NAT, register to<br>
OpenSIPs proxy,<br>
Opensips store right contact address. But,<br>
when i<br>
use Nokia<br>
E66 to register to Opensips, the contact<br>
address is<br>
bellow:<br>
Online SIP Users<br>
Username Domain Contact Expires User Agent<br>
5000 *<a href="mailto:sip%3A5000@192.168.1.100" target="_blank">sip:5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a>><br>
<mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>>><br>
<mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>>>><br>
<mailto:<a href="mailto:sip%253A5000@192.168.1.100" target="_blank">sip%3A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a>><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>>><br>
<mailto:<a href="mailto:sip%25253A5000@192.168.1.100" target="_blank">sip%253A5000@192.168.1.100</a><br>
<mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a>><br>
<mailto:<a href="mailto:sip%2525253A5000@192.168.1.100" target="_blank">sip%25253A5000@192.168.1.100</a><br></div></div>
<mailto:<a href="mailto:sip%252525253A5000@192.168.1.100" target="_blank">sip%2525253A5000@192.168.1.100</a>>>>>;transport=UDP*<div class="im"><br>
<br>
2009-03-30<br>
<br>
07:20:24.0 E66-1 RM-343 102.07.81<br>
<br>
<br>
User 5000 do not store with external IP<br>
address of its<br>
(external address not 192.168.1.100). Do you<br>
have<br>
any ideas<br>
about this?<br>
<br>
Bellow is my Opensips.conf<br>
<br>
Thanks and Regards,<br>
<br>
-LN<br>
<br>
Opensips.conf<br>
<br>
</div></blockquote>
<br>
</blockquote></div><br>