[Users] Watchers table not being updated

Sebastian Murray-Roberts sebmurray at gmail.com
Mon Mar 26 20:55:18 CEST 2007


Hi,

I'm trying to set up OpenSER as a presence server without using force_active
(ie to allow authorization). I have two x-lite clients which register with
OpenSER and can subscribe to each other. I get a prompt on each client
asking whether to authorize the other, but if I click yes no presence info
is displayed. If I restart either of the x-lites the authorization message
appears again. I know this is because the subs_status field of the watchers
table is not being changed from "pending" to "active". If I run a packet
capture when starting up x-lite, it sends the 200 OK to the notify provided
by OpenSER, but when I click "allow" in the authorization box, nothing is
sent to OpenSER.

Has anyone got presence working with x-lite without using force_active? If
so, is there anything I'm missing? My config file is as follows:

debug=7            # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes
check_via=no    # (cmd. line: -v)
dns=no          # (cmd. line: -r)
rev_dns=no      # (cmd. line: -R)
listen=udp:192.168.1.107:5060
children=4

mpath="/usr/local/lib/openser/modules/"
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "maxfwd.so "
loadmodule "textops.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "presence.so"
loadmodule "avpops.so"
loadmodule "mi_fifo.so"

modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc", "db_mode", 3)
modparam("rr", "enable_full_lr", 1)
modparam("presence|^usrloc$", "db_url"," mysql://user:pass@localhost
/openser")
modparam("presence", "force_active", 0)
modparam("presence", "max_expires", 3600)
modparam("presence", "server_address", "sip: 192.168.1.107:5060")

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

    if (!is_method("REGISTER"))
        record_route();

    if (loose_route()) {
        route(1);
        exit;
    };

    if (!uri==myself) {
        route(1);
        exit;
    };

    if (uri==myself) {
          if (method=="REGISTER") {
            save("location");
            exit;
          };

          if (!lookup("location")) {
                  sl_send_reply("404", "Not Found");
                  exit;
          };
    };
    if( is_method("PUBLISH|SUBSCRIBE")) {
          route(2);
          exit;
        };

    route(1);
}
route[1] {
    if (!t_relay()) {
        sl_reply_error();
    };
    exit;
}
route[2]
{
    sl_send_reply("100","trying");
    if (!t_newtran())
    {
        sl_reply_error();
        exit;
    };

    if(is_method("PUBLISH"))
    {
        handle_publish();
        t_release();
    }
    else if( is_method("SUBSCRIBE"))
    {
        handle_subscribe();
        t_release();
    };

    exit;
}

Thanks in advance,

Sebastian

-- 
Sebastian Murray-Roberts (B.Sc Hons)
Server Developer
Yeigo Communications
http://www.yeigo.com
Tel: +27 21 409 7807
Fax: +27 21 409 7050
Mobile: +27 72 183 5998

CONFIDENTIALITY NOTICE: E-MAIL
This e-mail is confidential.  If you receive it by mistake, please delete it
and notify the sender immediately.  If you are not the intended recipient,
you may not use, disclose, distribute, copy or publish any information
contained herein.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070326/9481384e/attachment.htm>


More information about the sr-users mailing list