<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi list:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I am trying nathelper with rtpproxy in bridge mode , (rtpproxy
-l "61.61.61.1/192.168.5.1")</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT
size=2>UA1----------------------SER+Nathelprt+rtpproxy+NAT----------------------UA2</FONT></DIV>
<DIV><FONT
size=2>192.168.5.5
192.168.5.1 /
61.61.61.1
61.61.61.2</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>When UA1 call UA2 or UA2 call UA1</FONT></DIV>
<DIV><FONT size=2>the call can be established, and the voice can successfully be
relay to each UA</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>but ser shows some error message , </FONT><FONT
size=2></FONT></DIV>
<DIV><FONT size=2>ERROR: extract_body: message body has lenght zero</FONT></DIV>
<DIV><FONT size=2>ERROR: force_rtp_proxy2: can't extract body from the
message</FONT></DIV>
<DIV><FONT size=2>ERROR: on_reply processing failed</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>is this correct ??</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>My config file is the one that comes with the files, with the
appropiate changes:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
size=2> <BR>debug=3 # debug
level (cmd line:
-dddddddddd)<BR>#fork=no<BR>#log_stderror=no
# (cmd line:
-E)<BR>
<BR>
<BR>/* Uncomment these lines to enter debugging
mode<BR>fork=no<BR>log_stderror=yes<BR>*/<BR>
<BR>
<BR>check_via=no # (cmd. line:
-v)<BR>dns=no #
(cmd. line: -r)<BR>rev_dns=no # (cmd. line:
-R)<BR>port=5060<BR>children=4<BR>fifo="/tmp/ser_fifo"<BR>
<BR>
<BR>loadmodule "/usr/lib/ser/modules/sl.so"<BR>loadmodule
"/usr/lib/ser/modules/tm.so"<BR>loadmodule
"/usr/lib/ser/modules/rr.so"<BR>loadmodule
"/usr/lib/ser/modules/maxfwd.so"<BR>loadmodule
"/usr/lib/ser/modules/usrloc.so"<BR>loadmodule
"/usr/lib/ser/modules/registrar.so"<BR>loadmodule
"/usr/lib/ser/modules/textops.so"<BR>loadmodule
"/usr/lib/ser/modules/nathelper.so"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>modparam("usrloc", "db_mode", 0)<BR>modparam("rr",
"enable_full_lr", 1)<BR>modparam("registrar", "nat_flag",
6)<BR>modparam("nathelper", "natping_interval", 30) # Ping interval 30
s<BR>modparam("nathelper", "ping_nated_only", 1) # Ping only clients
behind NAT</FONT></DIV>
<DIV> </DIV>
<DIV><FONT
size=2>route{<BR>
<BR>
<BR> # initial sanity checks --
messages with<BR> # max_forwards==0,
or excessively long requests<BR> if
(!mf_process_maxfwd_header("10"))
{<BR>
sl_send_reply("483","Too Many
Hops");<BR>
break;<BR>
};<BR> if (msg:len >= max_len
)
{<BR>
sl_send_reply("513", "Message too
big");<BR>
break;<BR>
};<BR>
<BR>
<BR> # !!
Nathelper<BR> # Special handling for
NATed clients; first, NAT test is<BR>
# executed: it looks for via!=received and RFC1918
addresses<BR> # in Contact (may fail
if line-folding is used); also,<BR> #
the received test should, if completed, should check
all<BR> # vias for rpesence of
received<BR> if (nat_uac_test("3"))
{<BR>
# Allow RR-ed requests, as these may indicate
that<BR>
# a NAT-enabled proxy takes care of it; unless it
is<BR>
# a
REGISTER<BR>
if (method == "REGISTER" || ! search("^Record-Route:"))
{<BR>
log("LOG: Someone trying to register from private IP,
rewriting\n");<BR>
<BR>
<BR>
# This will work only for user agents that support
symmetric<BR>
# communication. We tested quite many of them and majority
is<BR>
# smart enough to be symmetric. In some phones it takes a
configuration<BR>
# option. With Cisco 7960, it is called NAT_Enable=Yes, with kphone it
is<BR>
# called "symmetric media" and "symmetric
signalling".<BR>
<BR>
<BR>
fix_nated_contact(); # Rewrite contact with source IP of
signalling<BR>
if (method == "INVITE")
{<BR>
fix_nated_sdp("1"); # Add direction=active to
SDP<BR>
};<BR>
force_rport(); # Add rport parameter to topmost
Via<BR>
setflag(6); # Mark as
NATed<BR>
};<BR>
};<BR>
<BR>
<BR> # we record-route all messages --
to make sure that<BR> # subsequent
messages will go through our proxy;
that's<BR> # particularly good if
upstream and downstream entities<BR> #
use different transport protocol<BR>
if (!method=="REGISTER")
record_route();<BR>
<BR>
<BR> # subsequent messages withing a
dialog should take the<BR> # path
determined by record-routing<BR> if
(loose_route())
{<BR>
# mark routing logic in
request<BR>
append_hf("P-hint:
rr-enforced\r\n");<BR>
route(1);<BR>
break;<BR> };<BR>if (!uri==myself)
{<BR>
# mark routing logic in
request<BR>
append_hf("P-hint:
outbound\r\n");<BR>
route(1);<BR>
break;<BR>
};<BR>
<BR>
<BR> # if the request is for other
domain use UsrLoc<BR> # (in case, it
does not work, use the following
command<BR> # with proper names and
addresses in it)<BR> if (uri==myself)
{<BR>
<BR>
<BR>
if (method=="REGISTER")
{<BR>
<BR>
<BR># Uncomment this if you want to use digest
authentication<BR>#
if (!www_authorize("iptel.org", "subscriber"))
{<BR>#
www_challenge("iptel.org",
"0");<BR>#
break;<BR>#
};<BR>
<BR>
<BR>
save("location");<BR>
break;<BR>
};<BR>
<BR>
<BR>
lookup("aliases");<BR>
if (!uri==myself)
{<BR>
append_hf("P-hint: outbound
alias\r\n");<BR>
route(1);<BR>
break;<BR>
};<BR>
# native SIP destinations are handled using our USRLOC
DB<BR>
if (!lookup("location"))
{<BR>
sl_send_reply("404", "Not
Found");<BR>
break;<BR>
};<BR>
};<BR> append_hf("P-hint: usrloc
applied\r\n");<BR>
route(1);<BR>}<BR>
<BR>
<BR>route[1]<BR>{<BR> # !!
Nathelper<BR> #if
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &&
!search("^Route:")){<BR>
# sl_send_reply("479", "We don't forward to private IP
addresses");<BR> #
break;<BR>
#};<BR>
<BR>
<BR> # if client or server know to be
behind a NAT, enable relay<BR> if
(isflagset(6))
{<BR>
force_rtp_proxy();<BR>
};<BR>
<BR>
<BR> # NAT processing of replies;
apply to all transactions (for
example,<BR> # re-INVITEs from public
to private UA are hard to identify
as<BR> # NATed at the moment of
request processing); look at
replies<BR>
t_on_reply("1");<BR>
<BR>
<BR> # send it out now; use stateful
forwarding as it works reliably<BR> #
even for UDP2TCP<BR> if (!t_relay())
{<BR>
sl_reply_error();<BR>
};<BR>}<BR>
<BR>
<BR># !! Nathelper<BR>onreply_route[1] {<BR> # NATed
transaction ?<BR> if (isflagset(6) && status =~
"(183)|2[0-9][0-9]") {<BR>
fix_nated_contact();<BR>
force_rtp_proxy();<BR> # otherwise, is it a transaction behind
a NAT and we did not<BR> # know at time of request processing
? (RFC1918 contacts)<BR> } else if (nat_uac_test("1"))
{<BR>
fix_nated_contact();<BR> };<BR>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Is something wrong? or it is just a warning
message?</FONT></DIV>
<DIV><FONT size=2>Thanks in advance</FONT></DIV>
<DIV><FONT size=2>Jimmy</FONT></DIV>
<DIV><FONT size=2><BR></FONT></DIV>
<DIV><FONT size=2><I><FONT
size=3><BR></FONT></I> </DIV></FONT></BODY></HTML>