<!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>Re: [Serusers] SER and Voicemail</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Kamen,</FONT>
</P>
<P><FONT SIZE=2>Thank for the information, I may need a little more help to get me started. I'm new to SER.</FONT>
</P>
<P><FONT SIZE=2>I have one SER box. I have SEMS on the SER box and I wish to use both servers. </FONT>
</P>
<P><FONT SIZE=2>When I do a service ser status and service sem status I see both are running. </FONT>
</P>
<P><FONT SIZE=2>What syntax do I use to forward to Voicemail? Do I need to;</FONT>
</P>
<P><FONT SIZE=2>1. Run a separate instance of SER on the same box? As suggested by;</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://iptel.org/cgi-bin/fom?file=92&showLastModified=show" TARGET="_blank">http://iptel.org/cgi-bin/fom?file=92&showLastModified=show</A></FONT>
</P>
<P><FONT SIZE=2>2. Or do I insert the following configuration into my ser.cfg;</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://iptel.org/cgi-bin/fom?file=90&showLastModified=show" TARGET="_blank">http://iptel.org/cgi-bin/fom?file=90&showLastModified=show</A> ?</FONT>
</P>
<P><FONT SIZE=2>So my ser.cfg would look like (see part starting with #Voicemail users);</FONT>
</P>
<P><FONT SIZE=2>[shad@COSYDSER1 ser]# cat ser.cfg</FONT>
<BR><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>
<BR><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>
</P>
<P><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>
<BR>
<BR>
<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> </FONT>
</P>
<P> <FONT SIZE=2> #Voicemail users</FONT>
<BR> <FONT SIZE=2> if (uri==myself) { # vm only for my domain ...</FONT>
</P>
<BR>
<P><FONT SIZE=2> /* if this is an in-dialog request from voicemail, jump out of</FONT>
<BR><FONT SIZE=2> proxy mode and pass the request to voicemail; you need to have</FONT>
<BR><FONT SIZE=2> 'user_prefix_separator=+' in sems.conf</FONT>
<BR><FONT SIZE=2> */</FONT>
<BR><FONT SIZE=2> if (uri=~"sip:voicemail\+") { </FONT>
<BR><FONT SIZE=2> /* some transaction processing to absorb retransmissions;</FONT>
<BR><FONT SIZE=2> the key part is "vm", which passes requests to the</FONT>
<BR><FONT SIZE=2> SEMS machine (we should better integrate all this stuff</FONT>
<BR><FONT SIZE=2> in a single command someday, sorry scriptwriters</FONT>
<BR><FONT SIZE=2> */</FONT>
<BR><FONT SIZE=2> t_newtran();</FONT>
<BR><FONT SIZE=2> t_reply("100", "trying -- just a second");</FONT>
<BR><FONT SIZE=2> if (!vm("/tmp/am_fifo","announcement")) {</FONT>
<BR><FONT SIZE=2> t_reply("500", "SEMS error");</FONT>
<BR><FONT SIZE=2> };</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> };</FONT>
</P>
<BR>
<P><FONT SIZE=2> if (!lookup()) { # user off-line?</FONT>
<BR><FONT SIZE=2> if (method=="INVITE" || method=="ACK") {</FONT>
<BR><FONT SIZE=2> t_newtran();</FONT>
<BR><FONT SIZE=2> t_reply("100", "trying -- just a second");</FONT>
<BR><FONT SIZE=2> if (!vm("/tmp/am_fifo","announcement")) {</FONT>
<BR><FONT SIZE=2> t_reply("500", "SEMS error");</FONT>
<BR><FONT SIZE=2> };</FONT>
<BR><FONT SIZE=2> break;</FONT>
<BR><FONT SIZE=2> };</FONT>
<BR><FONT SIZE=2> # non-VoIP methods for off-line users will just</FONT>
<BR><FONT SIZE=2> # just return 404</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> # continue with online users.... </FONT>
<BR><FONT SIZE=2> </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>
<BR>
<BR>
<P><FONT SIZE=2>As always.. Thanks</FONT>
</P>
<P><FONT SIZE=2>Warm Regards</FONT>
</P>
<P><FONT SIZE=2>Shad</FONT>
</P>
</BODY>
</HTML>