<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>SER + Voicemail - Need help completing </TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Dear All,</FONT>
</P>

<P><FONT SIZE=2>I could use a little help finalizing my proxy setup. I'm new to the ser enviorment.</FONT>
</P>

<P><FONT SIZE=2>Here are the steps I have taken to try and get ser, serweb and vm to work;</FONT>
</P>

<P><FONT SIZE=2>1. Installed a copy of Fedora Core.</FONT>
<BR><FONT SIZE=2>2. Downloaded a copy of 0.8.12 directory from the berlios ftp directory.</FONT>
<BR><FONT SIZE=2>4. I have installed ser from the rpm's for Fedora/</FONT>
<BR><FONT SIZE=2>4. I have configured and got working a copy of ser using ser.cfg example and the guide on the iptel site.</FONT>
<BR><FONT SIZE=2>5. I have configured SerWeb and I can login to the system as a user and as admin. I have put my test users in the voicemail group.</FONT></P>

<P><FONT SIZE=2>6. I have downloaded sems from the 0.8.12/contribs and have compiled this. I can do a service start sems and this loads. I assume you need sems for the answer machine function?</FONT></P>

<P><FONT SIZE=2>From what I can understand from the documentation I need to have two copies of ser running, and to forward calls that are now answered to the voicemail server. Could some one please give me a snippet? and tell me where to insert this in my ser.cfg please?</FONT></P>

<P><FONT SIZE=2>1. I have installed ser.cfg and run my ser server on 5060. My x-ten lite can call my Cisco 7960 and vice versa. The proxy works to forward calls to the PSTN via my Asterisk box.</FONT></P>

<P><FONT SIZE=2>2. I have used the example of voicemail.cfg that comes with ser in the tar.gz to create a voicemail.cfg. The only part that does not work is;</FONT></P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (len_gt( max_len )) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>In the debug I get;</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>0(3305) parse error (48,14-21): syntax error</FONT>
<BR><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0(3305) parse error (48,22-23): bad arguments</FONT>
</P>

<P><FONT SIZE=2>I have rem'd this out, will deal with this bit later, although I would be extremely grateful if anyone could tell me what the problem is?</FONT></P>

<P><FONT SIZE=2>So I can now run two copies of ser and everything checks out in the debug mode;</FONT>
</P>

<P><FONT SIZE=2>Can someone post a copy of a ser.cfg with a forward to 2nd ser to get vm working ? I have included a copy of my ser.cfg and voicemail.cfg. As always I appreciate the help.</FONT></P>

<P><FONT SIZE=2>Here is a copy of my voicemail.cfg</FONT>
</P>

<P><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># $Id: voicemail.cfg,v 1.5 2004/01/14 18:23:50 rco Exp $</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># this script is configured for use as voicemail UAS; it processes</FONT>
<BR><FONT SIZE=2># INVITEs and BYEs and asks SEMS to record media via &quot;vm&quot;; in this</FONT>
<BR><FONT SIZE=2># script, all record-routing and other constructs known from proxy</FONT>
<BR><FONT SIZE=2># scripts are not present&nbsp; -- it is a simple UAS </FONT>
<BR><FONT SIZE=2>#</FONT>
</P>

<P><FONT SIZE=2># ----------- global configuration parameters ------------------------</FONT>
</P>

<P><FONT SIZE=2>debug=7 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)</FONT>
<BR><FONT SIZE=2>fork=no</FONT>
<BR><FONT SIZE=2>log_stderror=yes &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd line: -E)</FONT>
<BR><FONT SIZE=2>check_via=no&nbsp;&nbsp;&nbsp; # (cmd. line: -v)</FONT>
<BR><FONT SIZE=2>dns=no&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)</FONT>
<BR><FONT SIZE=2>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -R)</FONT>
<BR><FONT SIZE=2>port=5090</FONT>
<BR><FONT SIZE=2>children=4</FONT>
<BR><FONT SIZE=2>fifo=&quot;/tmp/vm_ser_fifo&quot;</FONT>
</P>

<P><FONT SIZE=2># ------------------ module loading ----------------------------------</FONT>
</P>

<P><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/sl.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/tm.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/maxfwd.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/mysql.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/vm.so&quot;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=2># ----------------- setting module-specific parameters ---------------</FONT>
</P>

