[Serusers] How to enable my Voice Mail in ser.cfg

Quek Eric inputdev at yahoo.com
Mon Apr 4 05:18:46 CEST 2005



Quek Eric <inputdev at yahoo.com> wrote: thx Steve,
can u simplify wad to do or where can i learn to create voice mail? due to I'm totally new to SIP...I'm actually a student taking over a project which was done by a student too.
rgds,
Eric

Steve Blair <blairs at isc.upenn.edu> wrote:

Eric:

You need to decide what application will provide voice mail service
SEMS, Asterisk, etc. That decision will drive what needs to be in your
config file. Basically you'll need to add t_on_failure("N") and
failure_route[N] statements to handle the unanswered call. In the
failure_route you will want to do hostname and/or port number
re-writing as necessary then t_relay the call to this new (voicemail
server) destination.

-Steve

Quek Eric wrote:

>Hi all,
>
>Im a new learner who is a beginner learning on SIP...
>
>I will like to know how do I enable Voice Mail in my
>ser.cfg file...
>
>Here's my ser.cfg:
>#
># $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei
>Exp $
>#
># simple quick-start config script
>#
>
># ----------- global configuration parameters
>------------------------
>
>debug=3 # debug level (cmd line: -dddddddddd)
>fork=yes
>log_stderror=yes # (cmd line: -E)
>
>/* Uncomment these lines to enter debugging mode 
>debug=7
>fork=no
>log_stderror=yes
>*/
>
>listen=172.16.221.38
>listen=127.0.0.1
>alias="sip.nyp.edu.sg"
>alias=172.16.221.38
>alias=127.0.0.1
>
>check_via=yes # (cmd. line: -v)
>dns=yes # (cmd. line: -r)
>rev_dns=no # (cmd. line: -R)
>port=5060
>children=4
>fifo="/tmp/ser_fifo"
>
># ------------------ module loading
>----------------------------------
>
>loadmodule "/usr/lib/ser/modules/mysql.so"
>loadmodule "/usr/lib/ser/modules/sl.so"
>loadmodule "/usr/lib/ser/modules/tm.so"
>loadmodule "/usr/lib/ser/modules/rr.so"
>loadmodule "/usr/lib/ser/modules/maxfwd.so"
>loadmodule "/usr/lib/ser/modules/usrloc.so"
>loadmodule "/usr/lib/ser/modules/registrar.so"
>loadmodule "/usr/lib/ser/modules/auth.so"
>loadmodule "/usr/lib/ser/modules/auth_db.so"
>loadmodule "/usr/lib/ser/modules/acc.so"
>loadmodule "/usr/lib/ser/modules/exec.so"
>loadmodule "/usr/lib/ser/modules/group.so"
>loadmodule "/usr/lib/ser/modules/domain.so"
>loadmodule "/usr/lib/ser/modules/print.so"
>loadmodule "/usr/lib/ser/modules/textops.so"
>loadmodule "/usr/lib/ser/modules/uri.so"
>loadmodule "/usr/lib/ser/modules/msilo.so"
>loadmodule "/usr/lib/ser/modules/vm.so"
>
># ----------------- setting module-specific parameters
>---------------
>
># -- tm parameters --
>modparam("tm", "fr_timer", 12)
>modparam("tm", "fr_inv_timer", 24)
>
># -- rr parameters --
>#add value to ;lr param to make some broken UAs happy
>modparam("rr", "enable_full_lr", 1)
>
># -- usrloc parameters --
>#2 enables write-back to persistent mysql storage for
>speed
>#disable=0, write-through=1
>modparam("usrloc", "db_mode", 2)
>#minimize write back window - default is 60 seconds
>modparam("usrloc", "timer_interval", 120)
>#database location
>modparam("usrloc", "db_url",
>"sql://ser:heslo@localhost/ser")
>
># -- auth parameters --
>#database location
>modparam("auth_db", "db_url",
>"sql://ser:heslo@localhost/ser")
>#allows clear text password in the mysql database
>modparam("auth_db", "calculate_ha1", yes)
>#name of password column in mysql database
>modparam("auth_db", "password_column", "password")
>
># -- acc parameters --
>modparam("acc", "log_level", 1)
>modparam("acc", "log_flag", 1)
>modparam("acc", "log_missed_flag", 3)
>
># -- msilo parameters --
>modparam("msilo", "db_table", "silo")
>
># ------------------------- request routing logic
>-------------------
># main routing logic
>
>route{
>
> #checks messages with max_forwards==0
> if (!mf_process_maxfwd_header("10"))
> {
> sl_send_reply("483","too many hops");
> break;
> };
> #or excessively long requests
> if ( msg:len > max_len )
> {
> sl_send_reply("513", "message is too big");
> break;
> };
>
> # we record-route all messages -- to make sure that
> # subsequent messages will go through our proxy;
>that's
> # particularly good if upstream and downstream
>entities
> # use different transport protocol
> record_route();
>
> # loose-route processing
> if (loose_route())
> {
> t_relay();
> break;
> };
>
> # labeled all transaction for accounting
> setflag(1);
>
> # record-route INVITES to make sure BYEs will visit
>our server too
> if (method=="INVITE") record_route();
>
> # if the request is for other domain use UsrLoc
> # (in case, it does not work, use the following
>command
> # with proper names and addresses in it)
> if (uri==myself)
> {
> if (method=="REGISTER")
> {
> #make sure that users don't register infinite loops
> if
>(search("^(Contact|m):.*@(172\.16\.221\.38|(proxy\.)?sip\.nyp\.edu\.sg)"))
> {
> log(1, "LOG: alert: someone trying to set
>aor==contact\n");
> sl_send_reply("476", "no server address in
>contacts allowed");
> break; 
> };
>
> #Uncomment this if you want to use digest
>authentication
> # if (!www_authorize("sip.nyp.edu.sg",
>"subscriber"))
> # {
> # www_challenge("sip.nyp.edu.sg", "0");
> # break;
> # };
> save("aliases");
> save("location");
> log("REGISTER received -> dumping messages with
>MSILO\n");
>
> #MSILO - dumping user's offline messages
> if (m_dump())
> {
> log("MSILO: offline messages dumped - if they
>were\n");
> }
> else
> {
> log("MSILO: no offline messages dumped\n");
> };
> break;
> };
> 
> #native SIP destinations are handled using our
>USRLOC DB
> if (!lookup("location"))
> {
> if (! t_newtran())
> {
> sl_reply_error();
> break;
> };
>
> if (!method=="MESSAGE")
> {
> if (!t_reply("404", "not found on LDAP or SER"))
> {
> sl_reply_error();
> };
> break;
> };
>
> log("MESSAGE received -> storing using MSILO\n");
> # MSILO - storing as offline message
> if (m_store("0"))
> {
> log("MSILO: offline message stored\n");
> if (!t_reply("202", "accepted for later
>delivery")) 
> {
> sl_reply_error();
> };
> }
> else
> {
> log("MSILO: offline message NOT stored\n");
> if (!t_reply("503", "service unavailable")) 
> {
> sl_reply_error();
> };
> };
> break;
>
> sl_send_reply("404", "not found on LDAP or SER");
> break;
> };
> #if the downstream UA does not support MESSAGE
>requests
> #go to failure_route[1]
> t_on_failure("1");
> t_relay();
> break;
>
> #native SIP destinations are handled using our
>USRLOC DB
> if (!lookup("location"))
> {
> if (!exec_dset("/etc/ser/sipldap"))
> {
> sl_send_reply("404", "not found on LDAP or SER");
> break;
> }
> else
> {
> log(1, "sipldap call");
> };
> };
> };
> setflag(3);
>
> #forward to current uri now; use stateful forwarding;
>that
> #works reliably even if we forward from TCP to UDP
> if (!t_relay())
> {
> sl_reply_error();
> break;
> };
>
> #does user wish redirection on no availability?
> #(is he in the voicemail (ser->grp) group?
> if (is_user_in("Request-URI", "voicemail"))
> {
> t_on_failure("4");
> setflag(1);
> };
>}
>
>failure_route[1] {
> #forwarding failed -- check if the request was a
>MESSAGE 
> if (!method=="MESSAGE")
> {
> break;
> };
> log(1,"MSILO: the downstream UA does not support
>MESSAGE requests ...\n");
> #we have changed the R-URI with the contact address
>-- ignore it now
> if (m_store("1"))
> {
> log("MSILO: offline message stored\n");
> t_reply("202", "accepted for later delivery"); 
> }
> else
> {
> log("MSILO: offline message NOT stored\n");
> t_reply("503", "service unavailable");
> };
>}
>
>failure_route[4] {
> append_branch("sip:80000 at sip.nyp.edu.sg");
> append_urihf("CC-Diversion: ", "\r\n");
> append_hf("P-hint: OFFLINE-VOICEMAIL\r\n");
> t_relay();
>}
>
>
>Pls do help me...
>rgds,
>Eric
>
>
> 
>__________________________________ 
>Do you Yahoo!? 
>Yahoo! Personals - Better first dates. More second dates. 
>http://personals.yahoo.com
>
>_______________________________________________
>Serusers mailing list
>serusers at lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
> 
>

-- 

ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104 


voice: 215-573-8396 

215-746-8001

fax: 215-898-9348 

sip:blairs at upenn.edu



---------------------------------
Do you Yahoo!?
Better first dates. More second dates. Yahoo! Personals 



		
---------------------------------
Yahoo! Messenger
 Show us what our next emoticon should look like. Join the fun.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050403/7b663ccc/attachment.htm>


More information about the sr-users mailing list