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
Error: ## Wrong FIFO Interface version ##
Your version of SEMS and SER are mismatched. This is in the documentation actually. The protocol between SEMS and SER has changed at some point, and you need to have matched versions. There is a version chart on the SEMS site someplace.
Tom
Hi, I managed to get rid of the Wrong FIFO Interface version. Now I'm getting these errors on /var/log/messages and in sems debug mod, when making a call with the same configuration. Is it again due to a problem in versrion? The the sems is downloaded from ftp site and is sems_2004_01_04.tar.gz. I tried this with ser downloaded via cvs and the one from the ftp site. Any ideas?
Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command vm_reply is not available Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must have at least 3 chars Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: 000076B70A6C036D Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: Content-Type: application/sdp Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: v=0 Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: s=session Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: t=0 0 Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: a=rtpmap:3 gsm/8000 Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command vm_reply is not available Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: could not send response. Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must begin with :: 000076B70A6C036D Apr 25 09:16:06 compaq2 ser[30320]: ERROR: fifo_server: command must have at least 3 chars
--------------------------------------------------------------------- sems debug mode shows this
---------------------------------------------------------------------
v=0 o=username 0 0 IN IP4 24.248.99.200 s=session c=IN IP4 24.248.99.200 t=0 0 m=audio 39340 RTP/AVP 3 a=rtpmap:3 gsm/8000 .
(30452) DEBUG: openReplyFifo (AmRequest.cpp:358): flags=800 (30452) DEBUG: openReplyFifo (AmRequest.cpp:360): flags=0 (30452) DEBUG: write_to_fifo (AmRequest.cpp:702): Write to fifo: completed (30452) DEBUG: getReturnCode (AmRequest.cpp:413): response from Ser: 500 command 'vm_reply' not available (30452) DEBUG: sendToFIFO (AmRequest.cpp:213): sendToFifo returns ret=getReturnCode=0 (30452) ERROR: reply (AmRequest.cpp:309): AmRequestUAS::reply: 500 command 'vm_reply' not available (30452) ERROR: run (AmSession.cpp:155): 500 could not send response. (30452) DEBUG: sendToFIFO (AmRequest.cpp:194): msg=<:vm_reply:000076F4226615DC 500 could not send response. 58537:73151574 000076B70A6C036D Contact: sip:1001@24.248.99.200:5090 . .
(30452) DEBUG: openReplyFifo (AmRequest.cpp:358): flags=800 (30452) DEBUG: openReplyFifo (AmRequest.cpp:360): flags=0 (30452) DEBUG: write_to_fifo (AmRequest.cpp:702): Write to fifo: completed (30452) DEBUG: getReturnCode (AmRequest.cpp:413): response from Ser: 500 command 'vm_reply' not available (30452) DEBUG: sendToFIFO (AmRequest.cpp:213): sendToFifo returns ret=getReturnCode=0 (30452) ERROR: reply (AmRequest.cpp:309): AmRequestUAS::reply: 500 command 'vm_reply' not available (30452) DEBUG: sadSession (AmSession.cpp:305): searching for session to destroy (hash=AF821C77-9705-11D8-AA55-00A0C9703D22@203.143.58.1931664479517,sess_key=000076B70A6C036D) (30452) DEBUG: findSession (AmSession.cpp:369): session found with key (30452) DEBUG: destroySession (AmSession.cpp:327): sess_it != a_sessions.end() (30452) DEBUG: destroySession (AmSession.cpp:330): it != sess_it->second.end() (30452) DEBUG: destroySession (AmSession.cpp:337): session found: stopping session (30452) DEBUG: stopAndQueue (AmSession.cpp:285): session cleaner trying to stop 80c7b30 (30452) DEBUG: postEvent (AmEventQueue.cpp:47): AmEventQueue: trying to post event (30452) DEBUG: postEvent (AmEventQueue.cpp:55): AmEventQueue: event posted (30452) DEBUG: destroySession (AmSession.cpp:339): session stopped and destroyed (#sessions=0) (30394) DEBUG: run (AmSession.cpp:238): Session cleaner starting its work (30394) DEBUG: run (AmSession.cpp:252): session 80c7b30 has been destroyed' (30394) DEBUG: run (AmSession.cpp:275): Session cleaner finished -----------------------------------------------------------------------
Error: ## Wrong FIFO Interface version ##
Your version of SEMS and SER are mismatched. This is in the documentation actually. The protocol between SEMS and SER has changed at some point, and you need to have matched versions. There is a version chart on the SEMS site someplace.
Tom
Regards, Lakmal
Lankacom Services (Pvt) Ltd. 65C, Dharmapala Mawatha, Colombo 07. Sri Lanka. Tel: +94-1-437545 www.lankacom.net