<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi there everyone, I need help here. This is my 
ser.cfg file. Now i can use SJphone call to SJphone.</FONT></DIV>
<DIV><FONT face=Arial size=2>However, when i try to call from SJphone to my PSTN 
no, it is connected but i'm facing problem to hear the voice from the 
receiver.</FONT></DIV>
<DIV><FONT face=Arial size=2>Receiver also cant hear my voice. Is there anyone 
there who can give me a help. Thanks for everything.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Lee</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># $Id: nathelper.cfg,v 1.1.2.1 2003/11/24 
14:47:18 janakj Exp $<BR>#<BR># simple quick-start config script including 
nathelper support</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># This default script includes nathelper support. 
To make it work<BR># you will also have to install Maxim's RTP proxy. The proxy 
is enforced<BR># if one of the parties is behind a NAT.<BR>#<BR># If you have an 
endpoing in the public internet which is known to<BR># support symmetric RTP 
(Cisco PSTN gateway or voicemail, for example),<BR># then you don't have to 
force RTP proxy. If you don't want to enforce<BR># RTP proxy for some 
destinations than simply use t_relay() instead of<BR># route(1)<BR>#<BR># 
Sections marked with !! Nathelper contain modifications for nathelper<BR>#<BR># 
NOTE !! This config is EXPERIMENTAL !<BR>#<BR># ----------- global configuration 
parameters ------------------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>debug=7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level 
(cmd line: 
-dddddddddd)<BR>fork=yes<BR>port=5060<BR>log_stderror=yes&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# (cmd line: -E)<BR>fifo="/tmp/ser_fifo"<BR>#memlog=3</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Uncomment these lines to enter debugging 
mode<BR>/*<BR>debug=3<BR>fork=yes<BR>port=5060<BR>log_stderror=yes<BR>*/</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#check_via=no&nbsp;&nbsp; # (cmd. line: 
-v)<BR>#dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
(cmd. line: -r)<BR>#rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: 
-R)<BR>#children=4<BR>#fifo="/tmp/ser_fifo"<BR>#alias="sipproxy.com"<BR># 
------------------ module loading 
----------------------------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Uncomment this if you want to use SQL 
database<BR>loadmodule "/usr/local/lib/ser/modules/acc.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/mysql.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/sl.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/print.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/tm.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/rr.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/maxfwd.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/usrloc.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/registrar.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/textops.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/exec.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/group.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/group_radius.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/uri.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/uri_db.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/uri_radius.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/domain.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/auth.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/auth_radius.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/xlog.so"<BR>loadmodule 
"/usr/local/lib/ser/modules/nathelper.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/option.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/speeddial.so"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># ----------------- setting module-specific 
parameters ---------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#modparam("acc|auth_db|group|uri_db|usrloc", 
"db_url", "mysql://root:mysqldb04@localhost/ser")<BR>#modparam("usrloc", 
"db_url", 
"mysql://root:mysqldb04@localhost/ser")<BR>#---------------------------- 
use_domain setting<BR>#modparam("auth_db|group|uri_db|usrloc", "use_domain", 
1)<BR>#---------------------------- usrloc params<BR>#modparam("usrloc", 
"db_mode",&nbsp;&nbsp; 0)<BR># Uncomment this if you want to use SQL 
database<BR># for persistent storage and comment the previous 
line<BR>#modparam("usrloc", "db_mode", 2)<BR>#modparam("usrloc", 
"timer_interval", 60)<BR>#modparam("usrloc", "desc_time_order", 1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------&nbsp; auth 
params<BR>modparam("auth_radius", "radius_config", 
"/usr/local/etc/radiusclient-ng/radiusclient.conf")<BR>modparam("auth_radius", 
"service_type", 15)<BR>modparam("group_radius", "radius_config", 
"/usr/local/etc/radiusclient-ng/radiusclient.conf")<BR>modparam("group_radius", 
"use_domain", 1)<BR>#modparam("auth_db", "user_column", 
"user_id")<BR>#modparam("auth_db", "calculate_ha1", yes)<BR>#modparam("auth_db", 
"password_column", "password")</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>modparam("uri_radius", "radius_config", 
"/usr/local/etc/radiusclient-ng/radiusclient.conf")<BR>modparam("uri_radius", 
"service_type", 11)<BR>#-----------------------------accounting 
params<BR>modparam("acc", "log_level", 1)<BR>modparam("acc", "radius_flag", 
1)<BR>modparam("acc", "failed_transactions", 1)<BR>modparam("acc", "report_ack", 
1)<BR>modparam("acc", "report_cancels", 1)<BR>modparam("acc", "radius_config", 
"/usr/local/etc/radiusclient-ng/radiusclient.conf")<BR>#modparam("acc", 
"db_url", "mysql://ser:elanetw123@localhost/ser")<BR>#modparam("acc", 
"radius_log_flag", 1)<BR>modparam("acc", "radius_missed_flag", 2)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- tm 
params<BR>modparam("tm", "fr_timer", 12)<BR>modparam("tm", "fr_inv_timer", 
24)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#-----------------------------&nbsp; rr params<BR># 
add value to ;lr param to make some broken UAs happy<BR>modparam("rr", 
"enable_double_rr", 0)<BR>modparam("rr", "enable_full_lr", 1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- registrar 
params<BR>#modparam("registrar", "nat_flag", 6)<BR>#modparam("registrar", 
"min_expires", 60)<BR>#modparam("registrar", "max_expires", 
86400)<BR>#modparam("registrar", "default_expires", 
3600)<BR>#modparam("registrar", "desc_time_order", 1)<BR>#modparam("registrar", 
"append_branches", 1)<BR>#modparam("registrar", "use_domain", 1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- nathelper 
params<BR>modparam("nathelper", "natping_interval", 10) # Ping interval 30 
s<BR>modparam("nathelper", "ping_nated_only", 1)&nbsp;&nbsp; # Ping only clients 
behind NAT</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- exec 
params<BR>modparam("exec", "setvars", 1)<BR>modparam("exec", "time_to_kill", 
10)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- domain 
params<BR>#modparam("domain", "db_mode", 1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#----------------------------- Xlog 
params<BR>modparam("xlog", "buf_size", 8192)<BR># 
-------------------------&nbsp; request routing logic 
-------------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># main routing logic</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>route{</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# Sanity checks -- messages<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (!mf_process_maxfwd_header("10")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("483","Too Many 
Hops");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (msg:len &gt;=&nbsp; max_len 

