Hi!
1. Please answer always to the mailing list, so others can help you too!
2. Your configuration is wrong! Are you using 2 ser proxies? If you want to use redirect to voicemail after a certain time, you need 2 instances of ser! The may run on the same PC. One ser instance is the main proxy (register, forwarding, forward to the voicemail proxy after timeout) and the other proxy serves the voicemail server. You should split your configuration (as in the examples of jiri)
--- # Voicemail specific configuration - begin
if(method=="ACK" || method=="INVITE" || method=="BYE"){
if (!t_newtran()) { log("could not create new transaction\n"); sl_send_reply("500","could not create new transaction"); break; };
t_reply("100","Trying -- just wait a minute !"); if(method=="INVITE"){ log("**************** vm start - begin ******************\n"); if (uri=~"sip:as_welcome@.*" || uri=~"sip:as_nomoney@.*") { if (!vm("/tmp/am_fifo", "announcement")) { log("couldn't contact announcement server\n"); t_reply("500", "couldn not contact announcement server"); }; } else { if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answer machine\n"); t_reply("500","could not contact the answer machine"); }; }; log("**************** vm start - end ******************\n"); } else if(method=="BYE"){ log("**************** vm end - begin ******************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answer machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ******************\n"); }; break; }; -----------
This part must be in the ser.cfg of the voicemail proxy, not in the ser.cfg of the main processing proxy.
Klaus
-----Original Message----- From: Sesha B [mailto:sesha@iic.com] Sent: Thursday, November 20, 2003 4:00 PM To: Klaus Darilion Subject: RE: voicemail
I used the same thing in my config, but I dont know why it is directly transferring to the voicemail. Can youplease see the attached ser.cfg in this mail and please let me know where I'm doing wrong? That would be a great help to me. Please let me know. Thank you very much.
-----Original Message----- From: Klaus Darilion [mailto:darilion@ict.tuwien.ac.at] Sent: Tuesday, November 18, 2003 10:17 AM To: sesha@iic.com Cc: serusers@lists.iptel.org Subject: RE: voicemail
I used the sample config files provided by jiri from http://iptel.org/~faqomatic/fom-serve/cache/92.html
klaus
-----Original Message----- From: Sesha B [mailto:sesha@iic.com] Sent: Tuesday, November 18, 2003 4:10 PM To: Klaus Darilion Subject: RE: voicemail
Hi,
I'm trying to do the redirection to voicemail, but I was not able to. Can you please do me a favor? Can you please send me the section of the code that does the redirection to the voicemail? Thank you very much.
-----Original Message----- From: serusers-bounces@lists.iptel.org
[mailto:serusers-bounces@lists.iptel.org]On
Behalf Of Klaus Darilion Sent: Tuesday, November 18, 2003 6:01 AM To: serusers@lists.iptel.org Subject: [Serusers] fr_inv_timer problem when using SIPPS
Hi!
I tried voicemail with redirect to the vm-proxy if the user doesn't pick up the phone after 10 seconds. It works fine if I call a kphone user, but not with SIPPS users. SIPPS sends a 180 Ringing every five seconds which probably resets the timer - if I choose timer intervalls shorter than 5 seconds it also works with SIPPS.
Is this a bug?
tried with ser: 0.8.12dev-t14 0.8.11rc1 0.8.11-r1
regards, Klaus
# # $Id: ser.cfg,v 1.21 2003/06/04 13:47:36 jiri Exp $ # # simple quick-start config script #
# ----------- global configuration parameters
debug=3 # debug level (cmd line: -dddddddddd) fork=yes log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode debug=7 fork=no log_stderror=yes */
check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) port=5060 children=4 fifo="/tmp/ser_fifo" alias=obelix.ict.tuwien.ac.at # ------------------ module loading
# Uncomment this if you want to use SQL database loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/rr.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so"
# Uncomment this if you want digest authentication # mysql.so must be loaded ! loadmodule "/usr/local/lib/ser/modules/auth.so" loadmodule "/usr/local/lib/ser/modules/auth_db.so"
# load the voicemail module #loadmodule "/usr/local/lib/ser/modules/vm.so"
# load the enum module loadmodule "/usr/local/lib/ser/modules/enum.so"
# load the group module, to verify if a user forwards to voicemail loadmodule "/usr/local/lib/ser/modules/group.so"
# load the nathelper module #loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database # for persistent storage and comment the previous line modparam("usrloc", "db_mode", 2) modparam("usrloc", "db_url", "sql://ser:ser2000@localhost/ser")
# -- auth params -- # Uncomment if you are using auth module # modparam("auth_db", "calculate_ha1", yes) # # If you set "calculate_ha1" parameter to yes (which true in this config), # uncomment also the following parameter) # modparam("auth_db", "password_column", "password") modparam("auth_db", "db_url", "sql://ser:ser2000@localhost/ser")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
# -- voicemail params -- #modparam("voicemail", "db_url","sql://ser:ser2000@localhost/ser")
# -- voicemail params -- modparam("group", "db_url","sql://serro:serro2000@localhost/ser")
# -- nathelper params -- #modparam("nathelper", "natping_interval", 10)
modparam("tm", "fr_inv_timer", 8 ) modparam("tm", "fr_inv_timer", 8 )
# ------------------------- request routing logic
# main routing logic
route{
lookup("aliases"); # initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; #if (msg:len > max_len) { if (len_gt( max_len )) { sl_send_reply("513", "Message 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
#remove record route for dissipate #if (!(method=="REGISTER")) record_route();
# loose-route processing if (loose_route()) { t_relay(); break; };
# 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") {
# Uncomment this if you want to use digest authentication # if (!www_authorize("obelix.ict.tuwien.ac.at", "subscriber")) { # www_challenge("obelix.ict.tuwien.ac.at", "0"); # break; # };
if (!save("location")) { sl_reply_error(); }; break; }; # check if number beginns with 00, then convert
it into a + if (uri=~"^sip:00[0-9]*@") { # strip booth leading "0" strip(2); prefix("+"); }; # check if request uri begins with an internation phone number, if yes, try enum to resolve if (uri=~"sip:+?[0-9]+@.*") { enum_query("voice"); };
#mark transaction for voicemail if (is_user_in("Request-URI", "voicemail")) { setflag(4); }; # native SIP destinations are handled using our
USRLOC DB if (!lookup("location")) { # handle user which was not found route(4); break; }; };
#add failure route which should be performed if response code >=300 if (method=="INVITE" && isflagset(4)) { t_on_failure("1"); };
# 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(); };
}
route[4]{
# non-Voip -- just send "off-line" if (!(method == "INVITE" || method == "ACK" || method == "CANCEL" || method == "REFER" || method == "BYE")) { sl_send_reply("404", "Not Found"); break; };
# not voicemail subscriber if (!isflagset(4)) { sl_send_reply("404", "Not Found and no voicemail turned on"); break; };
# forward to voicemail now #rewritehostport("machtnix.ict.tuwien.ac.at:5060"); t_relay_to_udp("machtnix.ict.tuwien.ac.at", "5060");
#klaus #forward(machtnix.ict.tuwien.ac.at, 5060) }
failure_route[1] { /* XX: note: unsafe if preloaded routes without username used */ revert_uri(); revert_uri(); #rewritehostport("machtnix.ict.tuwien.ac.at:5060"); append_branch(); t_relay_to_udp("machtnix.ict.tuwien.ac.at", "5060"); }
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers