hello friends,
as in the mailing list archive about the sems with ivr
i followed the instrucions as mentioned by some
1) in ser.cfg iam loading the module tm.so
2) in sems.conf iam usieng ivr path
3) in ser.cfg iam useing like
if(!vm("/tmp/am_fifo","ivr"))
and my ser.cfg
# ----------- global configuration parameters
------------------------
debug=8 # 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
#*/
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"
# ------------------ 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/vm.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"
# ----------------- 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)
# -- 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("usrloc","db_url","mysql://ser:heslo@localhost:3306/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
#voicemail
modparam("voicemail","db_url","mysql://ser:heslo@localhost:3306/ser")
modparam("voicemail","subscriber_table","subscriber")
modparam("voicemail","email_column","email_address")
# ------------------------- request routing logic
-------------------
# main routing logic
route{
# 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 ) {
sl_send_reply("513", "Message too
big");
break;
};
record_route();
if (loose_route()) {
t_relay();
break;
};
if (uri==myself) {
if (method=="REGISTER") {
save("location");
break;
};
if ( method=="ACK" || method=="INVITE" ||
method=="BYE" || method=="CANCEL" )
{
if (!t_newtran())
{
sl_send_reply("500","could not create transaction");
break;
};
t_reply("100","Trying - just wait
a minute !");
if (method=="INVITE")
{
log("in to the invite");
if(!vm("/tmp/am_fifo","ivr"))
{
log("could not contact announcement server");
t_reply("500","error contacting sems");
};
break;
}
else if (method=="BYE" ||
method=="CANCEL")
{
if(!vm("/tmp/am_fifo","bye"))
{
t_reply("500","error
contacting sems");
};
break;
};
};
# native SIP destinations are handled
using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not
Found");
break;
};
};
# 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();
};
}
and my sems.conf
[root@server1 sems]# cat sems.conf
##################################
# global parameters #
##################################
fork=yes
stderr=no
loglevel=1
fifo_name=/tmp/am_fifo
ser_fifo_name=/tmp/ser_fifo
plugin_path=/usr/local/lib/sems/plug-in
smtp_server=localhost
smtp_port=25
##################################
# module specific parameters #
##################################
config.voicemail=inline
rec_file_extension=wav
announce_path=/usr/local/lib/sems/audio/
default_announce=default_en.wav
max_record_time=30
accept_delay=0
email_template_path=/usr/local/etc/sems/
config.voicemail=end
config.announcement=inline
announce_path=/usr/local/lib/sems/audio/
default_announce=default_en.wav
config.announcement=end
config.ivr=inline
ivr_script_path=/root/answer_machine/plugin/ivr/script
ivr_script_file=ivr.py
tts_caching=y
tts_cache_path=/tmp/wavs
config.ivr=end
config.conference=inline
default_announce=/usr/local/lib/sems/audio/first_participant.wav
config.conference=end
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
config.number_reader=end
and the output iam getting are as followed
(1254) ERROR: reply (AmRequest.cpp:335):
AmRequestUAS::reply: 500 command 't_reply' not
available
my aim is to run the ivr.py and to get the
dtmf recorded in to a variable .
when i run the command serctl fifo which
it doesnot shows t_relay porcess in that
so any hints to go from here
your help will be highly appreciated
with regards
v r kanth
__________________________________
Do you Yahoo!?
Send holiday email and support a worthy cause. Do good.
http://celebrity.mail.yahoo.com