<!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.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hi</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am having some problems with the simplest tasks 
in ser. I can't see to get ser to start. It doesn't like my call to the 
t_relay_to command. Obviously I am being a bit of a thickie. Anyone care to 
point out where my error is. The following is the whole of the ser.cfg 
file.</FONT></DIV>
<DIV><FONT face=Arial size=2>#</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></FONT>&nbsp;</DIV>
<DIV>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2># $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 
andrei Exp $</FONT></P>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2># simple quick-start config script</FONT></P>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2># ----------- global configuration parameters 
------------------------</FONT></P>
<P><FONT color=#0000ff size=2>#debug=3 # debug level (cmd line: 
-dddddddddd)</FONT></P>
<P><FONT color=#0000ff size=2>#fork=yes</FONT></P>
<P><FONT color=#0000ff size=2>#log_stderror=no # (cmd line: -E)</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment these lines to enter debugging mode 
</FONT></P>
<P><FONT color=#0000ff size=2>debug=100</FONT></P>
<P><FONT color=#0000ff size=2>fork=yes</FONT></P>
<P><FONT color=#0000ff size=2># listen="192.168.154.81"</FONT></P>
<P><FONT color=#0000ff size=2>log_stderror=yes</FONT></P>
<P><FONT color=#0000ff size=2>#*/</FONT></P>
<P><FONT color=#0000ff size=2>check_via=no # (cmd. line: -v)</FONT></P>
<P><FONT color=#0000ff size=2>dns=no # (cmd. line: -r)</FONT></P>
<P><FONT color=#0000ff size=2>rev_dns=no # (cmd. line: -R)</FONT></P>
<P><FONT color=#0000ff size=2>#port=5060</FONT></P>
<P><FONT color=#0000ff size=2>#children=4</FONT></P>
<P><FONT color=#0000ff size=2>fifo="/tmp/ser_fifo"</FONT></P>
<P><FONT color=#0000ff size=2># ------------------ module loading 
----------------------------------</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment this if you want to use SQL 
database</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/mysql.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/sl.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/tm.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/rr.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/maxfwd.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/usrloc.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/registrar.so"</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment this if you want digest 
authentication</FONT></P>
<P><FONT color=#0000ff size=2># mysql.so must be loaded !</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/auth.so"</FONT></P>
<P><FONT color=#0000ff size=2>loadmodule 
"/usr/local/lib/ser/modules/auth_db.so"</FONT></P>
<P><FONT color=#0000ff size=2># ----------------- setting module-specific 
parameters ---------------</FONT></P>
<P><FONT color=#0000ff size=2># -- usrloc params --</FONT></P>
<P><FONT color=#0000ff size=2>#modparam("usrloc", "db_mode", 0)</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment this if you want to use SQL database 
</FONT></P>
<P><FONT color=#0000ff size=2># for persistent storage and comment the previous 
line</FONT></P>
<P><FONT color=#0000ff size=2>modparam("usrloc", "db_mode", 2)</FONT></P>
<P><FONT color=#0000ff size=2># -- auth params --</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment if you are using auth 
module</FONT></P>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2>modparam("auth_db", "calculate_ha1", 
yes)</FONT></P>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2># If you set "calculate_ha1" parameter to yes 
(which true in this config), </FONT></P>
<P><FONT color=#0000ff size=2># uncomment also the following 
parameter)</FONT></P>
<P><FONT color=#0000ff size=2>#</FONT></P>
<P><FONT color=#0000ff size=2>modparam("auth_db", "password_column", 
"password")</FONT></P>
<P><FONT color=#0000ff size=2># -- rr params --</FONT></P>
<P><FONT color=#0000ff size=2># add value to ;lr param to make some broken UAs 
happy</FONT></P>
<P><FONT color=#0000ff size=2>modparam("rr", "enable_full_lr", 1)</FONT></P>
<P><FONT color=#0000ff size=2># Set natping_interval parameter</FONT></P>
<P><FONT color=#0000ff size=2>#modparam("nathelper", "natping_interval", 
10)</FONT></P>
<P><FONT color=#0000ff size=2># ------------------------- request routing logic 
-------------------</FONT></P>
<P><FONT color=#0000ff size=2># main routing logic</FONT></P>
<P><FONT color=#0000ff size=2>route{</FONT></P>
<P><FONT color=#0000ff size=2>log("\nHELLO WORLD\n");</FONT></P>
<P><FONT color=#0000ff size=2>lookup("aliases");</FONT></P>
<P><FONT color=#0000ff size=2>log("\nAFTER lookup aliases\n");</FONT></P>
<P><FONT color=#0000ff size=2># initial sanity checks -- messages 
with</FONT></P>
<P><FONT color=#0000ff size=2># max_forwards==0, or excessively long 
requests</FONT></P>
<P><FONT color=#0000ff size=2>if (!mf_process_maxfwd_header("10")) {</FONT></P>
<P><FONT color=#0000ff size=2>sl_send_reply("483","Too Many Hops");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>log("\nAFTER Too Many Hops\n");</FONT></P>
<P><FONT color=#0000ff size=2>if (len_gt( max_len )) {</FONT></P>
<P><FONT color=#0000ff size=2>sl_send_reply("513", "Message too 
big");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>log("\nAfter Message too big\n");</FONT></P>
<P><FONT color=#0000ff size=2># we record-route all messages -- to make sure 
that</FONT></P>
<P><FONT color=#0000ff size=2># subsequent messages will go through our proxy; 
that's</FONT></P>
<P><FONT color=#0000ff size=2># particularly good if upstream and downstream 
entities</FONT></P>
<P><FONT color=#0000ff size=2># use different transport protocol</FONT></P>
<P><FONT color=#0000ff size=2>record_route(); </FONT></P>
<P><FONT color=#0000ff size=2>log("\nAFTER RECORD ROUTE\n");</FONT></P>
<P><FONT color=#0000ff size=2># loose-route processing</FONT></P>
<P><FONT color=#0000ff size=2>if (loose_route()) {</FONT></P>
<P><FONT color=#0000ff size=2>t_relay();</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>log("\nAFTER LOOSE ROUTE\n");</FONT></P>
<P><FONT color=#0000ff size=2>#Call to nathlper module functions for 
Grandstream</FONT></P>
<P><FONT color=#0000ff size=2># fix_nated_contact();</FONT></P>
<P><FONT color=#0000ff size=2># fix_nated_sdp(3);</FONT></P>
<P><FONT color=#0000ff size=2>log("\nJUST BEFORE PSTN stuff\n");</FONT></P>
<P><FONT color=#0000ff size=2>#added by Muhammad</FONT></P>
<P><FONT color=#0000ff size=2># if requests URI is numerical and starts with 
zero, forward statelessly to a static destination</FONT></P>
<P><FONT color=#0000ff size=2># zero, forward statelessly to a static 
destination</FONT></P>
<P><FONT color=#0000ff size=2>if (uri=~"^sip:0[0-9]*@telser.dyndns.org") 
{</FONT></P>
<P><FONT color=#0000ff size=2>log("\nFORWARDING TO PSTN\n");</FONT></P>
<P><FONT color=#0000ff size=2>#forward( telgw2.dyndns.org, 5060 );</FONT></P>
<P><FONT color=#0000ff size=2>#forward(82.145.32.73, 5060);</FONT></P>
<P><FONT color=#0000ff size=2>t_relay_to("82.145.32.73", "5060");</FONT></P>
<P><FONT color=#0000ff size=2>log("\nABOUT TO BREAK\n");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>#end of Muhammad addition</FONT></P>
<P><FONT color=#0000ff size=2></FONT></P>
<P><FONT color=#0000ff size=2># if the request is for other domain use 
UsrLoc</FONT></P>
<P><FONT color=#0000ff size=2># (in case, it does not work, use the following 
command</FONT></P>
<P><FONT color=#0000ff size=2># with proper names and addresses in 
it)</FONT></P>
<P><FONT color=#0000ff size=2>if (uri==myself) {</FONT></P>
<P><FONT color=#0000ff size=2>if (method=="REGISTER") {</FONT></P>
<P><FONT color=#0000ff size=2># Uncomment this if you want to use digest 
authentication</FONT></P>
<P><FONT color=#0000ff size=2>if (!www_authorize("telser.dyndns.org", 
"subscriber")) {</FONT></P>
<P><FONT color=#0000ff size=2>log(8,"XXXXX We are not authorized");</FONT></P>
<P><FONT color=#0000ff size=2>www_challenge("telser.dyndns.org", 
"0");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>save("location");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2># native SIP destinations are handled using our 
USRLOC DB</FONT></P>
<P><FONT color=#0000ff size=2>if (!lookup("location")) {</FONT></P>
<P><FONT color=#0000ff size=2>sl_send_reply("404", "Not Found");</FONT></P>
<P><FONT color=#0000ff size=2>break;</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2></FONT>&nbsp;</P>
<P><FONT color=#0000ff size=2># forward to current uri now; use stateful 
forwarding; that</FONT></P>
<P><FONT color=#0000ff size=2># works reliably even if we forward from TCP to 
UDP</FONT></P>
<P><FONT color=#0000ff size=2>if (!t_relay()) {</FONT></P>
<P><FONT color=#0000ff size=2>sl_reply_error();</FONT></P>
<P><FONT color=#0000ff size=2>};</FONT></P>
<P><FONT color=#0000ff size=2>log("\nEND of ROUTING SCRIPT\n");</FONT></P>
<P><FONT color=#0000ff size=2>}</FONT></P></DIV></BODY></HTML>