hi,
i cvs co latest sip_router and rel_0_9_0,use the default ser.cfg is work!,and when i
run with sems in Single instance ser,i get :
ERROR: fix_expr : bad re "sip:voicemail+*@*"
Regards,
Rana
sems.conf
ser_fifo_name=/tmp/ser_fifo
socket_name=/tmp/am_sock
send_method=fifo
# ----------- configuration parameters from Stefan ------------------------
#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
# Configure Ser to create a FIFO server
fifo="/tmp/ser_sock"
# Configure FIFO DB
fifo_db_url="mysql://ser:heslo@localhost/ser"
#
# for dbtext:
# create a file usr_preferences in /path/to/dbtext/dir
# with the following contents:
# username(str,null) domain(str,null) attribute(str,null) value(str,null) type(int,null)
# alice:mydomain.com:email:alice at mymail.com:2
# bert:mydomain.com:email:bert at mymail.com:2
#etc. and uncomment the following line
#fifo_db_url="dbtext:///path/to/dbtext/dir"
# ------------------ module loading ----------------------------------
# either dbtext or mysql
# loadmodule "modules/dbtext/dbtext.so"
#
# if installed via make install, modules are in /usr/local/lib/ser/modules/
# (e.g. loadmodule "/usr/local/lib/ser/modules/mysql.so")
loadmodule "modules/mysql/mysql.so"
loadmodule "modules/sl/sl.so"
loadmodule "modules/tm/tm.so"
loadmodule "modules/rr/rr.so"
loadmodule "modules/maxfwd/maxfwd.so"
loadmodule "modules/usrloc/usrloc.so"
loadmodule "modules/registrar/registrar.so"
# if you do not use fifo_db for the email address, but
# e.g. load_avp("ruri","email",0);
# load avp_db.so with
# loadmodule "modules/avp_db/avp_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)
# -- 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 (uri==myself) {
if (method=="REGISTER") {
# make UAs which want to register happy
sl_send_reply("200","OK");
break;
};
# switch to statefull mode:
if (!t_newtran()){
sl_send_reply("500","could not create transaction");
break;
};
if (method=="ACK"){
# absorb ACKs
break;
};
# prevent timeout on the other side:
t_reply("100","Trying - just wait a minute !");
# uncomment this for single ser instance configuration
# dont forget to add user_prefix_separator=+ to sems.conf
# forward to sems plugin directly if r_uri is plugin_name+... at ...
if (uri=~"sip:voicemail+*@*") {
if(!t_write_unix("/tmp/am_sock","voicemail")){
log("could not contact voicemail\n");
t_reply("500","could not contact voicemail");
};
break;
};
if (uri=~"sip:conference+*@*") {
if(!t_write_unix("/tmp/am_sock","conference")){
log("could not contact conference\n");
t_reply("500","could not contact conference");
};
break;
};
if (uri=~"sip:announcement+*@*") {
if(!t_write_unix("/tmp/am_sock","announcement")){
log("could not contact announcementce\n");
t_reply("500","could not contact announcement");
};
break;
};
if (method=="INVITE"){
# redirect the call to the 'conference' plug-in
# if the URI begin with 100
if (uri=~"sip:100.*@") {
# assumes that Sems configuration parameter 'socket_name='
# has been set to /tmp/am_sock
if(!t_write_unix("/tmp/am_sock","conference")) {
t_reply("500","error contacting sems");
};
break;
};
# redirect the call to the 'announcement' plug-in
# if the URI begin with 200
if (uri=~"sip:200.*@") {
if(!t_write_unix("/tmp/am_sock","announcement")) {
t_reply("500","error contacting sems");
};
break;
};
# no service number, redirect to voicemail.
# do not forget to load AVPs so that voicemail gets the
# callee's email address.
#load_avp("ruri","email",0);
if(!t_write_unix("/tmp/am_sock","voicemail")) {
t_reply("500","error contacting sems");
};
break;
}
else if (method=="BYE" || method=="CANCEL") {
# Sems should already know which plug-in is handling that
# call. "bye" is no plug-in name. It is a reserved name which
# tells Sems to terminate the call.
if(!t_write_unix("/tmp/am_sock","bye")) {
t_reply("500","error contacting sems");
};
};
};
# 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();
};
}
----
ZhongShan Ether Network Security Inc
---------------------------------------------------------