[Serusers] SER+SEMS problem

Gareth C. Fowler gareth.fowler at inetnoc.net
Mon Aug 8 09:20:30 CEST 2005


I'm having real difficulties connecting SER to SEMS, I've followed the
configuration files, but it doesn't seem to work.

For example if I dial 666 for echo according to the logs it connects, but
then instantly disconnects, I've included below my ser.cfg & sems.cfg files,
if someone wouldn't mind giving me some help.

Thanks.

G.


ser.cfg
-----------------------------
debug=7
fork=yes
log_stderror=no
port=5060
children=4
dns=no
rev_dns=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"

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/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/xlog.so"

modparam("auth_db|uri_db|usrloc|acc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "rtpproxy_sock", "unix:/var/run/rtpproxy.sock")
modparam("usrloc", "db_mode", 2)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "db_flag", 1)
modparam("acc", "log_missed_flag", 2)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "report_cancels", 1)

route {

        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                break;
        };
        if ( msg:len > max_len ) {
                sl_send_reply("513", "Message too big");
                break;
        };

        record_route();
        if (loose_route()) {
                t_relay();
                break;
        };

        if (uri==myself) {
           if (!(method=="REGISTER" || method=="ACK" || method=="INVITE" ||
method=="BYE" || method=="CANCEL" )) {
                sl_send_reply("501", "method not understood here");
                break;
           }

           if (method=="REGISTER") {
              sl_send_reply("200","OK");
              break;
           };

           if (!t_newtran()){
                sl_send_reply("500","could not create transaction");
                break;
           };

           if (method=="ACK"){
                t_relay();
                break;
           };

           t_reply("100","Trying - just wait a minute !");

           if (method=="INVITE"){
                if (uri=~"sip:100.*@") {
                   xlog("L_INFO", "Starting contact SEMS conference\n\n");
                   if(!t_write_req("/tmp/am_fifo","conference")) {
                      xlog("L_INFO", "Could not contact SEMS
conference\n\n");
                      t_reply("500","error contacting sems conference");
                   };
                   xlog("L_INFO", "Ending contact SEMS conference\n\n");
                   break;
                };

                if (uri=~"sip:200.*@") {
                   xlog("L_INFO", "Starting contact with SEMS
annoucement\n\n");
                   if(!t_write_req("/tmp/am_fifo","announcement")) {
                      xlog("L_INFO", "Could not contact SEMS
announcement\n\n");
                      t_reply("500","error contacting sems annoucement");
                   };
                   xlog("L_INFO", "Ending contact with SEMS
annoucement\n\n");
                   break;
                };

                if (uri=~"sip:666.*@") {
                   xlog("L_INFO", "Starting contact with SEMS echo\n\n");
                   if(!t_write_req("/tmp/am_fifo","echo")) {
                      xlog("L_INFO", "Could not contact SEMS echo\n\n");
                      t_reply("500","error contacting sems echo");
                   };
                   xlog("L_INFO", "Ending contact with SEMS echo\n\n");
                   break;
                };

	    xlog("L_INFO", "Starting contact with SEMS voicemail\n\n");
                if(!t_write_req("/tmp/am_fifo","voicemail")) {
	        xlog("L_INFO", "Could not contact SEMS voicemail\n\n");
                    t_reply("500","error contacting sems voicemail");
                };
	    xlog("L_INFO", "Ending contact with SEMS voicemail\n\n");
                break;
           }
           else if (method=="BYE" || method=="CANCEL") {
                if(!t_write_req("/tmp/am_fifo","bye")) {
                    t_reply("500","error contacting sems");
                };
                break;
           };
        };

        if (!t_relay()) {
                sl_reply_error();
        };
}


sems.cfg
-----------------------------

fork=yes
stderr=no
loglevel=3
fifo_name=/tmp/am_fifo
ser_fifo_name=/tmp/ser_fifo
send_method=fifo

plugin_path=/usr/local/lib/sems/plug-in/
smtp_server=localhost
smtp_port=25

config.voicemail=inline
rec_file_extension=wav
announce_path=/usr/local/lib/sems/audio/
default_announce=default_en.wav
max_record_time=30
accept_delay=0
email_template_path=/usr/local/etc/sems/
config.voicemail=end

config.announcement=inline
announce_path=/usr/local/lib/sems/audio/
default_announce=default_en.wav
config.announcement=end

config.conference=inline
default_announce=/usr/local/lib/sems/audio/first_participant.wav
config.conference=end

config.number_reader=inline
number_path=/usr/local/lib/sems/audio/
prolog_file=welcome_to_number_reader.wav
epilog_file=thanks_calling_number_reader.wav
config.number_reader=end

















-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 3532 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050808/02845d54/attachment.bin>


More information about the sr-users mailing list