[OpenSIPS-Users] Transactional REGISTER processing with 2.1

Maxim Sobolev sobomax at sippysoft.com
Fri Feb 17 14:12:24 EST 2017


Hi guys,

We are underway to migrate from ancient SER-2.0.0 to more modern OpenSIPS
and one of the question that is still in my TODO list is implementing
transactional processing of the REGISTER requests. In the old SER we had
something along those lines:

route[3] {
        # Ensure that all incoming messages contain auth info
        xlog("L_INFO", "processing %rm received from %si:%sp");
        if (!t_newtran()) {
                sl_send_reply("500", "could not create transaction");
                break;
        };
        if (!python_exec("www_authenticate")) {
                xlog("L_INFO", "challenging %ct");
                if (is_avp_set("s:digest_challenge")) {
                        append_to_reply("%$digest_challenge");
                };
                t_reply("401", "Unauthorized");
                break;
        };
       [....some more unrelated processing and checks...]
        xlog("L_INFO", "saving contact %ct into the database");
        save_noreply("location");
        if (is_avp_set("s:contact")) {
                append_to_reply("%$contact");
        };
        t_reply("$code", "$reason");
}

The idea here is to avoid possibly costly DB lookup and other checks on
each possible re-transmit. What would be the proper way of doing this with
the OpenSIPS 2.1? Or if it's not possible to replicate such scheme, what
would be the best way to implement this which to get the change accepted
into the OpenSIPS mainline?

Any ideas, pointers, hints are greatly appreciated. Thanks in advance!

-Maxim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170217/3e250618/attachment-0001.html>


More information about the Users mailing list