[Serusers] Config issue

Andrew Delamare andrew.delamare at amadeo.co.uk
Mon Jan 5 20:11:03 CET 2004


Hi all,

Firstly thanks for the list... i have gotten very far just by reading the mails and replies to and from the list here which has helped much.

I seem to have hit a dead end though for the moment.

I have had ser running and am now moving on to add voicemail care of sems and I am hitting issues.

I am running ser and sems on a FreeBSD box (4.8-RELEASE-p3)

I have the CVS version of SEMS and 0.8.12 of ser

I am compiling with GCC 3.0

but I seem to be having issues.... If I put the DB access to option 0 (modparam("usrloc", "db_mode",   0) SER starts and runs but then I get the following message:


Jan  5 19:01:33 gateway /usr/local/sbin/ser[5305]: ERROR: receive_msg: no mem for sip_msg
Jan  5 19:01:33 gateway /kernel: Jan  5 19:01:33 gateway /usr/local/sbin/ser[5305]: ERROR: receive_msg: no mem for sip_msg


I altered the memory in config.h like what was mentioned but that doesn't seem to help at all... I gave it 20480*1024 and it still came back with the same error. so I guess its not tied to that. I restarted SEMS and nothing changed... I even looked at the semiphore sizes on the server to see if there was anything odd there but it seemed ok but I changed it anyhow.

So I looked at the cfg again and thought it might be trying to hand back messages to the Database and not getting it and having some art mem error.

so I changed the setting ( modparam("usrloc", "db_mode", 2)) Now I get a different error.... again to do with memory....

Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: voicemail - initializing child 4
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: connect_db(): No enough memory
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: connect_db(): No enough memory
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5448]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5447]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5446]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5445]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5439]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5403]: INFO: SIGCHLD received: we do not worry about grand-children
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5403]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5415]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 /usr/local/sbin/ser[5449]: INFO: signal 15 received
Jan  5 19:08:31 gateway /kernel:
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: db_init(): Error while trying to connect database
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: db_init(): Error while trying to connect database
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: ERROR; vm_init_child: could not init db mysql://root:dbpassword@localhost/ser
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: ERROR; vm_init_child: could not init db mysql://root:dbpassword@localhost/ser
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: init_mod_child(): Error while initializing module voicemail
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: init_mod_child(): Error while initializing module voicemail
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: init_child failed
Jan  5 19:08:31 gateway /kernel: Jan  5 19:08:31 gateway /usr/local/sbin/ser[5407]: init_child failed
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5444]: INFO: signal 15 received
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5443]: INFO: signal 15 received
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5442]: INFO: signal 15 received
Jan  5 19:08:31 gateway /usr/local/sbin/ser[5441]: INFO: signal 15 received




Here is my config file.


#
# $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=5         # 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"

# 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"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/msilo.so"
loadmodule "/usr/local/lib/ser/modules/vm.so"

# ----------------- setting module-specific parameters ---------------

# -- voicemail stuff

modparam("voicemail", "db_url","sql://root:dbpassword@localhost/ser")

# ------------- tm parameters

modparam("tm", "fr_timer", 12)
modparam("tm", "fr_inv_timer", 24)

# ------------- accounting parameters

modparam("acc", "log_missed_flag", 3)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)

# -- 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)

# -------------------------  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;
        };
                # VOICEMAIL ROUTING

         if (uri == myself) {

                # Voicemail specific configuration - begin

                if(method=="ACK" || method=="INVITE" || method=="BYE" || method=
="REFER"){

                        if(t_newtran()){

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

                                if(method=="INVITE" || method=="REFER"){
                                        log("**************** vm start-begin ***
***************\n");
                                        if( uri =~"conference" ){

if(!vm("/tmp/am_fifo","conference")){
                                                        log("could not contact c
onference server\n");
t_reply("500","could not contact conference server");
                                                };
                                        }
                                        else if( uri =~ "echo" ){

if(!vm("/tmp/am_fifo","echo")){
                                                        log("could not contact e
cho\n");

t_reply("500","could not contact echo");
                                        };
                                        }
                                        else {

if(!vm("/tmp/am_fifo","voicemail")){
                                                        log("could not contact v
oicemail\n");

t_reply("500","could not contact voicemail");
                                                };
                                        };
                                        log("**************** vm start-end *****
*************\n");
                                        break;
                                };

                                if(method=="BYE"){
                                        log("**************** vm end/refer - beg
in ******************\n");
                                        if(!vm("/tmp/am_fifo","bye")){
                                                log("could not contact the media
 server\n");
                                                t_reply("500","could not contact
 the media server");
                                        };
                                        log("**************** vm end/refer - end
 ********************\n");
                                        break;
                                };
                        }
                        else {
                             log("could not create new transaction\n");
                             sl_send_reply("500","could not createnewtransaction
");
                        };
                };

                # Voicemail specific configuration - end
                }
        # 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;
        };
#       # Make MSN Messenger happy...
#       if (method=="REGISTER") {
#               sl_send_reply("200","ok");
#               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=~amadeo.co.uk) {

                if (method=="REGISTER") {

# Uncomment this if you want to use digest authentication
                        if (!www_authorize("amadeo.co.uk", "subscriber")) {
                                www_challenge("amadeo.co.uk", "0");
                                break;
                        };
                        save("location");
                        break;
                };
lookup("aliases");
                # 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();
        };


Any thoughts gratefully accpted.



Regards
--
Andrew Delamare
Amadeo Nerworks Ltd




More information about the sr-users mailing list