[OpenSER-Users] registrations not saved in the mysql database

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Nov 7 12:17:28 CET 2007


Hi Ovidiu,

I will take a look on this.

Regards,
Bogdan

Ovidiu Sas wrote:
> Hi all,
>
> I was trying to keep persistent registrations in the mysql db, but it
> seems that something is broken in the latest svn:
> version: openser 1.3.0-pre1-notls (i386/linux)
> flags: STATS: Off, EXTRA_DEBUG, USE_IPV6, USE_TCP, DISABLE_NAGLE,
> USE_MCAST, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
> FAST_LOCK-ADAPTIVE_WAIT
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
> MAX_URI_SIZE 1024, BUF_SIZE 65535
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> svnrevision: 2:3034M
> @(#) $Id: main.c 3015 2007-11-05 13:08:50Z henningw $
> main.c compiled on 11:41:03 Nov  6 2007 with gcc 4.1.2
>
> The config that I used for testing is pretty simple:
>
> # ----------- global configuration parameters ------------------------
> debug=9            # debug level (cmd line: -dddddddddd)
> fork=yes
> log_stderror=no    # (cmd line: -E)
> children=1
> disable_tcp=yes
>
> # ------------------ module loading ----------------------------------
> mpath="/usr/local/lib/openser/modules/"
> loadmodule "mysql.so"
> loadmodule "sl.so"
> loadmodule "tm.so"
> loadmodule "rr.so"
> loadmodule "maxfwd.so"
> loadmodule "textops.so"
> loadmodule "mi_fifo.so"
> modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
>
> loadmodule "usrloc.so"
> modparam("usrloc", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
> modparam("usrloc", "db_mode", 1)
>
> loadmodule "registrar.so"
> #-------------------------  request routing logic -------------------
> route{
>
>         if (!method=="REGISTER")
>                 record_route();
>
>         if (loose_route()) {
>                 # mark routing logic in request
>                 append_hf("P-hint: rr-enforced\r\n");
>                 route(1);
>         };
>
>         if (!uri==myself) {
>                 append_hf("P-hint: outbound\r\n");
>                 route(1);
>         };
>
>         if (uri==myself) {
>                 if (method=="REGISTER") {
>                         save("location");
>                         exit;
>                 };
>                 if (!lookup("location")) {
>                         sl_send_reply("404", "Not Found");
>                         exit;
>                 };
>                 append_hf("P-hint: usrloc applied\r\n");
>         };
>
>         route(1);
> }
>
>
> route[1] {
>         if (!t_relay()) {
>                 sl_reply_error();
>         };
>         exit;
> }
>
>
>
> Here are the relevant debug logs:
>
> Nov  6 12:19:04 localhost /usr/local/sbin/openser[8963]:
> core:db_double2str: Error in snprintf
> Nov  6 12:19:04 localhost /usr/local/sbin/openser[8963]:
> mysql:val2str: error while converting string to double
> Nov  6 12:19:04 localhost /usr/local/sbin/openser[8963]:
> core:db_print_values: Error while converting value to string
> Nov  6 12:19:04 localhost /usr/local/sbin/openser[8963]:
> usrloc:db_insert_ucontact: inserting contact in db failed
> Nov  6 12:19:04 localhost /usr/local/sbin/openser[8963]:
> usrloc:insert_ucontact: failed to insert in database
>
>
> I can see the in memory registration via `openserctl ul show' command,
> but the mysql database is not updated (verified via `openserctl db
> show location')
>
>
>
> Regards,
> Ovidiu Sas
>
> _______________________________________________
> Users mailing list
> Users at lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
>   





More information about the sr-users mailing list