Jerry always copy to thje serusers. Personally idon't have an answer to that at the moment.
-----Original Message----- From: jerry [mailto:jerryws@sohu.com] Sent: Monday, August 30, 2004 4:34 PM To: Wilson Abigaba Subject: Re: RE: [Serusers] serweb login problem
Wilson Abigaba,
Thank you very much.I got it. I have another question now.I am using sems_2004-07-27 and ser-0.8.14.My main aim is to play the announcement and send an email to called if the called who is offline.I don't know what's wrong with it.
ser.cfg: # # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 andrei Exp $ # # simple quick-start config script #
# ----------- global configuration parameters ------------------------
debug=7 # 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 ----------------------------------
#added by yzg 20040820 #reply_to_via=no #uid="nobody" #gid="nobody"
# 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"
#added by yzg 20040820 loadmodule "/usr/local/lib/ser/modules/vm.so" #loadmodule "/usr/local/lib/ser/modules/acc.so" #loadmodule "/usr/local/lib/ser/modules/exec.so" #loadmodule "/usr/local/lib/ser/modules/group.so" #loadmodule "/usr/local/lib/ser/modules/print.so" #loadmodule "/usr/local/lib/ser/modules/textops.so" #loadmodule "/usr/local/lib/ser/modules/uri.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) #added by yzg 20040825 #modparam("usrloc", "db_url", "sql://ser:<heslo>@localhost/ser")
#added by yzg 20040820 #modparam("usrloc","timer_interval",10) #modparam("voicemail", "db_url","/usr/local/lib/ser/modles")
# -- 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)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with # max_forwards==0, or excessively long requests if (!mf_process_maxfwd_header("10")) { sl_send_reply("483","Too Many Hops"); break; }; if ( msg:len > max_len ) { sl_send_reply("513", "Message too big"); break; };
# 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 if (loose_route()) { t_relay(); break; };
# if the request is for other domain use UsrLoc # (in case, it does not work, use the following command # with proper names and addresses in it) if (uri==myself) {
if (method=="REGISTER") { save("location"); break; }; #added by yzg 20040830 if(method=="INVITE" || method=="ACK" || method=="BYE" || method=="CANCEL"){ if (!t_newtran()) { sl_send_reply("500","could not create transaction"); break; }; t_reply("100","Trying - just wait a minute !");
if (method=="INVITE") { log("in to the invite"); if(!vm("/tmp/am_fifo","announcement")) { log("could not contact announcement server"); t_reply("500","error contacting sems"); }; break; } else if (method=="BYE" || method=="CANCEL") { if(!vm("/tmp/am_fifo","bye")) { t_reply("500","error contacting sems"); }; break; }; };
# native SIP destinations are handled using our USRLOC DB if (!lookup("location")) { sl_send_reply("404", "Not Found"); break; }; }; # forward to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP if (!t_relay()) { sl_reply_error(); };
}
sems.conf: # 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 ser_fifo_name=/tmp/ser_fifo
send_method=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 config.voicemail=inline
rec_file_extension=wav
announce_path=/usr/local/lib/sems/audio/
# parameter: default_announce=<filename> # # - sets the name of the default announce WAV file default_announce=default_en.wav
# parameter: max_record_time=<seconds> # # - maximum record time max_record_time=30
# parameter: accept_delay=<x> # # - delays accepting of the call for x seconds # - default value is 0 accept_delay=0
# parameter: email_template_path=<filename> # # - email templates path # # See the README file in <sems-src>/plug-in/voicemail # for more information on the syntax used. # email_template_path=/usr/local/etc/sems/
# 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/ default_announce=default_en.wav
# end of configuration section for announcement module config.announcement=end
# sample isdngw module configuration (external file) # config.isdngw=/etc/isdngw.conf
# sample ivr module configuration (inline) config.ivr=inline ivr_script_path=/etc/ivr/ # default script file: this will be executed if <user>.py does not exist. # ivr_script_file=ivr.py
tts_caching=y
# parameter : tts_cache_path # path to cache waves # path must exist! tts_cache_path=/tmp/wavs # end of configuration section for ivr module config.ivr=end
# sample conference configuration (inline) config.conference=inline
# parameter: default_announce=<filename> # # - sets the full pathed name of the default announce WAV file. # Will be played to lonely users. default_announce=/usr/local/lib/sems/audio/first_participant.wav
# end of configuration section for conference module config.conference=end
# example configuration for number reader config.number_reader=inline
number_path=/usr/local/lib/sems/audio/
prolog_file=welcome_to_number_reader.wav
epilog_file=thanks_calling_number_reader.wav
# end of number_reader configuration config.number_reader=end
= = = = = = = = = = = = = = = = = = = =
jerry jerryws@sohu.com 2004-08-30
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001
---
Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.282 / Virus Database: 150 - Release Date: 9/25/2001