[Serusers] running VM module

Daniel-Constantin Mierla Daniel-Constantin.Mierla at fokus.fraunhofer.de
Mon Nov 17 17:41:25 CET 2003


Hello,
as Jiri pointed out, it is not a memory issue. There was a misleading 
debug message. You are using a pretty old version of ser, the prerelease 
0.8.11pre36 (i386/linux). Since then we fully released the version 
0.8.11. I don't know exactly what was the status of the dbtext at that 
moment, but is better to shift to v0.8.11. Also, in the last days there 
were some fixes for dbtext that are now on cvs -- into HEAD branch as 
well as the testing_0_8_12 that is going to be the next release. If you 
download the module from branch testing_0_8_12 and compile it inside the 
v0.8.11 sources it should work without problems, since there were only 
fixes. The HEAD includes some changes that allow many database systems 
in the same time, but this branch is not tested so it may be unstable.

 From here, another problem I can see into config file -- you use dbtext 
and mysql in the same time. That will produce a mess with v0.8.11. In 
the future, as I said above,  (not in v0.8.12) it will be possible to 
use more than one database system in the same time.

So, please try again with at least the version 0.8.11 and tell us if you 
have the same problem. I would say to take the dbtext module from 
testing_0_8_12 branch -- it is more stable.

Best regards,
}Daniel



On 11/14/2003 3:58 PM, Mario Kolberg wrote:

