[Serusers] RE: [Sems] sems voicemail error
wiggler
sysad at bembang.com
Tue May 18 03:49:36 CEST 2004
Hi everyone,
Sorry for my second post, i just cc'd the serusers list so ser users can help me with this. I want to have a working voicemail so i run 2 ser instance + sems but i got an error on the logs.
Here's my ser.cfg, voicemail.cfg and sems.cfg.
I hope anyone can help me, I still got an error on my logs and debugging sems :
Running sems -D 3 -E:
(27578) DEBUG: write_to_fifo (AmRequest.cpp:743): Write to fifo: completed
(27578) DEBUG: getReturnCode (AmRequest.cpp:429): response from Ser: 481 fifo_t_reply: no such transaction
(27578) DEBUG: sendToFIFO (AmRequest.cpp:229): sendToFifo returns ret=getReturnCode=0
(27578) ERROR: reply (AmRequest.cpp:325): AmRequestUAS::reply: 481 fifo_t_reply: no such transaction
(27578) DEBUG: setLocalPort (AmRtpStream.cpp:133): setting random local port
(27578) DEBUG: setLocalPort (AmRtpStream.cpp:163): local rtp port set to 52852
(27578) DEBUG: sendToFIFO (AmRequest.cpp:207): msg=<:vm_reply:00006BBA4D18C226
200
OK
38130:1148081401
00006BBA4C7CEF3F
Contact: <sip:1234 at 212.18.36.252:5090>
Content-Type: application/sdp
.
v=0
o=username 0 0 IN IP4 212.18.36.252
s=session
c=IN IP4 212.18.36.252
t=0 0
m=audio 52852 RTP/AVP 3
a=rtpmap:3 //
.
>
(27578) DEBUG: write_to_fifo (AmRequest.cpp:743): Write to fifo: completed
(27578) DEBUG: getReturnCode (AmRequest.cpp:429): response from Ser: 481 fifo_t_reply: no such transaction
(27578) DEBUG: sendToFIFO (AmRequest.cpp:229): sendToFifo returns ret=getReturnCode=0
(27578) ERROR: reply (AmRequest.cpp:325): AmRequestUAS::reply: 481 fifo_t_reply: no such transaction
(27578) ERROR: run (AmSession.cpp:183): 500 could not send response.
(27578) DEBUG: sendToFIFO (AmRequest.cpp:207): msg=<:vm_reply:00006BBA45A0D6CB
500
could not send response.
38130:1148081401
00006BBA4C7CEF3F
Contact: <sip:1234 at 212.18.36.252:5090>
.
.
>
(27578) DEBUG: write_to_fifo (AmRequest.cpp:743): Write to fifo: completed
(27578) DEBUG: getReturnCode (AmRequest.cpp:429): response from Ser: 481 fifo_t_reply: no such transaction
(27578) DEBUG: sendToFIFO (AmRequest.cpp:229): sendToFifo returns ret=getReturnCode=0
(27578) ERROR: reply (AmRequest.cpp:325): AmRequestUAS::reply: 481 fifo_t_reply: no such transaction
In my messages log:
May 17 11:37:35 voip /usr/local/sbin/ser[27478]: ERROR: fifo_t_reply: lookup failed
May 17 11:37:35 voip /usr/local/sbin/ser[27478]: ERROR: fifo_server: command (vm_reply) processing failed
May 17 11:37:36 voip /usr/local/sbin/ser[27478]: ERROR: fifo_t_reply: lookup failed
May 17 11:37:36 voip /usr/local/sbin/ser[27478]: ERROR: fifo_server: command (vm_reply) processing failed
May 17 11:37:37 voip /usr/local/sbin/ser[27478]: ERROR: fifo_t_reply: lookup failed
May 17 11:37:37 voip /usr/local/sbin/ser[27478]: ERROR: fifo_server: command (vm_reply) processing failed
Heres my ser.cfg instance:
#
# $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=no
#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"
fifo_mode=438
alias=siptel.telecomverge.com
# ------------------ 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"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/vm.so"
loadmodule "/usr/local/lib/ser/modules/enum.so"
loadmodule "/usr/local/lib/ser/modules/group.so"
# ----------------- setting module-specific parameters ---------------
# -- registrar parameter
# special NAT flag indicates that a registered client is behind NAT
#modparam("registrar", "nat_flag", 6)
# -- acc params --
modparam("acc", "db_url", "sql://ser:heslo@localhost/ser")
modparam("acc", "log_level", 1)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 1)
modparam("acc", "log_flag", 1)
# -- 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", "mysql://ser:heslo@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", "mysql://ser:heslo@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","mysql://ser:heslo@localhost/ser")
#modparam("voicemail", "db_url","/etc/ivr/db")
# -- voicemail params --
modparam("group", "db_url","mysql://ser:heslo@localhost/ser")
# -- nathelper params --
#modparam("nathelper", "natping_interval", 60)
#modparam("nathelper", "ping_nated_only", 1)
modparam("tm", "fr_inv_timer", 15 )
# ------------------------- request routing logic -------------------
# main routing logic
route{
#setflag(1);
log(1, "-------------------------------------------\n");
log(1, "entering main loop\n");
if (method=="INVITE"){
record_route();
};
if (method=="INVITE" || method=="BYE" || method=="CANCEL"){
record_route();
setflag(1);
};
/*
if (method=="REGISTER")
log(1, "REGISTER message received\n");
if (method=="INVITE")
log(1, "INVITE message received\n");
if (method=="ACK")
log(1, "ACK message received\n");
if (method=="BYE")
log(1, "BYE message received\n");
if (method=="CANCEL")
log(1, "CANCEL message received\n");
if (method=="SUBSCRIBE")
log(1, "SUBSCRIBE message received\n");
if (method=="NOTIFY")
log(1, "NOTIFY message received\n");
if (method=="OPTIONS")
log(1, "OPTIONS message received\n");
if (method=="INFO")
log(1, "INFO message received\n");
if (method=="MESSAGE")
log(1, "MESSAGE message received\n");
if (method=="REFER")
log(1, "REFER message received\n");
*/
# 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;
};
# loose-route processing
if (loose_route()) {
log(1, "loose_route processing\n");
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=~"voip.domain.com") {
if (method=="REGISTER") {
log(1, "analyzing REGISTER request\n");
record_route();
# Uncomment this if you want to use digest authentication
if (!www_authorize("voip.domain.com", "subscriber")) {
www_challenge("voip.domain.com", "0");
break;
};
if (!save("location")) {
log(1, "save location error\n");
sl_reply_error();
};
break;
};
lookup("aliases");
#mark transaction for voicemail
if (is_user_in("Request-URI", "voicemail\n")) {
log(1, "requested user is in voicemail group");
setflag(4);
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
# handle user which was not found
log(1, "requested user not found\n");
route(4);
break;
};
};
#add failure route which should be performed if response code >=300
if (method=="INVITE" && isflagset(4)) {
log(1, "invite for voicemail user->initiate failureroute[1]\n");
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()) {
log(1, "t_relay error occured\n");
sl_reply_error();
};
}
# all incoming replies for t_onrepli-ed transactions enter here
route[4]{
log(1, "-------------------------------------------\n");
log(1, "entering route[4] = requested user not online\n");
# non-Voip -- just send "off-line"
if (!(method == "INVITE" || method == "ACK" || method == "CANCEL" || method == "REFER" || method == "BYE")) {
log(1, "no invite,ack,cancel,refer->return 404\n");
sl_send_reply("404", "Not Found");
break;
};
# not voicemail subscriber and no echo/conference call
if ( isflagset(4)) {
log(1, "flag(4) active\n");
};
if (uri =~ "conference") {
log(1, "conference call\n");
};
if (uri =~ "echo") {
log(1, "echo call\n");
};
if ( !( isflagset(4) || (uri =~ "conference") || (uri =~ "echo") ) ) {
log(1, "no voicemail subscriber->return 404");
sl_send_reply("404", "Not Found and no voicemail turned on");
break;
};
# forward to voicemail now
#rewritehostport("voip.domain.com:5090");
log(1, "forward to voicemail\n");
t_relay_to_udp("voip.domain.com", "5090");
}
failure_route[1] {
/* XX: note: unsafe if preloaded routes without username used */
log(1, "-------------------------------------------\n");
log(1, "failureroute[1] entered\");
revert_uri();
rewritehostport("voip.domain.com:5090");
append_branch();
t_relay_to_udp("voip.domain.com", "5090");
}
Heres my voicemail.cfg instance:
#
# $Id: voicemail.cfg,v 1.2 2003/10/10 06:27:18 jiri Exp $
#
# this script is configured for use as voicemail UAS; it processes
# INVITEs and BYEs and asks SEMS to record media via "vm"; in this
# script, all record-routing and other constructs known from proxy
# scripts are not present -- it is a simple UAS
#
# ----------- global configuration parameters ------------------------
#debug= # debug level (cmd line: -dddddddddd)
#fork=no
#log_stderror=yes # (cmd line: -E)
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
# ------------------ 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","sql://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:as_welcome at .*" || uri=~"sip:as_nomoney at .*") {
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");
}
Heres my sems.cfg:
# $Id: sems.conf.sample,v 1.13 2004/05/08 17:06:40 ullstar Exp $
#
# sems.conf.sample
#
# Sip Express Media Server (sems)
#
# sample configuration file
#
#
# whitespaces (spaces and tabs) are ignored
# comments start with a "#" and may be used inline
#
# example: option=value1, value2 # i like this option
#
##################################
# global parameters #
##################################
# optional parameter: fork={yes|no}
#
# - specifies if sems should run in daemon mode (background)
# (fork=no is the same as -E)
fork=yes
# optional parameter: stderr={yes|no}
#
# - debug mode: do not fork and log to stderr
# (stderr=yes is the same as -E)
stderr=no
# optional parameter: loglevel={0|1|2|3}
#
# - sets log level (error=0, warning=1, info=2, debug=3)
# (same as -D)
loglevel=3
# optional parameter: fifo_name=<filename>
#
# - path and file name of our fifo file (same as -i)
fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename>
#
# - path and file name of Ser's fifo file (same as -o)
ser_fifo_name=/tmp/ser_fifo
# optional parameter: plugin_path=<path>
#
# - sets the path to the plug-ins
# - may be absolute or relative to CWD
plugin_path=/usr/local/lib/sems/plug-in/
# optional parameter: smtp_server=<hostname>
#
# - sets address of smtp server
smtp_server=localhost
# optional parameter: smtp_port=<port>
#
# - sets port of smtp server
smtp_port=25
##################################
# module specific parameters #
##################################
# sample voicemail configuration (inline)
config.voicemail=inline
# optional parameter: announce_path=<path>
#
# - sets the path where announce files are searched for
# - the file to be played is determined the following way:
# <announce_path>/<domainname>/<username>.wav
# if this file is not available <announce_path>/<default_anounce> is used
announce_path=/usr/local/lib/sems/audio/
# parameter: default_announce=<filename>
#
# - sets the name of the default announce WAV file
default_announce=default_en.wav
# parameter: max_record_time=<seconds>
#
# - maximum record time
max_record_time=30
# parameter: accept_delay=<x>
#
# - delays accepting of the call for x seconds
# - default value is 0
accept_delay=0
# end of configuration section for voicemail module
config.voicemail=end
# sample announcement configuration (inline)
config.announcement=inline
# optional parameter: announce_path=<path>
#
# - sets the path where announce files are searched for
announce_path=/usr/local/lib/sems/audio/
# parameter: default_announce=<filename>
#
# - sets the name of the default announce WAV file
default_announce=default_en.wav
# end of configuration section for announcement module
config.announcement=end
# sample isdngw module configuration (external file)
# config.isdngw=/etc/isdngw.conf
# sample ivr module configuration (inline)
config.ivr=inline
#parameter: python_script_path=<full path>
python_script_path=/etc/ivr
#parameter: python_script_file=<filename>
python_script_file=ivr.py
# end of configuration section for ivr module
config.ivr=end
# sample conference configuration (inline)
config.conference=inline
# parameter: default_announce=<filename>
#
# - sets the full pathed name of the default announce WAV file.
# Will be played to lonely users.
default_announce=/usr/local/lib/sems/audio/first_participant.wav
# end of configuration section for conference module
config.conference=end
# example configuration for number reader
config.number_reader=inline
number_path=/usr/local/lib/sems/audio/
prolog_file=welcome_to_number_reader.wav
epilog_file=thanks_calling_number_reader.wav
# end of number_reader configuration
config.number_reader=end
# add more module configurations here (inline or external):
#
# config.mymodule=<filename>
# or
# config.mymodule=inline
# ...
# config.mymodule=end
Thanks a lot.
wiggler
----- Original Message -----
From: "Raphael Coeffic" <rco at iptel.org>
To: <sysad at bembang.com>, <sems at lists.iptel.org>
Sent: Wednesday, May 12, 2004 10:40 PM
Subject: [Sems] sems voicemail error
Hello,
could you send us your ser.cfg & sems.conf? it looks like you forgot
something...
-Raphael.
----- Original Message -----
From: "wiggler" <sysad at bembang.com>
To: <sems at lists.iptel.org>
Sent: Wednesday, May 12, 2004 12:33 PM
Subject: [Sems] sems voicemail error
> Hi everyone,
>
> I am trying to configure sems for voicemail with no luck. i got an error
on my log when i try to call an offline user.
>
> ---snip------
> May 12 18:30:01 siptel Sems[30819]: Error: AmRequestUAS::reply: 481
fifo_t_reply: no such transaction
> ------o----
>
> anyone can help me how to fix this problem.
>
> please advice me on how to setup ser and sems+voicemail properly. what
should be the configuration to make it work.
>
> thanks a lot.
>
> wiggler
>
> --
> www.bembang.com
----------------------------------------------------------------------------
----
> _______________________________________________
> Sems mailing list
> sems at lists.iptel.org
> http://lists.iptel.org/cgi-bin/mailman/listinfo/sems
>
--
www.bembang.com
--
www.bembang.com
More information about the sr-users
mailing list