{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("513", "Message 
Overflow");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial size=2>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# Option Section<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
------------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#if (search("^From: sip:sipsak@") 
&amp;&amp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (method=="OPTIONS") &amp;&amp; 
(!uri=~:"sip:.*[@]+.*")) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
option_reply();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (loose_route()) {t_relay(); 
break;};</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method=="BYE" || 
method=="CANCEL" || method=="INVITE") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setflag(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
log(1, "Accounting Flag ON\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (method=="INVITE") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
setflag(2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
log(1, "Missed Call Flag ON\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # !! 
Nathelper<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
-----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# NAT test Section<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
-----------------------------------------------------------<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (nat_uac_test("3")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (method == "REGISTER" ||(!search("^Record-Route:"))) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
log("LOG: Someone trying to register from private IP, 
rewriting\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact(); # Rewrite contact with source IP of signalling</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp; if (method == "REGISTER") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_register();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb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</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!method=="REGISTER") 
record_route();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (loose_route()) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# mark routing logic in 
request<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
append_hf("P-hint: 
rr-enforced\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
route(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uri=~"^sip:101*") 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewritehost("202.xxx.xx.xxx:5060");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_relay_to_udp("202.xxx.xx.xxx", 
"5060");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
forward(uri:host, uri:port);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf("p-hint:PSTN 
call\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
route(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!uri==myself) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# mark routing logic in 
request<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
append_hf("P-hint: 
outbound\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
route(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uri==myself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nbsp; route(1);</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR>}<BR>route[1]<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &amp;&amp; 
!search("^Route:")){<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sethostport("202.xxx.xx.xxx");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("479", "We don't forward to private IP 
addresses");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if client or server know to be 
behind a NAT, enable relay<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(isflagset(6)) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NAT processing of replies; 
apply to all transactions (for 
example,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # re-INVITEs from public 
to private UA are hard to identify 
as<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # NATed at the moment of 
request processing); look at 
replies<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; t_on_reply("1");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # send it out now; use stateful 
forwarding as it works reliably<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
even for UDP2TCP<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!t_relay()) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_reply_error();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<BR>}</DIV>
<DIV>&nbsp;</DIV>
<DIV># !! Nathelper<BR>onreply_route[1] {<BR>&nbsp;&nbsp;&nbsp; # NATed 
transaction ?<BR>&nbsp;&nbsp;&nbsp; if (isflagset(6) &amp;&amp; status =~ 
"(183)|2[0-9][0-9]") {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
force_rtp_proxy();<BR>&nbsp;&nbsp;&nbsp; } else if (nat_uac_test("1")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fix_nated_contact();<BR>&nbsp;&nbsp;&nbsp; };<BR>}</DIV>
<DIV></FONT>&nbsp;</DIV></BODY></HTML>