<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-9">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I've created users beginning with 833 and 834 
prefix, my aim is whenever a user needs to call numbers not beginning with 833 
or 834 prefix the call will be directed to 212.154.32.154. It was working before 
but so many broken things and especially bad voice quality, now voice works 
great with below config and doing port forwarding for 5060 udp and tcp in UA's 
gateways a SIP2SIP call is possible without sucking SER's bandwidth, when i 
uncomment the lines ser does not work and don't know why.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>It was working before but since i've downloaded 
newer SER.CFG it doesn't work for me and i'm still a newbie.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if 
(uri==myself) {</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&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; 
# if (!(uri=~"sip:(833)|(834)")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

t_relay_to_udp("212.154.32.154","5060");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
save("location");<BR>&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};</FONT></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My complete SER.CFG as follows;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#<BR># $Id: ser.cfg,v 1.27 2005/03/10 14:16:25 
andrei Exp $<BR>#<BR># simple quick-start config script<BR>#</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># ----------- global configuration parameters 
------------------------</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level 
(cmd line: 
-dddddddddd)<BR>#fork=yes<BR>#log_stderror=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# (cmd line: -E)<BR>#memlog=5 # memory debug log 
level<BR>#log_facility=LOG_LOCAL0 # sets the facility used for logging (see 
syslog(3))</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>/* Uncomment these lines to enter debugging 
mode<BR>fork=no<BR>log_stderror=yes<BR>*/</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>check_via=no&nbsp;&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>#port=5060<BR>#children=4<BR>fifo="/tmp/ser_fifo"<BR>#user=ser<BR>#group=ser<BR>#fifo_user=ser 
# owner of the ser fifo<BR>#fifo_group=ser<BR>#fifo_mode=0660 # fifo's 
permissions<BR>#disable_core=yes #disables core dumping<BR>#open_fd_limit=1024 # 
sets the open file descriptors limit<BR>#mhomed=yes&nbsp; # usefull for 
multihomed hosts, small performance 
penalty<BR>#disable_tcp=yes<BR>#tcp_accept_aliases=yes # accepts the tcp alias 
via option (see NEWS)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>#</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># ------------------ 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/mysql.so"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>loadmodule 
"/usr/local/lib/ser/modules/sl.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"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Uncomment this if you want digest 
authentication<BR># mysql.so must be loaded !<BR>#loadmodule 
"/usr/local/lib/ser/modules/auth.so"<BR>#loadmodule 
"/usr/local/lib/ser/modules/auth_db.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># -- usrloc params --</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>modparam("usrloc", "db_mode",&nbsp;&nbsp; 
0)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Uncomment this if you want to use SQL 
database<BR># for persistent storage and comment the previous 
line<BR>#modparam("usrloc", "db_mode", 2)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># -- auth params --<BR># Uncomment if you are using 
auth module<BR>#<BR>#modparam("auth_db", "calculate_ha1", yes)<BR>#<BR># If you 
set "calculate_ha1" parameter to yes (which true in this config),<BR># uncomment 
also the following parameter)<BR>#<BR>#modparam("auth_db", "password_column", 
"password")</FONT></DIV>
<DIV>&nbsp;</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_full_lr", 1)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># -------------------------&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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
initial sanity checks -- messages 
with<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # max_forwards==0, or 
excessively long requests<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 too 
big");<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>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # we 
record-route all messages -- to make sure 
that<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # subsequent messages will go 
through our proxy; that's<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
particularly good if upstream and downstream 
entities<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # use different transport 
protocol<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!method=="REGISTER") 
record_route();</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
subsequent messages withing a dialog should take 
the<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # path determined by 
record-routing<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; };</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&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; };</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if the 
request is for other domain use 
UsrLoc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (in case, it does not 
work, use the following command<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
with proper names and addresses in 
it)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (uri==myself) 
{</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&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; 
# if (!(uri=~"sip:(833)|(834)")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

t_relay_to_udp("212.154.32.154","5060");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
# native SIP destinations are handled using our USRLOC 
DB<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
if (!lookup("location")) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sl_send_reply("404", "Not 
Found");<BR>&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; append_hf("P-hint: usrloc 
applied\r\n");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
route(1);<BR>}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>route[1]<BR>{<BR>&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>}<BR></FONT></DIV></BODY></HTML>