Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; };
# we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route();
# Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; };
if (uri == myself) {
if (method=="REGISTER") {
# Uncomment this if you want to use digest authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; };
/* # if i comment this out then the call is being redirected to my voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin
if(method=="ACK" || method=="INVITE" || method=="BYE"){
if(t_newtran()){
t_reply("100","Trying -- just wait a minute !");
if(method=="INVITE"){ log("**************** vm start - begin * *****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start - end *** ***************\n"); break; };
if(method=="BYE"){ log("**************** vm end - begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end };
# 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(); }; }
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Hi,
you need to setup 2 ser servers if u want to use voicemail.
One Server as "regular" sip proxy and one ser-server as dedicated voicemail server (on a different port if on the same machine).
Then you route the calls from the "regular" ser server to the dedicated voicemail server if the call isnt answered after a certain amount of time.
You cant define the timeout in means of "rings" because the ser server doesnt know how often an UAC will ring.
If you search the mail archive you will find several example configs for this setup.
best regards,
Arnd
Hi Arnd,
I have searched the archieves and I have found examples that I have implemented. I am running two instances of ser server with ser -f /ser.cfg and ser -f /voicemail.cfg. The respected conf fiiles are below. Now, when I call and after so many seconds my call is being redirected i get Call Failed: 404 Not Found and no voicemail turned on. Then i added that user to the grp table with serctl command like this serctl acl grant username voicemail. After I do that i get Hung up after i try to call that user. It rings for 20 seconds and then it justs hangs up. Any Ideas?
# # $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 andrei Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd) #fork=yes #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"
# ------------------ 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/group.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")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
# time to give up on ringing -- global timer, applies to # all transactions modparam("tm", "fr_inv_timer", 30)
# ------------------------- request routing logic -------------------
# main 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("vm_host:5090"); t_relay_to_udp("vm_host", "5090"); }
# if forwarding downstream did not succeed, try voicemail running # at vm_host:5090
failure_route[1] { revert_uri(); rewritehostport("vm_host:5090"); append_branch(); t_relay_to_udp("vm_host", "5090"); }
//////////////////////////////////////////////// # # $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"
# ------------------ 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 (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("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:1000@.*" || uri=~"sip:1001@.*") { if (!vm("/tmp/am_fifo", "announcement")) { log("couldn't contact announcement serve r\n"); t_reply("500", "couldn not contact annou ncement server"); }; } else { if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answer machin e\n"); t_reply("500","could not contact the ans wer 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 mach ine"); }; 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"); }
On Monday, January 12, 2004, at 03:34 PM, Arnd Vehling wrote:
Hi,
you need to setup 2 ser servers if u want to use voicemail.
One Server as "regular" sip proxy and one ser-server as dedicated voicemail server (on a different port if on the same machine).
Then you route the calls from the "regular" ser server to the dedicated voicemail server if the call isnt answered after a certain amount of time.
You cant define the timeout in means of "rings" because the ser server doesnt know how often an UAC will ring.
If you search the mail archive you will find several example configs for this setup.
best regards,
Arnd
NetHead Network Design and Security Arnd Vehling av@nethead.De Gummersbacherstr. 27 Phone: +49 221 8809210 50679 Köln Fax : +49 221 8809212
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Could you send us SIP dumps ?
Jan.
On 15-01 11:58, Srbislav Cvetkovic wrote:
Hi Arnd,
I have searched the archieves and I have found examples that I have implemented. I am running two instances of ser server with ser -f /ser.cfg and ser -f /voicemail.cfg. The respected conf fiiles are below. Now, when I call and after so many seconds my call is being redirected i get Call Failed: 404 Not Found and no voicemail turned on. Then i added that user to the grp table with serctl command like this serctl acl grant username voicemail. After I do that i get Hung up after i try to call that user. It rings for 20 seconds and then it justs hangs up. Any Ideas?
# # $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 andrei Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd) #fork=yes #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"
# ------------------ 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/group.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")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
# time to give up on ringing -- global timer, applies to # all transactions modparam("tm", "fr_inv_timer", 30)
# ------------------------- request routing logic -------------------
# main 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("vm_host:5090"); t_relay_to_udp("vm_host", "5090");
}
# if forwarding downstream did not succeed, try voicemail running # at vm_host:5090
failure_route[1] { revert_uri(); rewritehostport("vm_host:5090"); append_branch(); t_relay_to_udp("vm_host", "5090"); }
//////////////////////////////////////////////// # # $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"
# ------------------ 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 (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("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:1000@.*" || uri=~"sip:1001@.*") { if (!vm("/tmp/am_fifo", "announcement")) { log("couldn't contact announcement serve r\n"); t_reply("500", "couldn not contact annou ncement server"); }; } else { if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answer machin e\n"); t_reply("500","could not contact the ans wer 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 mach ine"); }; 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"); }
On Monday, January 12, 2004, at 03:34 PM, Arnd Vehling wrote:
Hi,
you need to setup 2 ser servers if u want to use voicemail.
One Server as "regular" sip proxy and one ser-server as dedicated voicemail server (on a different port if on the same machine).
Then you route the calls from the "regular" ser server to the dedicated voicemail server if the call isnt answered after a certain amount of time.
You cant define the timeout in means of "rings" because the ser server doesnt know how often an UAC will ring.
If you search the mail archive you will find several example configs for this setup.
best regards,
Arnd
NetHead Network Design and Security Arnd Vehling av@nethead.De Gummersbacherstr. 27 Phone: +49 221 8809210 50679 Köln Fax : +49 221 8809212
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Jan, how do you get SIP dumps? Do you mean log files from /var/log/messages ?
On Tuesday, January 20, 2004, at 10:34 AM, Jan Janak wrote:
Could you send us SIP dumps ?
Jan.
On 15-01 11:58, Srbislav Cvetkovic wrote:
Hi Arnd,
I have searched the archieves and I have found examples that I have implemented. I am running two instances of ser server with ser -f /ser.cfg and ser -f /voicemail.cfg. The respected conf fiiles are below. Now, when I call and after so many seconds my call is being redirected i get Call Failed: 404 Not Found and no voicemail turned on. Then i added that user to the grp table with serctl command like this serctl acl grant username voicemail. After I do that i get Hung up after i try to call that user. It rings for 20 seconds and then it justs hangs up. Any Ideas?
# # $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 andrei Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd) #fork=yes #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"
# ------------------ 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/group.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")
# -- rr params -- # add value to ;lr param to make some broken UAs happy modparam("rr", "enable_full_lr", 1)
modparam("group", "db_url", "mysql://ser:heslo@localhost/ser")
# time to give up on ringing -- global timer, applies to # all transactions modparam("tm", "fr_inv_timer", 30)
# ------------------------- request routing logic -------------------
# main 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("vm_host:5090"); t_relay_to_udp("vm_host", "5090");
}
# if forwarding downstream did not succeed, try voicemail running # at vm_host:5090
failure_route[1] { revert_uri(); rewritehostport("vm_host:5090"); append_branch(); t_relay_to_udp("vm_host", "5090"); }
//////////////////////////////////////////////// # # $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"
# ------------------ 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 (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("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:1000@.*" || uri=~"sip:1001@.*") { if (!vm("/tmp/am_fifo", "announcement")) { log("couldn't contact announcement serve r\n"); t_reply("500", "couldn not contact annou ncement server"); }; } else { if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answer machin e\n"); t_reply("500","could not contact the ans wer 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 mach ine"); }; 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"); }
On Monday, January 12, 2004, at 03:34 PM, Arnd Vehling wrote:
Hi,
you need to setup 2 ser servers if u want to use voicemail.
One Server as "regular" sip proxy and one ser-server as dedicated voicemail server (on a different port if on the same machine).
Then you route the calls from the "regular" ser server to the dedicated voicemail server if the call isnt answered after a certain amount of time.
You cant define the timeout in means of "rings" because the ser server doesnt know how often an UAC will ring.
If you search the mail archive you will find several example configs for this setup.
best regards,
Arnd
NetHead Network Design and Security Arnd Vehling av@nethead.De Gummersbacherstr. 27 Phone: +49 221 8809210 50679 Köln Fax : +49 221 8809212
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Jan, how do you get SIP dumps? Do you mean log files from /var/log/messages ?
no. He means sip protocol traces. There are several ways to get them.
You can use
- ngrep (works on the unix server) - tcpdump (unix + windows) - ethereal (unix + windows)
to grab the sip packets from the network interface. If you have installed "ngrep" you can just do a:
ngrep -d eth0 src port 5060 or dst port 5060
better, redirect all to a file for futher investigation:
ngrep -d eth0 src port 5060 or dst port 5060 > /tmp/siplog &
in case youre sip port (on the server) is 5060 and youre network interface is "eth0".
In addition you can install the "xlite" softfone from xten.com. It has a debug option which will display all sip messages in a window. This is very convenient for debugging from notebook at a customer site etc.
best regards,
Arnd
Thanks Arnd,
I'll install ngrep now and give it a shot. i'll post the results. On Tuesday, January 20, 2004, at 04:04 PM, Arnd Vehling wrote:
Jan, how do you get SIP dumps? Do you mean log files from /var/log/messages ?
no. He means sip protocol traces. There are several ways to get them.
You can use
- ngrep (works on the unix server)
- tcpdump (unix + windows)
- ethereal (unix + windows)
to grab the sip packets from the network interface. If you have installed "ngrep" you can just do a:
ngrep -d eth0 src port 5060 or dst port 5060
better, redirect all to a file for futher investigation:
ngrep -d eth0 src port 5060 or dst port 5060 > /tmp/siplog &
in case youre sip port (on the server) is 5060 and youre network interface is "eth0".
In addition you can install the "xlite" softfone from xten.com. It has a debug option which will display all sip messages in a window. This is very convenient for debugging from notebook at a customer site etc.
best regards,
Arnd
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Ok guys,
here is the sip trace. Hope this helps to find what the problem is:
thanks
U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 198.14 4.32.65:5060..From: Srbo sip:1001@198.144.32.68;tag=1663827790..To: <sip: 1000@198.144.32.68>..Call-ID: CA50CABB-4B95-11D8-B5C4-003065570D52@198.144. 32.65..CSeq: 24427 INVITE..Server: Sip EXpress router (0.8.11 (i386/freebsd ))..Content-Length: 0..Warning: 392 198.144.32.68:5060 "Noisy feedback tell s: pid=15207 req_src_ip=198.144.32.65 req_src_port=5060 in_uri=sip:1000@19 8.144.32.68 out_uri=sip:1000@198.144.32.66:5060 via_cnt==1".... ########### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. ### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. ####### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. #
On Tuesday, January 20, 2004, at 04:04 PM, Arnd Vehling wrote:
Jan, how do you get SIP dumps? Do you mean log files from /var/log/messages ?
no. He means sip protocol traces. There are several ways to get them.
You can use
- ngrep (works on the unix server)
- tcpdump (unix + windows)
- ethereal (unix + windows)
to grab the sip packets from the network interface. If you have installed "ngrep" you can just do a:
ngrep -d eth0 src port 5060 or dst port 5060
better, redirect all to a file for futher investigation:
ngrep -d eth0 src port 5060 or dst port 5060 > /tmp/siplog &
in case youre sip port (on the server) is 5060 and youre network interface is "eth0".
In addition you can install the "xlite" softfone from xten.com. It has a debug option which will display all sip messages in a window. This is very convenient for debugging from notebook at a customer site etc.
best regards,
Arnd
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
And here is the ngrep result when user 1000 is not in the voicemail group:
## U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 198.14 4.32.65:5060..From: Srbo sip:1001@198.144.32.68;tag=70610200..To: <sip:10 00@198.144.32.68>..Call-ID: E3710CA6-4B96-11D8-B5C4-003065570D52@198.144.32 .65..CSeq: 30458 INVITE..Server: Sip EXpress router (0.8.11 (i386/freebsd)) ..Content-Length: 0..Warning: 392 198.144.32.68:5060 "Noisy feedback tells: pid=15204 req_src_ip=198.144.32.65 req_src_port=5060 in_uri=sip:1000@198. 144.32.68 out_uri=sip:1000@198.144.32.66:5060 via_cnt==1".... ############## U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 404 Not Found and no voicemail turned on..Via: SIP/2.0/UDP 198.144. 32.65:5060..From: Srbo sip:1001@198.144.32.68;tag=1509471236..To: <sip:19 8.144.32.68>;tag=63ab95fa31ff4f36ffb6c5935d377e1a.e39b..Call-ID: F5EC85D9-4 B96-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 49 INVITE..Server: Sip EXpr ess router (0.8.11 (i386/freebsd))..Content-Length: 0..Warning: 392 198.144 .32.68:5060 "Noisy feedback tells: pid=15207 req_src_ip=198.144.32.65 req_ src_port=5060 in_uri=sip:198.144.32.68 out_uri=sip:198.144.32.68 via_cnt==1 ".... I get a correct voicemail error I guess. But then why doesn't it work when i add this user to the grp table?
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Hi,
can you send the log as ascii-attachment. The debug is totally mangled in my mail window.
Question: Did you setup 2 ser daemons with one only serving sems/voicemail and the other relaying to the second?
-- Arnd
Ok,
I have placed the log in a file that I am attaching to this message. I have two instances of ser running: /usr/local/sbin/ser -f /usr/local/etc/ser/ser.cfg /usr/local/sbin/ser -f /usr/local/etc/ser/voicemail.cfg
they both have different fifo files, and one is only serving sems/voicemail and the other one is relaying to the second one. The regular ser is listening on port 5060, and voicemail is listening on port 5090.
If you need my config files, I can attach them as well. But I used the example ones I found in the archives.
thanks,
On Tuesday, January 20, 2004, at 05:46 PM, Arnd Vehling wrote:
Hi,
can you send the log as ascii-attachment. The debug is totally mangled in my mail window.
Question: Did you setup 2 ser daemons with one only serving sems/voicemail and the other relaying to the second?
-- Arnd
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Your user agent didn't send ACK, ser keeps resending 200 OK.
Jan.
On 20-01 17:18, Srbislav Cvetkovic wrote:
Ok guys,
here is the sip trace. Hope this helps to find what the problem is:
thanks
U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 198.14 4.32.65:5060..From: Srbo sip:1001@198.144.32.68;tag=1663827790..To: <sip: 1000@198.144.32.68>..Call-ID: CA50CABB-4B95-11D8-B5C4-003065570D52@198.144. 32.65..CSeq: 24427 INVITE..Server: Sip EXpress router (0.8.11 (i386/freebsd ))..Content-Length: 0..Warning: 392 198.144.32.68:5060 "Noisy feedback tell s: pid=15207 req_src_ip=198.144.32.65 req_src_port=5060 in_uri=sip:1000@19 8.144.32.68 out_uri=sip:1000@198.144.32.66:5060 via_cnt==1".... ########### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. ### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. ####### U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. # U 198.144.32.68:5060 -> 198.144.32.65:5060 SIP/2.0 200 OK..Record-Route: <sip:1000@198.144.32.68;ftag=1663827790;lr=on
..Via: SIP/2.0/UDP 198.144.32.65:5060..From: Srbo
sip:1001@198.144.32.68 ;tag=1663827790..To: sip:1000@198.144.32.68;tag=00003B881BF04290..Call-ID : CA50CABB-4B95-11D8-B5C4-003065570D52@198.144.32.65..CSeq: 24427 INVITE..S erver: Sip EXpress router (0.8.11 (i386/freebsd))..Content-Length: 130..Con tact: sip:1000@198.144.32.68..Content-Type: application/sdp..Warning: 392 198.144.32.68:5090 "Noisy feedback tells: pid=15225 req_src_ip=198.144.32 .68 req_src_port=5060 in_uri=sip:1000@198.144.32.68:5090 out_uri=sip:1000@1 98.144.32.68:5090 via_cnt==0"....v=0..o=username 0 0 IN IP4 198.144.32.68.. s=session..c=IN IP4 198.144.32.68..t=0 0..m=audio 7628 RTP/AVP 0..a=rtpmap: 0 pcmu/8000.. #
On Tuesday, January 20, 2004, at 04:04 PM, Arnd Vehling wrote:
Jan, how do you get SIP dumps? Do you mean log files from /var/log/messages ?
no. He means sip protocol traces. There are several ways to get them.
You can use
- ngrep (works on the unix server)
- tcpdump (unix + windows)
- ethereal (unix + windows)
to grab the sip packets from the network interface. If you have installed "ngrep" you can just do a:
ngrep -d eth0 src port 5060 or dst port 5060
better, redirect all to a file for futher investigation:
ngrep -d eth0 src port 5060 or dst port 5060 > /tmp/siplog &
in case youre sip port (on the server) is 5060 and youre network interface is "eth0".
In addition you can install the "xlite" softfone from xten.com. It has a debug option which will display all sip messages in a window. This is very convenient for debugging from notebook at a customer site etc.
best regards,
Arnd
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
In addition to the sip trace log file I would like to include the /var/log/messages output. It might help.
Jan 21 16:33:27 krillin /usr/local/sbin/ser[530]: ERROR: t_forward_nonack: no branched for fwding Jan 21 16:33:27 krillin /usr/local/sbin/ser[530]: ERROR: failure_route: t_relay_to failed Jan 21 16:33:27 krillin /usr/local/sbin/ser[530]: ERROR: on_negative_reply: Error in do_action Jan 21 16:33:28 krillin Sems[516]: Error: waiting for fifo reply from ser, timeout Jan 21 16:33:28 krillin Sems[516]: Error: while getting return code from Ser Jan 21 16:33:28 krillin Sems[516]: Error: 500 could not send response. Jan 21 16:33:29 krillin Sems[516]: Error: waiting for fifo reply from ser, timeout Jan 21 16:33:29 krillin Sems[516]: Error: while getting return code from Ser
thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Regarding your config, if you want the call to be redirected to voicemail when the callee is not registered (instead of getting 404), you should redirect the call to voicemail in the if (!lookup("location")) condition. The condition will be true if the callee is not registered.
Yes, it is strange that you don't have system logs in /var/log.
Jan.
On 12-01 14:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC
DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" || method=="BYE"){ if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end -
begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
HI guys,
I have a qustion. How do you start two instances of ser on one host? serctl help does not have that option listed.
thanks, On Tuesday, January 13, 2004, at 04:53 AM, Jan Janak wrote:
Regarding your config, if you want the call to be redirected to voicemail when the callee is not registered (instead of getting 404), you should redirect the call to voicemail in the if (!lookup("location")) condition. The condition will be true if the callee is not registered.
Yes, it is strange that you don't have system logs in /var/log.
Jan.
On 12-01 14:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC
DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" ||
method=="BYE"){
if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end -
begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Hello, you must set a different port for each instance (within config files or using command line options) and, also, strong recommended, different fifo files.
You have to duplicate serctl and change one to use the other fifo file. I am not aware of serctl supporting many fifo files in the same time, but I might be wrong.
Also, you can start ser from console providing as parameter which config file to use with 'ser -f /path/to/config/file'. 'ser -h' lists all command line parameters.
Daniel
On 1/13/2004 6:48 PM, Srbislav Cvetkovic wrote:
HI guys,
I have a qustion. How do you start two instances of ser on one host? serctl help does not have that option listed.
thanks, On Tuesday, January 13, 2004, at 04:53 AM, Jan Janak wrote:
Regarding your config, if you want the call to be redirected to voicemail when the callee is not registered (instead of getting 404), you should redirect the call to voicemail in the if (!lookup("location")) condition. The condition will be true if the callee is not registered.
Yes, it is strange that you don't have system logs in /var/log.
Jan.
On 12-01 14:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC
DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" || method=="BYE"){ if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end -
begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
We support multi-ser instances per machine. We use ipaliases, eg:
/sbin/ifconfig eth0:0 10.2.1.10 netmask 255.255.255.255 up /sbin/route add 10.2.1.10 dev eth0:0
we then make a directory:
mkdir /tmp/ser_fifo
Then the top of each configuration file:
debug=2 log_stderror=no listen=10.2.1.10 port=5060 children=4
fifo="/tmp/ser_fifo/unique.com" alias="unique.com" alias="proxy.unique.com" alias="nat.unique.com" alias="10.2.1.10"
Then start the thing with ser -f unique.com.cfg
where unique.com.cfg is the file above...YMMV unique.com is not a real site, just a name placeholder...
If you are using mysql you will get TONS of dbopens, the old postgres also does TONS of opens. I hacked my SER to wait on the dbopen. I've attempted a couple of times to check in the hacked code but always run into problems (operator I'm sure).
I can send you the modified postgres code if you are using that, otherwise, there may be an issue with the number of open db connections if you start more than a couple. I currently have about 8 ser instances running on a single box, with only 16 db connections between them.
My experience with multiple servers on a single box has been mixed. The main thing is debugging is more difficult. You have to capture traffic from the lo (loopback) interface as well as the ethernet interface, looking at two ngrep traces can be confusing.
I like to use tcpdump or ethereal to capture and look at sipscene traces, this is impossible with loopback. I have tried everything to merge (tethereal, mergecap, etc) a loopback capture and a ethernet capture, they don't mix!
What I ended up having to do was put servers on separate boxes so I can capture the traces to debug! So I keep:
external servers (inbound/outbound pstn/sip/enum) on a set of boxes. external interfaces (proxy/registration servers for customers) on a set of boxes. voicemail / media servers on a set of boxes.
I then use a cisco switch/port monitoring to give me a sniffable feed to do packet traces. I highly recommend getting traces to work, otherwise, debugging is a major pain!
Good luck,
---greg
Daniel-Constantin Mierla wrote:
Hello, you must set a different port for each instance (within config files or using command line options) and, also, strong recommended, different fifo files.
You have to duplicate serctl and change one to use the other fifo file. I am not aware of serctl supporting many fifo files in the same time, but I might be wrong.
Also, you can start ser from console providing as parameter which config file to use with 'ser -f /path/to/config/file'. 'ser -h' lists all command line parameters.
Daniel
On 1/13/2004 6:48 PM, Srbislav Cvetkovic wrote:
HI guys,
I have a qustion. How do you start two instances of ser on one host? serctl help does not have that option listed.
thanks, On Tuesday, January 13, 2004, at 04:53 AM, Jan Janak wrote:
Regarding your config, if you want the call to be redirected to voicemail when the callee is not registered (instead of getting 404), you should redirect the call to voicemail in the if (!lookup("location")) condition. The condition will be true if the callee is not registered.
Yes, it is strange that you don't have system logs in /var/log.
Jan.
On 12-01 14:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC
DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" || method=="BYE"){ if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end -
begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Jan Janak wrote:
On 13-01 12:38, Greg Fausak wrote:
old postgres also does TONS of opens. I hacked my SER to wait on the dbopen. I've attempted a couple of times to check in the hacked code but always run into problems (operator I'm sure).
What problems ?
Jan.
I tried to 'check in', couldn't figure out how to do it.
I did it once before, probably too long between updates?
---greg
If you have a really old tree on your local disk (for example if you didn't do check out or update for a long time), then you must do cvs update first.
But if it is a really old tree then it would be better to check out another fresh source tree, do your changes there and commit them, for example:
cvs co sip_router cd sip_router make the changes cvs ci
Jan.
On 13-01 15:10, Greg Fausak wrote:
Jan Janak wrote:
On 13-01 12:38, Greg Fausak wrote:
old postgres also does TONS of opens. I hacked my SER to wait on the dbopen. I've attempted a couple of times to check in the hacked code but always run into problems (operator I'm sure).
What problems ?
Jan.
I tried to 'check in', couldn't figure out how to do it.
I did it once before, probably too long between updates?
---greg
Hi Srbislav,
did you modify the sources and/or makefiles to get sems run on openbsd (which version)? If you did, could you please post a diff?
Thanks,
Uli.
On Monday 12 January 2004 20:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my
voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" || method=="BYE"){ if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end -
begin *** ***************\n"); if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end - end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
HI Ulrich,
I am running openbsd 3.4 I did not have to modify any of the makefiles. Although the first time I tried to install I got a lot of errors. I downloaded sems-0.1.0 and used gmake command. That worked. I used gmake all and later gmake install.
I can send you the diffs, but there is no point cause I really haven't changed them at all.
On Tuesday, January 13, 2004, at 06:22 AM, Ulrich Abend wrote:
Hi Srbislav,
did you modify the sources and/or makefiles to get sems run on openbsd (which version)? If you did, could you please post a diff?
Thanks,
Uli.
On Monday 12 January 2004 20:57, Srbislav Cvetkovic wrote:
Hi to all,
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser. However now the call is being directed to my voicemail system and the phone does not ring at all. Is there a setting that will allow me to set up the number of rings before it gets redirected to my voicemail? Below are my ser.cfg and sems.conf files.
I have mysql version of ser working. Also there is one problem. I have no log files for some reason. From the documentation that I 've read it says that it should be in system log file. I have no system log file in /var/log . Isn't that strange? I successfuly receive all of my voice messages though.
////////////////////// ser.cfg
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 (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # Make MSN Messenger happy... if (method=="REGISTER") { sl_send_reply("200","ok"); break; }; if (uri == myself) { if (method=="REGISTER") { # Uncomment this if you want to use digest
authentication if (!www_authorize("myhost.com", "subscriber")) { www_challenge("myhost.com", "0"); break; };
save("location"); break; }; /* # if i comment this out then the call is being redirected to my
voicemail # if it's not commented out, then I get 404 User Not Found error while dialing # native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; */
# Voicemail specific configuration - begin if(method=="ACK" || method=="INVITE" ||
method=="BYE"){
if(t_newtran()){ t_reply("100","Trying -- just wait a
minute !");
if(method=="INVITE"){ log("**************** vm
start
- begin *
*****************\n");
if(!vm("/tmp/am_fifo","voicemail")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm start
- end ***
***************\n"); break; };
if(method=="BYE"){ log("**************** vm end
begin *** ***************\n");
if(!vm("/tmp/am_fifo","bye")){ log("could not contact the answe r machine\n"); t_reply("500","could not contact the answer machine"); }; log("**************** vm end
end ***** *************\n"); break; }; } else { log("could not create new transaction\n"); sl_send_reply("500","could not create new transacti on"); }; };
# Voicemail specific configuration - end }; # 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(); };
}
//////////////////////// sems.conf
# # 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=yes
# optional parameter: stderr={yes|no} # # - debug mode: do not fork and log to stderr stderr=no
# optional parameter: loglevel={0|1|2|3} # # - sets log level (error=0, warning=1, info=2, debug=3) loglevel=1
# optional parameter: fifo_name=<filename> # # - path and file name of our fifo file fifo_name=/tmp/am_fifo
# optional parameter: ser_fifo_name=<filename> # # - path and file name of Ser's fifo file 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/
################################## # voicemail specific parameters # ##################################
# optional parameter: announce_path=<path> # # - sets the path where announce files are searched for announce_path=/usr/local/lib/sems/audio/
# optional parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# optional parameter: max_record=<seconds> # # - maximum record time max_record=30
# 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
Thanks,
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Srbo Cvetkovic | CityNet, Inc. srbo@city-net.com | Pittsburgh, PA voice: 412.481.5406 | fax: 412.431.1315
On Tue, 2004-01-13 at 03:22, Ulrich Abend wrote:
Hi Srbislav,
did you modify the sources and/or makefiles to get sems run on openbsd (which version)? If you did, could you please post a diff?
I can't speak for Srbislav, but when I put sems on an OpenBSD server I had to modify a few things. The primary issue is that OpenBSD's dl(3) interface doesn't support RTLD_NOW and some of the module exports have C++-mangled names that can't be resolved (e.g. "foo" vs. "_foo"). I think that was about it.
Thanks,
Uli.
-- Chris.
I am new to ser and sems. I was able to setup ser on openbsd and make a call from one user agent to another. Then I installed sems and after some playing around i was able to make it work with ser.
[snip]
-- Chris Bond Xten Networks, Inc.