Hi,
I'm trying to implement voicemail with ser_0.8.12 and sems_0.1.0 on the same machine. All servers seem to be running alright, but when I dial a user who's voicemail option is enabled, and is offline, the xlite displays "trying" for a while and then 408 request timeout. The logs in /var/log/messages says
Error: ## Wrong FIFO Interface version ##
Any idea about this?
Configurations are as follows.
voicemail.cfg ------------------------------------------------------------------------------------- check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) port=5090 children=4 fifo="/tmp/vm_ser_fifo" fifo_mode=438
alias=eagle.lankacom.net alias=203.143.0.120
# ------------------ module loading ----------------------------------
loadmodule "/usr/local/lib/ser/modules/sl.so" loadmodule "/usr/local/lib/ser/modules/tm.so" loadmodule "/usr/local/lib/ser/modules/maxfwd.so" loadmodule "/usr/local/lib/ser/modules/mysql.so" loadmodule "/usr/local/lib/ser/modules/vm.so"
# ----------------- setting module-specific parameters ---------------
modparam("voicemail", "db_url","mysql://ser:heslo@localhost/ser")
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with # max_forwars==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if (msg:len>= max_len) { sl_send_reply("513", "Message too big"); break; };
if (!uri==myself) { sl_send_reply("404", "not reponsible for host in r-uri"); break; };
# 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:*@*" || uri=~"sip:*@*") { 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; }; if (method=="CANCEL") { sl_send_reply("200", "cancels are junked here"); break; }; sl_send_reply("501", "method not understood here"); } --------------------------------------------------------------------------------------- vm_proxy.cfg --------------------------------------------------------------------------------------- alias=eagle.lankacom.net alias=203.143.0.120
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/mysql.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/usrloc.so" loadmodule "/usr/local/lib/ser/modules/registrar.so"
# time to give up on ringing -- global timer, applies to # all transactions modparam("tm", "fr_inv_timer", 90)
# database with user group membership modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
# --------------------- request routing logic ------------------- route {
if (!mf_process_maxfwd_header("10")) { log("LOG: Too many hops\n"); sl_send_reply("483", "Alas Too Many Hops"); break; };
if (!(method=="REGISTER")) record_route(); if (loose_route()) { t_relay(); break; };
if (!uri==myself) { t_relay(); break; };
if (method == "REGISTER") { if (!save("location")) { sl_reply_error(); }; break; };
# does the user wish redirection on no availability? (i.e., is he # in the voicemail group?) -- determine it now and store it in # flag 4, before we rewrite the flag using UsrLoc 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; };
# if user is on-line and is in voicemail group, enable redirection if (method == "INVITE" && isflagset(4)) { t_on_failure("1"); }; t_relay(); }
# ------------- handling of unavailable user ------------------ route[4] {
# non-Voip -- just send "off-line" if (!(method == "INVITE" || method == "ACK" || method == "CANCEL")) { 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("eagle.lankacom.net:5090"); # t_relay_to_udp("eagle.lt_relay_to_udp( "eagle.lankacom.net", "5090" ); break;
}
failure_route[1] { revert_uri(); rewritehostport("eagle.lankacom.net:5090"); append_branch(); t_relay_to_udp("eagle.lankacom.net", "5090"); }
Regards, Lakmal
Lankacom Services (Pvt) Ltd. 65C, Dharmapala Mawatha, Colombo 07. Sri Lanka. Tel: +94-1-437545 www.lankacom.net