Best thing is to search the archives for discussions about using Asterisk or SEMS. They will discuss the technique you need.
-Steve
Quek Eric wrote:
Hi all,
I hav tried to understand SIP...im a totally new to sip, still a student learning.
How do I enable my Voice Mail in my ser.cfg....or where can i learn to add voice mail? I had vry little understanding with my ser.cfg file due to the server was created by previous project student...
here's 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")
# -- msilo parameters -- #URL of the mysql database used to retrieve users. #modparam("vm", "db_url", "sql://username:password@localhost/ser")
# ------------------------- 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@sip.nyp.edu.sg"); append_urihf("CC-Diversion: ", "\r\n"); append_hf("P-hint: OFFLINE-VOICEMAIL\r\n"); t_relay(); }
rgds, Eric
__________________________________ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers