Srbo,
if your script contains:
if(lookup("location"))
{
t_onfailure("1");
t_relay();
}
you can then create a 'function':
failure_route[1] {
# us this line to just forward to another phone.
rewriteuri("sip:nextphone@domain.com");
#
# or, more complicated, use this recursively:
# use alias table to contain next phone to hunt to:
# your could even create another table, like alias, called
# huntgroup.
#
if(lookup("alias"))
{
t_on_failure("1");
append_branch();
t_relay();
break;
};
t_reply("486", "busy here");
}
you can even create another table in the database, say called huntgroup,
and do a lookup("huntgroup");
---greg
>
>Hello,
>
>Does any of you have any experience with setting up the phone hunt
>system? I am trying to set it up but no luck so far. What I would like
>to happen is this: call comes in, first phone rings. After so many
>seconds it's being redirected to another phone and so on and so forth.
>After the fourth phone i want to redirect the call to my voicemail.
>I tried looking through archieves but I couldn't find anything. Do you
>guys have any suggestions?
>
>thanks,
>
> Srbo Cvetkovic | CityNet, Inc.
> srbo(a)city-net.com | Pittsburgh, PA
> voice: 412.481.5406 | fax: 412.431.1315
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
Hello,
Does any of you have any experience with setting up the phone hunt
system? I am trying to set it up but no luck so far. What I would like
to happen is this: call comes in, first phone rings. After so many
seconds it's being redirected to another phone and so on and so forth.
After the fourth phone i want to redirect the call to my voicemail.
I tried looking through archieves but I couldn't find anything. Do you
guys have any suggestions?
thanks,
Srbo Cvetkovic | CityNet, Inc.
srbo(a)city-net.com | Pittsburgh, PA
voice: 412.481.5406 | fax: 412.431.1315
Hi,
Is there a problem with setting UDP transport type in an application that
is supposed to register with ser? I am able to register a user when i
choose TCP as the transport type in the application but it does not work
when i use UDP. Any clues as to what may be wrong?
Thanks in advance,
Annie
am testing ser-0.8.12-0 on Linux 9.0 using local
MYSQl as database. With simple config file i cud call
between sip endpoints. When i modified the ser.cfg,
all the calls getting diverted to PSTN gw.
herewith i am atccahing config file. can anyone tell
me , where i have gone wrong. herewith i am attaching
the ser.cfg.
thanks in advance
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
Hi,
I was just wondering if you guys had looked at this new spec thats arriving for
inclusion into SER at any point in the future. I think it would be useful for au
tomation of phone system front ends and for inteligent voicemail.. perhaps a SEM
S app instead as its services automation.
Anyhow.. have a read.
http://news.com.com/2100-1032_3-5152900.html?tag=nefd_top
Regards
--
Andrew Delamare
Amadeo Networks Ltd
Sorry,
I've already solved the problem! I watched the debug of sems and realised
that it couldn't writte to /tmp/ivr. So I created that dir and it started
working!
Now I'm having these problems and doubts:
1st. How can I call the IVR to listen to my (or some user) mailbox messages?
How can the caller be equal to the callee so that ivr.py can enter in that
if condition?
2nd. I try to change the python file script in sems.conf by I always got the
ivr.py responding! If I put nothing it will not working(of course), but if I
configured with horoscope.py I got the beaviour of ivr.py
Thanks one more time.
João
-----Original Message-----
From: Joao Sampaio [mailto:est-j-sampaio@ptinovacao.pt]
Sent: quarta-feira, 4 de Fevereiro de 2004 13:09
To: 'serusers(a)lists.iptel.org'
Subject: [Serusers] SEMS IVR
Hello,
I'm trying to work with the IVR from SEMS.
I've looked to the example config file that is in the CVS and I realised
that is very similiar to the one that I have to Voicemail.
So, I just wrote other condition "If" in my Voicemail script so that SEMS
answers with IVR from requests to sip:ivr@domain
What is happening is that SEMS answer the call but them imediatly send a BYE
message and the call is terminated without no answer.
Does anybody had the some problem?
Here is is my Voicemail and Sems config file
Thanks.
Best regards,
João
Sorry,
I've already solved the problem! I watched the debug of sems and realised
that it couldn't writte to /tmp/ivr. So I created that dir and it started
working!
Now I'm having these problems and doubts:
1st. How can I call the IVR to listen to my (or some user) mailbox messages?
How can the caller be equal to the callee so that ivr.py can enter in that
if condition?
2nd. I try to change the python file script in sems.conf by I always got the
ivr.py responding! If I put nothing it will not working(of course), but if I
configured with horoscope.py I got the beaviour of ivr.py
Thanks one more time.
João
-----Original Message-----
From: Joao Sampaio [mailto:est-j-sampaio@ptinovacao.pt]
Sent: quarta-feira, 4 de Fevereiro de 2004 13:09
To: 'serusers(a)lists.iptel.org'
Subject: [Serusers] SEMS IVR
Hello,
I'm trying to work with the IVR from SEMS.
I've looked to the example config file that is in the CVS and I realised
that is very similiar to the one that I have to Voicemail.
So, I just wrote other condition "If" in my Voicemail script so that SEMS
answers with IVR from requests to sip:ivr@domain
What is happening is that SEMS answer the call but them imediatly send a BYE
message and the call is terminated without no answer.
Does anybody had the some problem?
Here is is my Voicemail and Sems config file
Thanks.
Best regards,
João
#
# $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)
debug=4
#fork=no
log_stderror=yes
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"
# ------------------ module loading ----------------------------------
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/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){ #len_gt( 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(1,"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(1,"**************** vm start - begin
******************\n");
if (uri=~"sip:9999@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "announcement"))
{
log(1,"couldn't contact announcement
server\n");
t_reply("500", "couldn not contact
announcement server");
};
log("!!!!!!!!!!!!!!!!!!!!!ANNOUNCEMENT!!!!!!!!!!!!!!!!!!!!!!\n");
}
else if(uri=~"sip:ivr@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "ivr"))
{
log("could not contact ivr
server\n");
t_reply("500","could not contact ivr
server");
};
log
("!!!!!!!!!!!!!!!!!!!!!!!!!IVR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
else if (uri=~"sip:conf@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "conference"))
{
log("Could not contact conference
server\n");
t_reply("500","Could not contact
conference server");
};
log
("!!!!!!!!!!!!!!!!!!!!!CONFERENCE!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
else
{
if(!vm("/tmp/am_fifo","voicemail"))
{
log(1,"could not contact the answer
machine\n");
t_reply("500","could not contact the
answer machine");
};
log("!!!!!!!!!!!!!!!!!!!!!!VOICEMAIL!!!!!!!!!!!!!!!!!!!!!!!!!\n");
};
log(1,"**************** vm start - end
******************\n");
}
else if(method=="BYE")
{
log(1,"**************** vm end - begin
******************\n");
if(!vm("/tmp/am_fifo","bye"))
{
log(1,"could not contact the answer
machine\n");
t_reply("500","could not contact the answer
machine");
};
log(1,"**************** 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");
}
----------------------------------------------------------------------------
---------------------------------------------------
# $Id: sems.conf.sample,v 1.11 2003/11/19 19:03:22 rco 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=1
# 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/vm_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
# 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=welcome_to_number_reader.wav #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 #example.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=wav
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
________________________
João Sampaio
PT Inovação, SA
SRM - Serviços e Redes Móveis
email: est-j-sampaio(a)ptinovacao.pt
Tlf: +351 234511160-1907 / +351 234403421
Hello,
I'm trying to work with the IVR from SEMS.
I've looked to the example config file that is in the CVS and I realised
that is very similiar to the one that I have to Voicemail.
So, I just wrote other condition "If" in my Voicemail script so that SEMS
answers with IVR from requests to sip:ivr@domain
What is happening is that SEMS answer the call but them imediatly send a BYE
message and the call is terminated without no answer.
Does anybody had the some problem?
Here is is my Voicemail and Sems config file
Thanks.
Best regards,
João
#
# $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)
debug=4
#fork=no
log_stderror=yes
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"
# ------------------ module loading ----------------------------------
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/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){ #len_gt( 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(1,"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(1,"**************** vm start - begin
******************\n");
if (uri=~"sip:9999@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "announcement"))
{
log(1,"couldn't contact announcement
server\n");
t_reply("500", "couldn not contact
announcement server");
};
log("!!!!!!!!!!!!!!!!!!!!!ANNOUNCEMENT!!!!!!!!!!!!!!!!!!!!!!\n");
}
else if(uri=~"sip:ivr@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "ivr"))
{
log("could not contact ivr
server\n");
t_reply("500","could not contact ivr
server");
};
log
("!!!!!!!!!!!!!!!!!!!!!!!!!IVR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
else if (uri=~"sip:conf@10.112.64.121")
{
if (!vm("/tmp/am_fifo", "conference"))
{
log("Could not contact conference
server\n");
t_reply("500","Could not contact
conference server");
};
log
("!!!!!!!!!!!!!!!!!!!!!CONFERENCE!!!!!!!!!!!!!!!!!!!!!!!!!\n");
}
else
{
if(!vm("/tmp/am_fifo","voicemail"))
{
log(1,"could not contact the answer
machine\n");
t_reply("500","could not contact the
answer machine");
};
log("!!!!!!!!!!!!!!!!!!!!!!VOICEMAIL!!!!!!!!!!!!!!!!!!!!!!!!!\n");
};
log(1,"**************** vm start - end
******************\n");
}
else if(method=="BYE")
{
log(1,"**************** vm end - begin
******************\n");
if(!vm("/tmp/am_fifo","bye"))
{
log(1,"could not contact the answer
machine\n");
t_reply("500","could not contact the answer
machine");
};
log(1,"**************** 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");
}
----------------------------------------------------------------------------
---------------------------------------------------
# $Id: sems.conf.sample,v 1.11 2003/11/19 19:03:22 rco 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=1
# 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/vm_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
# 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=welcome_to_number_reader.wav #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 #example.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=wav
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
________________________
João Sampaio
PT Inovação, SA
SRM - Serviços e Redes Móveis
email: est-j-sampaio(a)ptinovacao.pt
Tlf: +351 234511160-1907 / +351 234403421