<P><FONT SIZE=2>modparam(&quot;vm&quot;, &quot;db_url&quot;,&quot;mysql://@localhost/ser&quot;)</FONT>
</P>

<P><FONT SIZE=2># -------------------------&nbsp; request routing logic -------------------</FONT>
</P>

<P><FONT SIZE=2># main routing logic</FONT>
</P>

<P><FONT SIZE=2>route{</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># initial sanity checks -- messages with</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># max_forwars==0, or excessively long requests</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!mf_process_maxfwd_header(&quot;10&quot;)) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>#if (len_gt( max_len )) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>#};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!uri==myself) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;404&quot;, &quot;not reponsible for host in r-uri&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>
<BR>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># Voicemail specific configuration - begin</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if(method==&quot;ACK&quot; || method==&quot;INVITE&quot; || method==&quot;BYE&quot;){</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!t_newtran()) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>log(&quot;could not create new transaction\n&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;500&quot;,&quot;could not create new transaction&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>t_reply(&quot;100&quot;,&quot;Trying -- just wait a minute !&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if(method==&quot;INVITE&quot;){</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>log(&quot;**************** vm start - begin ******************\n&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if(!vm(&quot;/tmp/am_fifo&quot;,&quot;voicemail&quot;)){</FONT>
<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; <FONT SIZE=2>log(&quot;could not contact the answer machine\n&quot;);</FONT>
<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; <FONT SIZE=2>t_reply(&quot;500&quot;,&quot;could not contact the answer machine&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>log(&quot;**************** vm start - end ******************\n&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>} else if(method==&quot;BYE&quot;){</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>log(&quot;**************** vm end - begin ******************\n&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if(!vm(&quot;/tmp/am_fifo&quot;,&quot;bye&quot;)){</FONT>
<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; <FONT SIZE=2>log(&quot;could not contact the answer machine\n&quot;);</FONT>
<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; <FONT SIZE=2>t_reply(&quot;500&quot;,&quot;could not contact the answer machine&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>log(&quot;**************** vm end - end ******************\n&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (method==&quot;CANCEL&quot;) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;200&quot;, &quot;cancels are junked here&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;501&quot;, &quot;method not understood here&quot;);</FONT>
<BR><FONT SIZE=2>}</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>ser.cfg</FONT>
</P>

<P><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># simple quick-start config script</FONT>
<BR><FONT SIZE=2>#</FONT>
</P>

<P><FONT SIZE=2># ----------- global configuration parameters ------------------------</FONT>
</P>

<P><FONT SIZE=2>#debug=3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # debug level (cmd line: -dddddddddd)</FONT>
<BR><FONT SIZE=2>#fork=yes</FONT>
<BR><FONT SIZE=2>#log_stderror=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd line: -E)</FONT>
</P>

<P><FONT SIZE=2>/* Uncomment these lines to enter debugging mode </FONT>
<BR><FONT SIZE=2>debug=7</FONT>
<BR><FONT SIZE=2>fork=no</FONT>
<BR><FONT SIZE=2>log_stderror=yes</FONT>
<BR><FONT SIZE=2>*/</FONT>
</P>

<P><FONT SIZE=2>check_via=no&nbsp;&nbsp;&nbsp; # (cmd. line: -v)</FONT>
<BR><FONT SIZE=2>dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -r)</FONT>
<BR><FONT SIZE=2>rev_dns=no&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # (cmd. line: -R)</FONT>
<BR><FONT SIZE=2>#port=5060</FONT>
<BR><FONT SIZE=2>#children=4</FONT>
<BR><FONT SIZE=2>fifo=&quot;/tmp/ser_fifo&quot;</FONT>
</P>

<P><FONT SIZE=2># ------------------ module loading ----------------------------------</FONT>
</P>

<P><FONT SIZE=2># Uncomment this if you want to use SQL database</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/mysql.so&quot;</FONT>
</P>

<P><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/sl.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/tm.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/rr.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/maxfwd.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/usrloc.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/registrar.so&quot;</FONT>
</P>

<P><FONT SIZE=2># Uncomment this if you want digest authentication</FONT>
</P>

<P><FONT SIZE=2># mysql.so must be loaded !</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/auth.so&quot;</FONT>
<BR><FONT SIZE=2>loadmodule &quot;/usr/lib/ser/modules/auth_db.so&quot;</FONT>
</P>

<P><FONT SIZE=2># ----------------- setting module-specific parameters ---------------</FONT>
</P>

<P><FONT SIZE=2># -- usrloc params --</FONT>
<BR><FONT SIZE=2>#modparam(&quot;usrloc&quot;, &quot;db_mode&quot;,&nbsp;&nbsp; 0)</FONT>
</P>

<P><FONT SIZE=2># Uncomment this if you want to use SQL database </FONT>
<BR><FONT SIZE=2># for persistent storage and comment the previous line</FONT>
<BR><FONT SIZE=2>modparam(&quot;usrloc&quot;, &quot;db_mode&quot;, 2)</FONT>
</P>

<P><FONT SIZE=2># -- auth params --</FONT>
<BR><FONT SIZE=2># Uncomment if you are using auth module</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>modparam(&quot;auth_db&quot;, &quot;calculate_ha1&quot;, yes)</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># If you set &quot;calculate_ha1&quot; parameter to yes (which true in this config), </FONT>
<BR><FONT SIZE=2># uncomment also the following parameter)</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2>modparam(&quot;auth_db&quot;, &quot;password_column&quot;, &quot;password&quot;)</FONT>
</P>

<P><FONT SIZE=2># -- rr params --</FONT>
<BR><FONT SIZE=2># add value to ;lr param to make some broken UAs happy</FONT>
<BR><FONT SIZE=2>modparam(&quot;rr&quot;, &quot;enable_full_lr&quot;, 1)</FONT>
</P>

<P><FONT SIZE=2># -------------------------&nbsp; request routing logic -------------------</FONT>
</P>

<P><FONT SIZE=2># main routing logic</FONT>
<BR><FONT SIZE=2>alias=&quot;192.168.0.206&quot;</FONT>
<BR><FONT SIZE=2>alias=&quot;cosydser1&quot;</FONT>
<BR><FONT SIZE=2>alias=&quot;convergenceone.com&quot;</FONT>
</P>

<P><FONT SIZE=2>route{</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># initial sanity checks -- messages with</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># max_forwards==0, or excessively long requests</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!mf_process_maxfwd_header(&quot;10&quot;)) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if ( msg:len &gt; max_len ) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;513&quot;, &quot;Message too big&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># we record-route all messages -- to make sure that</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># subsequent messages will go through our proxy; that's</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># particularly good if upstream and downstream entities</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># use different transport protocol</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>record_route(); </FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># loose-route processing</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (loose_route()) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>t_relay();</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># if request URI is numerical, forward the request to PSTN gateway...</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (uri=~&quot;^sip:[0-9]+@convergenceone.com&quot;) { # match using a regular expression</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>forward( 192.168.0.241, 5060 );</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># if request URI is numerical, forward the request to PSTN gateway...</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (uri=~&quot;^sip:[0-9]+@192.168.0.206&quot;) { # match using a regular expression</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>forward( 192.168.0.241, 5060 );</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># if the request is for other domain use UsrLoc</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># (in case, it does not work, use the following command</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># with proper names and addresses in it)</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (uri==myself) {</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (method==&quot;REGISTER&quot;) {</FONT>
</P>

<P><FONT SIZE=2># Uncomment this if you want to use digest authentication</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!www_authorize(&quot;convergenceone.com&quot;, &quot;subscriber&quot;)) {</FONT>
<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; <FONT SIZE=2>www_challenge(&quot;convergenceone.com&quot;, &quot;0&quot;);</FONT>
<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; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>save(&quot;location&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lookup(&quot;aliases&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># native SIP destinations are handled using our USRLOC DB</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!lookup(&quot;location&quot;)) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_send_reply(&quot;404&quot;, &quot;Not Found&quot;);</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>break;</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># forward to current uri now; use stateful forwarding; that</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2># works reliably even if we forward from TCP to UDP</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>if (!t_relay()) {</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>sl_reply_error();</FONT>
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2>};</FONT>
</P>

<P><FONT SIZE=2>}</FONT>
</P>

<P><FONT SIZE=2>Thanks and Regards</FONT>
</P>

<P><FONT SIZE=2>Shad Mortazavi</FONT>
<BR><FONT SIZE=2>---------------------------------------------------</FONT>
<BR><FONT SIZE=2>Nexus Technical Manager</FONT>
<BR><FONT SIZE=2>n|m Nexus Management Inc</FONT>
<BR><FONT SIZE=2>Sydney</FONT>
</P>

</BODY>
</HTML>