<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>I config a OP with public IP.And I encount a problem.Two UAs
can't invite each other from a same OP.</FONT></DIV>
<DIV><FONT size=2>ua1(private
ip)--->nat--->OP1---->register1</FONT></DIV>
<DIV><FONT size=2>ua2(public ip)----->OP1-->register1</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>ua1---invite---->OP1</FONT></DIV>
<DIV><FONT size=2>When ua1 invite ua2,OP1 return 483.The same from ua2 to
ua1.</FONT></DIV>
<DIV><FONT size=2>What's wrong? Is my configure file something
wrong? Can somebody here help me? </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>#<BR># $Id: ser.cfg,v 1.24 2003/11/11 15:32:36 andrei Exp
$<BR>#<BR># simple quick-start config script<BR>#</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2># ----------- global configuration parameters
------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>#debug=3 #
debug level (cmd line: -dddddddddd)<BR>#fork=yes<BR>#log_stderror=no # (cmd
line: -E)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>/* Uncomment these lines to enter debugging mode
<BR>*/<BR>#log_stderror=yes<BR>#debug=4<BR>debug
=3<BR>fork=yes<BR>log_stderror=yes <BR>check_via=no # (cmd. line:
-v)<BR>dns=no #
(cmd. line: -r)<BR>rev_dns=no # (cmd. line:
-R)<BR>port=5070<BR>listen="222.44.22.60"<BR>children=4<BR>fifo="/tmp/ser_fifo"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2># ------------------ module loading
----------------------------------</FONT></DIV>
<DIV> </DIV><FONT size=2>
<DIV><BR>loadmodule "/home/ser-0.9.3/modules/sl/sl.so"<BR>loadmodule
"/home/ser-0.9.3/modules/tm/tm.so"<BR>loadmodule
"/home/ser-0.9.3/modules/rr/rr.so"<BR>loadmodule
"/home/ser-0.9.3/modules/maxfwd/maxfwd.so"<BR>loadmodule
"/home/ser-0.9.3/modules/usrloc/usrloc.so"<BR>loadmodule
"/home/ser-0.9.3/modules/textops/textops.so"<BR>loadmodule
"/home/ser-0.9.3/modules/nathelper/nathelper.so"<BR>loadmodule
"/home/ser-0.9.3/modules/uri/uri.so"</DIV>
<DIV> </DIV>
<DIV># ----------------- setting module-specific parameters
---------------</DIV>
<DIV> </DIV>
<DIV># -- usrloc params --</DIV>
<DIV> </DIV>
<DIV>modparam("usrloc", "db_mode", 0)</DIV>
<DIV> </DIV>
<DIV>modparam("nathelper", "natping_interval", 30) # Ping interval 30
s<BR>modparam("nathelper", "ping_nated_only", 1) # Ping only clients
behind NAT<BR>modparam("nathelper", "rtpproxy_sock",
"/var/run/rtpproxy.sock")</DIV>
<DIV> </DIV>
<DIV>modparam("rr", "enable_full_lr", 1)</DIV>
<DIV> </DIV>
<DIV># ------------------------- request routing logic
-------------------</DIV>
<DIV> </DIV>
<DIV>route{</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Sanity Check Section<BR> #
-----------------------------------------------------------------<BR>
if (!mf_process_maxfwd_header("10"))
{<BR>
sl_send_reply("483", "Too Many
Hops");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (msg:len > max_len)
{<BR>
sl_send_reply("513", "Message
Overflow");<BR>
break;<BR>
};<BR>
#---------------<BR> if (method == "REGISTER" || !
search("^Record-Route:"))<BR>
{<BR> append_hf("Alex-hint:
NAThelper\r\n");<BR> fix_nated_register();<BR> fix_nated_contact();</DIV>
<DIV> </DIV>
<DIV> if (method == "INVITE")
<BR> {<BR>
append_hf("Alex-hint: SDP
rewritten\r\n");<BR>
force_rtp_proxy();<BR>
};<BR> force_rport();
<BR> setflag(6);<BR>
};<BR>
#---------------<BR> #
-----------------------------------------------------------------<BR>
# Record Route Section<BR> #
-----------------------------------------------------------------<BR> if(method
!=
"REGISTER")<BR> {<BR> record_route();<BR> };</DIV>
<DIV> </DIV>
<DIV> if (method=="BYE" ||
method=="CANCEL")
{<BR>
unforce_rtp_proxy();<BR> } </DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Loose Route Section<BR> #
-----------------------------------------------------------------<BR>
if (loose_route()) {</DIV>
<DIV> </DIV>
<DIV>
if (has_totag() && (method=="INVITE" || method=="ACK"))
{<BR>
if (nat_uac_test("19"))
{<BR>
setflag(6);<BR>
force_rport();<BR>
};<BR>
force_rtp_proxy("l");<BR>
};<BR> append_hf("Alex-hint: Loose Route\r\n");</DIV>
<DIV> </DIV>
<DIV>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Call Type Processing Section<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (uri==myself) {</DIV>
<DIV> </DIV>
<DIV>
if (method=="CANCEL")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="INVITE")
{<BR>
route(3);<BR>
break;<BR>
} else if (method=="REGISTER")
{<BR>
route(2);<BR>
break;<BR>
};</DIV>
<DIV> </DIV>
<DIV>
if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR>
};<BR> };</DIV>
<DIV> </DIV>
<DIV> route(1);<BR>}</DIV>
<DIV> </DIV>
<DIV>route[1] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# Default Message Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> t_on_reply("1");</DIV>
<DIV> </DIV>
<DIV> if (!t_relay())
{<BR>
if (method=="INVITE" && isflagset(6))
{<BR>
unforce_rtp_proxy();<BR>
};<BR>
sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>route[2] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# REGISTER Message Handler<BR> #
----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (!search("^Contact:\ +\*")
&& nat_uac_test("19"))
{<BR>
setflag(6);<BR>
fix_nated_register();<BR>
force_rport();<BR> };</DIV>
<DIV> </DIV>
<DIV> sl_send_reply("100",
"Trying");<BR>}</DIV>
<DIV> </DIV>
<DIV>route[3] {</DIV>
<DIV> </DIV>
<DIV> #
-----------------------------------------------------------------<BR>
# CANCEL and INVITE Message
Handler<BR> #
-----------------------------------------------------------------</DIV>
<DIV> </DIV>
<DIV> if (nat_uac_test("19"))
{<BR>
setflag(6);<BR> };</DIV>
<DIV> </DIV>
<DIV> if (uri!=myself)
{<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (isflagset(6))
{<BR>
force_rport();<BR>
#fix_nated_contact();<BR>
force_rtp_proxy();<BR> };</DIV>
<DIV> </DIV>
<DIV> t_on_reply("1");</DIV>
<DIV> </DIV>
<DIV> if (!t_relay())
{<BR>
if(isflagset(6))
{<BR>
unforce_rtp_proxy();<BR>
}<BR>
sl_reply_error();<BR> };<BR>}</DIV>
<DIV> </DIV>
<DIV>onreply_route[1] {</DIV>
<DIV> </DIV>
<DIV> if (isflagset(6) || status=~"(180)|(183)|2[0-9][0-9]")
{<BR> if (!search("^Content-Length:\ +0"))
{<BR> force_rtp_proxy();</DIV>
<DIV> </DIV>
<DIV> append_hf("NAT:
1\r\n");<BR> };<BR> };<BR>}<BR></FONT></DIV></BODY></HTML>