<!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> <FONT SIZE=2>if (len_gt( max_len )) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("513", "Message too big");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
</P>
<P> <FONT SIZE=2>In the debug I get;</FONT>
</P>
<P> <FONT SIZE=2>0(3305) parse error (48,14-21): syntax error</FONT>
<BR><FONT SIZE=2> 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 "vm"; 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 -- 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 # debug level (cmd line: -dddddddddd)</FONT>
<BR><FONT SIZE=2>fork=no</FONT>
<BR><FONT SIZE=2>log_stderror=yes # (cmd line: -E)</FONT>
<BR><FONT SIZE=2>check_via=no # (cmd. line: -v)</FONT>
<BR><FONT SIZE=2>dns=no # (cmd. line: -r)</FONT>
<BR><FONT SIZE=2>rev_dns=no # (cmd. line: -R)</FONT>
<BR><FONT SIZE=2>port=5090</FONT>
<BR><FONT SIZE=2>children=4</FONT>
<BR><FONT SIZE=2>fifo="/tmp/vm_ser_fifo"</FONT>
</P>
<P><FONT SIZE=2># ------------------ module loading ----------------------------------</FONT>
</P>
<P><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/sl.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/tm.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/maxfwd.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/mysql.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/vm.so"</FONT>
<BR> <FONT SIZE=2> </FONT>
<BR><FONT SIZE=2># ----------------- setting module-specific parameters ---------------</FONT>
</P>
<P><FONT SIZE=2>modparam("vm", "db_url","mysql://@localhost/ser")</FONT>
</P>
<P><FONT SIZE=2># ------------------------- request routing logic -------------------</FONT>
</P>
<P><FONT SIZE=2># main routing logic</FONT>
</P>
<P><FONT SIZE=2>route{</FONT>
</P>
<P> <FONT SIZE=2># initial sanity checks -- messages with</FONT>
<BR> <FONT SIZE=2># max_forwars==0, or excessively long requests</FONT>
<BR> <FONT SIZE=2>if (!mf_process_maxfwd_header("10")) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("483","Too Many Hops");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>#if (len_gt( max_len )) {</FONT>
<BR> <FONT SIZE=2># sl_send_reply("513", "Message too big");</FONT>
<BR> <FONT SIZE=2># break;</FONT>
<BR> <FONT SIZE=2>#};</FONT>
</P>
<P> <FONT SIZE=2>if (!uri==myself) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("404", "not reponsible for host in r-uri");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
</P>
<BR>
<P> <FONT SIZE=2># Voicemail specific configuration - begin</FONT>
</P>
<P> <FONT SIZE=2>if(method=="ACK" || method=="INVITE" || method=="BYE"){</FONT>
</P>
<P> <FONT SIZE=2>if (!t_newtran()) {</FONT>
<BR> <FONT SIZE=2>log("could not create new transaction\n");</FONT>
<BR> <FONT SIZE=2>sl_send_reply("500","could not create new transaction");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
</P>
<P> <FONT SIZE=2>t_reply("100","Trying -- just wait a minute !");</FONT>
<BR> <FONT SIZE=2>if(method=="INVITE"){</FONT>
<BR> <FONT SIZE=2>log("**************** vm start - begin ******************\n");</FONT>
<BR> <FONT SIZE=2>if(!vm("/tmp/am_fifo","voicemail")){</FONT>
<BR> <FONT SIZE=2>log("could not contact the answer machine\n");</FONT>
<BR> <FONT SIZE=2>t_reply("500","could not contact the answer machine");</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>log("**************** vm start - end ******************\n");</FONT>
<BR> <FONT SIZE=2>} else if(method=="BYE"){</FONT>
<BR> <FONT SIZE=2>log("**************** vm end - begin ******************\n");</FONT>
<BR> <FONT SIZE=2>if(!vm("/tmp/am_fifo","bye")){</FONT>
<BR> <FONT SIZE=2>log("could not contact the answer machine\n");</FONT>
<BR> <FONT SIZE=2>t_reply("500","could not contact the answer machine");</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>log("**************** vm end - end ******************\n");</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>if (method=="CANCEL") {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("200", "cancels are junked here");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>sl_send_reply("501", "method not understood here");</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 # debug level (cmd line: -dddddddddd)</FONT>
<BR><FONT SIZE=2>#fork=yes</FONT>
<BR><FONT SIZE=2>#log_stderror=no # (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 # (cmd. line: -v)</FONT>
<BR><FONT SIZE=2>dns=no # (cmd. line: -r)</FONT>
<BR><FONT SIZE=2>rev_dns=no # (cmd. line: -R)</FONT>
<BR><FONT SIZE=2>#port=5060</FONT>
<BR><FONT SIZE=2>#children=4</FONT>
<BR><FONT SIZE=2>fifo="/tmp/ser_fifo"</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 "/usr/lib/ser/modules/mysql.so"</FONT>
</P>
<P><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/sl.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/tm.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/rr.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/maxfwd.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/usrloc.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/registrar.so"</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 "/usr/lib/ser/modules/auth.so"</FONT>
<BR><FONT SIZE=2>loadmodule "/usr/lib/ser/modules/auth_db.so"</FONT>
</P>
<P><FONT SIZE=2># ----------------- setting module-specific parameters ---------------</FONT>
</P>
<P><FONT SIZE=2># -- usrloc params --</FONT>
<BR><FONT SIZE=2>#modparam("usrloc", "db_mode", 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("usrloc", "db_mode", 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("auth_db", "calculate_ha1", yes)</FONT>
<BR><FONT SIZE=2>#</FONT>
<BR><FONT SIZE=2># If you set "calculate_ha1" 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("auth_db", "password_column", "password")</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("rr", "enable_full_lr", 1)</FONT>
</P>
<P><FONT SIZE=2># ------------------------- request routing logic -------------------</FONT>
</P>
<P><FONT SIZE=2># main routing logic</FONT>
<BR><FONT SIZE=2>alias="192.168.0.206"</FONT>
<BR><FONT SIZE=2>alias="cosydser1"</FONT>
<BR><FONT SIZE=2>alias="convergenceone.com"</FONT>
</P>
<P><FONT SIZE=2>route{</FONT>
</P>
<P> <FONT SIZE=2># initial sanity checks -- messages with</FONT>
<BR> <FONT SIZE=2># max_forwards==0, or excessively long requests</FONT>
<BR> <FONT SIZE=2>if (!mf_process_maxfwd_header("10")) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("483","Too Many Hops");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>if ( msg:len > max_len ) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("513", "Message too big");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
</P>
<P> <FONT SIZE=2># we record-route all messages -- to make sure that</FONT>
<BR> <FONT SIZE=2># subsequent messages will go through our proxy; that's</FONT>
<BR> <FONT SIZE=2># particularly good if upstream and downstream entities</FONT>
<BR> <FONT SIZE=2># use different transport protocol</FONT>
<BR> <FONT SIZE=2>record_route(); </FONT>
<BR> <FONT SIZE=2># loose-route processing</FONT>
<BR> <FONT SIZE=2>if (loose_route()) {</FONT>
<BR> <FONT SIZE=2>t_relay();</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2># if request URI is numerical, forward the request to PSTN gateway...</FONT>
<BR> <FONT SIZE=2>if (uri=~"^sip:[0-9]+@convergenceone.com") { # match using a regular expression</FONT>
<BR> <FONT SIZE=2>forward( 192.168.0.241, 5060 );</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2># if request URI is numerical, forward the request to PSTN gateway...</FONT>
<BR> <FONT SIZE=2>if (uri=~"^sip:[0-9]+@192.168.0.206") { # match using a regular expression</FONT>
<BR> <FONT SIZE=2>forward( 192.168.0.241, 5060 );</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2># if the request is for other domain use UsrLoc</FONT>
<BR> <FONT SIZE=2># (in case, it does not work, use the following command</FONT>
<BR> <FONT SIZE=2># with proper names and addresses in it)</FONT>
<BR> <FONT SIZE=2>if (uri==myself) {</FONT>
</P>
<P> <FONT SIZE=2>if (method=="REGISTER") {</FONT>
</P>
<P><FONT SIZE=2># Uncomment this if you want to use digest authentication</FONT>
<BR> <FONT SIZE=2>if (!www_authorize("convergenceone.com", "subscriber")) {</FONT>
<BR> <FONT SIZE=2>www_challenge("convergenceone.com", "0");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
</P>
<P> <FONT SIZE=2>save("location");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2> lookup("aliases");</FONT>
<BR> <FONT SIZE=2># native SIP destinations are handled using our USRLOC DB</FONT>
<BR> <FONT SIZE=2>if (!lookup("location")) {</FONT>
<BR> <FONT SIZE=2>sl_send_reply("404", "Not Found");</FONT>
<BR> <FONT SIZE=2>break;</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2>};</FONT>
<BR> <FONT SIZE=2># forward to current uri now; use stateful forwarding; that</FONT>
<BR> <FONT SIZE=2># works reliably even if we forward from TCP to UDP</FONT>
<BR> <FONT SIZE=2>if (!t_relay()) {</FONT>
<BR> <FONT SIZE=2>sl_reply_error();</FONT>
<BR> <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>