<!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> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Lee</FONT></DIV>
<DIV> </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> </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> </DIV>
<DIV><FONT face=Arial
size=2>debug=7 # debug level
(cmd line:
-dddddddddd)<BR>fork=yes<BR>port=5060<BR>log_stderror=yes
# (cmd line: -E)<BR>fifo="/tmp/ser_fifo"<BR>#memlog=3</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2>#check_via=no # (cmd. line:
-v)<BR>#dns=no #
(cmd. line: -r)<BR>#rev_dns=no # (cmd. line:
-R)<BR>#children=4<BR>#fifo="/tmp/ser_fifo"<BR>#alias="sipproxy.com"<BR>#
------------------ module loading
----------------------------------</FONT></DIV>
<DIV> </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> </DIV>
<DIV><FONT face=Arial size=2># ----------------- setting module-specific
parameters ---------------</FONT></DIV>
<DIV> </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", 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> </DIV>
<DIV><FONT face=Arial size=2>#---------------------------- 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> </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> </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> </DIV>
<DIV><FONT face=Arial size=2>#----------------------------- 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> </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> </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) # Ping only clients
behind NAT</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#----------------------------- exec
params<BR>modparam("exec", "setvars", 1)<BR>modparam("exec", "time_to_kill",
10)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#----------------------------- domain
params<BR>#modparam("domain", "db_mode", 1)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>#----------------------------- Xlog
params<BR>modparam("xlog", "buf_size", 8192)<BR>#
------------------------- request routing logic
-------------------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2># main routing logic</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>route{</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> #
------------------------------------------------------------<BR>
# Sanity checks -- messages<BR> #
------------------------------------------------------------<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
Overflow");<BR>
break;<BR> };</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR> #
------------------------------------------------------------<BR>
# Option Section<BR> #
------------------------------------------------------------<BR>
#if (search("^From: sip:sipsak@")
&&<BR>
# (method=="OPTIONS") &&
(!uri=~:"sip:.*[@]+.*")) {<BR>
#
option_reply();<BR>
#
break;<BR>
#};<BR> if (loose_route()) {t_relay();
break;};</DIV>
<DIV> </DIV>
<DIV><BR> if (method=="BYE" ||
method=="CANCEL" || method=="INVITE")
{<BR>
setflag(1);<BR>
log(1, "Accounting Flag ON\n");<BR>
};</DIV>
<DIV> </DIV>
<DIV> if (method=="INVITE")
{<BR>
setflag(2);<BR>
log(1, "Missed Call Flag ON\n");<BR>
};</DIV>
<DIV> </DIV>
<DIV><BR> # !!
Nathelper<BR> #
-----------------------------------------------------------<BR>
# NAT test Section<BR> #
-----------------------------------------------------------<BR>
if (nat_uac_test("3"))
{<BR>
if (method == "REGISTER" ||(!search("^Record-Route:")))
{<BR>
log("LOG: Someone trying to register from private IP,
rewriting\n");<BR>
fix_nated_contact(); # Rewrite contact with source IP of signalling</DIV>
<DIV> </DIV>
<DIV>
# if (method == "REGISTER")
{<BR>
#
fix_nated_register();<BR>
# }
else<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> };</DIV>
<DIV> </DIV>
<DIV> if (!method=="REGISTER")
record_route();<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> };</DIV>
<DIV> </DIV>
<DIV> if (uri=~"^sip:101*")
{<BR>
rewritehost("202.xxx.xx.xxx:5060");<BR>
# t_relay_to_udp("202.xxx.xx.xxx",
"5060");<BR>
forward(uri:host, uri:port);<BR>
# append_hf("p-hint:PSTN
call\r\n");<BR>
#
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> if (!uri==myself)
{<BR>
# mark routing logic in
request<BR>
append_hf("P-hint:
outbound\r\n");<BR>
route(1);<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> if (uri==myself)
{<BR>
if (method=="REGISTER") {<BR>
# log(1, "REGISTER: Authenticating
user\n");<BR>
if (!radius_proxy_authorize(""))
{<BR>
# log(1, "REGISTER: challenging
user\n");<BR>
proxy_challenge("",
"1");<BR>
break;<BR>
};<BR>
save("location");<BR>
break;<BR>
};</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> #if (method=="INVITE")
{<BR>
# log(1,
"INVITE\n");<BR>
#
setflag(1);<BR>
#rad_acc_request("Start");<BR>
#};<BR> #if (method=="MESSAGE")
{<BR>
# log(1,
"MESSAGE\n");<BR>
#setflag(1);<BR> #};</DIV>
<DIV> </DIV>
<DIV> #if (method=="BYE" ||
method=="CANCEL") {<BR>
# log (1, "BYE or
CANCEL\N");<BR>
#
setflag(1);<BR>
#rad_acc_request("Stop");<BR>
#};</DIV>
<DIV> </DIV>
<DIV>
lookup("aliases");<BR>
if (!uri==myself)
{<BR>
append_hf("P-hint: outbound
alias\r\n");<BR>
route(1);<BR>
break;<BR>
};</DIV>
<DIV> </DIV>
<DIV>
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);</DIV>
<DIV> </DIV>
<DIV><BR>}<BR>route[1]<BR>{<BR> if
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &&
!search("^Route:")){<BR>
sethostport("202.xxx.xx.xxx");<BR>
sl_send_reply("479", "We don't forward to private IP
addresses");<BR>
break;<BR> };</DIV>
<DIV> </DIV>
<DIV> # if client or server know to be
behind a NAT, enable relay<BR> if
(isflagset(6))
{<BR>
force_rtp_proxy();<BR> };</DIV>
<DIV> </DIV>
<DIV> # 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");</DIV>
<DIV> </DIV>
<DIV> # 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>}</DIV>
<DIV> </DIV>
<DIV># !! 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> } else if (nat_uac_test("1"))
{<BR>
fix_nated_contact();<BR> };<BR>}</DIV>
<DIV></FONT> </DIV></BODY></HTML>