> Hi,
>
> I'm trying to run the vm module to connect to SEMS. However, I'm 
> getting an error in the dbtext module saying: Not enough memory. 
> However, there should be plenty of memory available. Below I enclose 
> my configuration, the error message and the ser.cfg file.
>
> Is there anything obvious wrong in my setup?
>
> Many thanks!
> Mario
>
>
> versions and compile flags are:
> > ser -V
> version: ser 0.8.11pre36 (i386/linux)
> flags: STATS:Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, DNS_IP_HACK, 
> SHM_MEM, SHM_MMAP, PKG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> @(#) $Id: main.c,v 1.162.2.3 2003/06/28 17:10:36 andrei Exp $
> main.c compiled on 13:51:19 Nov 14 2003 with gcc 3.2
>
>
> The error message I get looks like:
> >ser
>  0(10682) loading module /usr/local/lib/ser/modules/mysql.so
>  0(10682) loading module /usr/local/lib/ser/modules/sl.so
>  0(10682) loading module /usr/local/lib/ser/modules/tm.so
>  0(10682) loading module /usr/local/lib/ser/modules/rr.so
>  0(10682) loading module /usr/local/lib/ser/modules/maxfwd.so
>  0(10682) loading module /usr/local/lib/ser/modules/usrloc.so
>  0(10682) loading module /usr/local/lib/ser/modules/registrar.so
>  0(10682) loading module /usr/local/lib/ser/modules/auth.so
>  0(10682) loading module /usr/local/lib/ser/modules/auth_db.so
>  0(10682) loading module /usr/local/lib/ser/modules/textops.so
>  0(10682) loading module /usr/local/lib/ser/modules/vm.so
>  0(10682) loading module /usr/local/lib/ser/modules/dbtext.so
>  0(10682) set_mod_param_regex: voicemail matches module voicemail
>  0(10682) set_mod_param_regex: found <db_url> in module voicemail 
> [/usr/local/lib/ser/modules/vm.so]
>  0(10682) set_mod_param_regex: usrloc matches module usrloc
>  0(10682) set_mod_param_regex: found <db_mode> in module usrloc 
> [/usr/local/lib/ser/modules/usrloc.so]
>  0(10682) set_mod_param_regex: auth_db matches module auth_db
>  0(10682) set_mod_param_regex: found <calculate_ha1> in module auth_db 
> [/usr/local/lib/ser/modules/auth_db.so]
>  0(10682) set_mod_param_regex: auth_db matches module auth_db
>  0(10682) set_mod_param_regex: found <password_column> in module 
> auth_db [/usr/local/lib/ser/modules/auth_db.so]
>  0(10682) find_export: found <mf_process_maxfwd_header> in module 
> maxfwd_module [/usr/local/lib/ser/modules/maxfwd.so]
>  0(10682) find_export: found <sl_send_reply> in module sl_module 
> [/usr/local/lib/ser/modules/sl.so]
>  0(10682) find_export: found <sl_send_reply> in module sl_module 
> [/usr/local/lib/ser/modules/sl.so]
>  0(10682) find_export: found <record_route> in module rr 
> [/usr/local/lib/ser/modules/rr.so]
>  0(10682) find_export: found <loose_route> in module rr 
> [/usr/local/lib/ser/modules/rr.so]
>  0(10682) find_export: found <www_authorize> in module auth_db 
> [/usr/local/lib/ser/modules/auth_db.so]
>  0(10682) find_export: found <www_challenge> in module auth 
> [/usr/local/lib/ser/modules/auth.so]
>  0(10682) find_export: found <save> in module registrar 
> [/usr/local/lib/ser/modules/registrar.so]
>  0(10682) find_export: found <t_newtran> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <t_reply> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <vm> in module voicemail 
> [/usr/local/lib/ser/modules/vm.so]
>  0(10682) find_export: found <t_reply> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <vm> in module voicemail 
> [/usr/local/lib/ser/modules/vm.so]
>  0(10682) find_export: found <t_reply> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <vm> in module voicemail 
> [/usr/local/lib/ser/modules/vm.so]
>  0(10682) find_export: found <t_reply> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <vm> in module voicemail 
> [/usr/local/lib/ser/modules/vm.so]
>  0(10682) find_export: found <t_reply> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <sl_send_reply> in module sl_module 
> [/usr/local/lib/ser/modules/sl.so]
>  0(10682) find_export: found <lookup> in module registrar 
> [/usr/local/lib/ser/modules/registrar.so]
>  0(10682) find_export: found <sl_send_reply> in module sl_module 
> [/usr/local/lib/ser/modules/sl.so]
>  0(10682) find_export: found <t_relay> in module tm 
> [/usr/local/lib/ser/modules/tm.so]
>  0(10682) find_export: found <sl_reply_error> in module sl_module 
> [/usr/local/lib/ser/modules/sl.so]
>  0(10682) routing table 0:
> .... routing table removed ...
>
> Listening on
>               127.0.0.1 [127.0.0.1]:5060
>               139.153.254.203 [139.153.254.203]:5060
> Aliases: localhost:5060 localhost.localdomain:5060 d254203:5060 
> cs.stir.ac.uk:* d254203.cs.stir.ac.uk:*
> WARNING: no fork mode  and more than one listen address found (will 
> use only the the first one)
>  0(10682) DEBUG: init_mod: mysql
>  0(10682) mysql - initializing
>  0(10682) DEBUG: init_mod: sl_module
> stateless - initializing
>  0(10682) DEBUG: register_fifo_cmd: new command (sl_stats) registered
>  0(10682) DEBUG: MD5 calculated: b27e1a1d33761e85846fc98f5f3a7e58
>  0(10682) DEBUG: init_mod: tm
>  0(10682) TM - initializing...
>  0(10682) Call-ID initialization: '58f7fc7f'
>  0(10682) DEBUG: register_fifo_cmd: new command (t_uac_dlg) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (t_hash) registered
>  0(10682) DEBUG: lock_initialize: lock initialization started
>  0(10682) DEBUG: register_fifo_cmd: new command (t_stats) registered
>  0(10682) DEBUG: MD5 calculated: 533cb9e91f4b999cf76861cbb9ed54ed
>  0(10682) DEBUG: MD5 calculated: a6a1c5f60faecf035a1ae5b6e96e979a
>  0(10682) DEBUG: init_mod: rr
>  0(10682) rr - initializing
>  0(10682) DEBUG: init_mod: maxfwd_module
> Maxfwd module- initializing
>  0(10682) DEBUG: init_mod: usrloc
>  0(10682) usrloc - initializing
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_stats) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_rm) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_rm_contact) 
> registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_dump) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_flush) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_add) registered
>  0(10682) DEBUG: register_fifo_cmd: new command (ul_show_contact) 
> registered
>  0(10682) find_export: found <~db_use_table> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_init> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_close> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_query> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_raw_query> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_free_query> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_insert> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_delete> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) find_export: found <~db_update> in module dbtext 
> [/usr/local/lib/ser/modules/dbtext.so]
>  0(10682) DBT:dbt_cache_get_db: dbtext cache not initialized!
>  0(10682) DBT:dbt_init: No enough memory
>  0(10682) mod_init(): Error while connecting database
>  0(10682) init_mod(): Error while initializing module usrloc
> ERROR: error while initializing modules
>  0(10682) DBT:destroy ...
>  0(10682) DEBUG: tm_shutdown : start
>  0(10682) DEBUG: tm_shutdown : empting DELETE list
>  0(10682) DEBUG: tm_shutdown : empting hash table
>  0(10682) DEBUG: tm_shutdown: releasing timers
>  0(10682) DEBUG: tm_shutdown : removing semaphores
>  0(10682) DEBUG: tm_shutdown : done
>  0(10682) shm_mem_destroy
>  0(10682) destroying the shared memory lock
>
>
>
> My ser.cfg file looks like and contains large shunks of the example 
> file which comes with the vm module:
>
>
> #
> # $Id: ser.cfg,v 1.18 2003/05/06 16:19:15 janakj Exp $
> #
> # simple quick-start config script
> #
>
> # ----------- global configuration parameters ------------------------
>
> debug=3
> fork=yes
> 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"
> alias="d254203.cs.stir.ac.uk"
> alias="cs.stir.ac.uk"
>
> # ------------------ 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/textops.so"
> loadmodule "/usr/local/lib/ser/modules/vm.so"
> loadmodule "/usr/local/lib/ser/modules/dbtext.so"
>
> # ----------------- setting module-specific parameters ---------------
>
> # -- usrloc params --
>
> modparam("voicemail", "db_url","/root/new_sip_router/modules/vm/db")
>
> #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")
>
> # -------------------------  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 (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();
>
>     # 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") {
>
>         if (!www_authorize("cs.stir.ac.uk", "subscriber")) {
>             www_challenge("cs.stir.ac.uk", "0");
>             break;
>         };
>
>         save("location");
>         break;
>         };
>
>                # 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 conference server\n");
>                          t_reply("500","could not contact conference 
> server");
>                       };
>                     }  else if( uri =~ "echo" ){
>                          if(!vm("/tmp/am_fifo","echo")){
>                             log("could not contact echo\n");
>                             t_reply("500","could not contact echo");
>                          };
>                         }
>                         else {
>                         if(!vm("/tmp/am_fifo","voicemail")){
>                            log("could not contact voicemail\n");
>                            t_reply("500","could not contact voicemail");
>                         };
>                      };
>                      log("**** vm start - end *********\n");
>                      break;
>                     };
>                     if(method=="BYE"){
>                        log("***** vm end/refer - begin *******\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 create new 
> transaction");
>                    };
>                 };
>         # Voicemail specific configuration - end
>     # 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();
>     };
>
> }
>
>





More information about the sr-users mailing list