[OpenSIPS-Users] mid_registrar not updating exipres when receiving 200 ok

Dominic wallnut.monkeys at gmail.com
Thu Sep 20 09:29:53 EDT 2018


Hi all, I have the following setup:
-sip device is registering to OpenSIPS setup as a mid_registrar who then
fowards registers to asterisk once they are authenticated
-OpenSIPS is setup in contact throttling mode with outgoing expires set to
3600 sec.

The scenario I came accross is the following:

              "Registration - OpenSips mid_registrar"

       ┌─┐
       ║"│
       └┬┘
       ┌┼┐
        │                       ┌────────┐                   ┌────────┐
       ┌┴┐                      │OpenSips│                   │Asterisk│
      Alice                     └────────┘                   └────────┘
        │REGISTER (expires 3600 sec)│                            │
        │───────────────────────────>                            │
        │                           │                            │
        │     401 Unauthorized      │                            │
        │<───────────────────────────                            │
        │                           │                            │
        │REGISTER (expires 3600 sec)│                            │
        │───────────────────────────>                            │
        │                           │                            │
        │                           │ REGISTER (expires 3600 sec)│
        │                           │ ───────────────────────────>
        │                           │                            │
        │                           │  200 OK (expires 120 sec)  │
        │                           │ <───────────────────────────
        │                           │                            │
        │ 200 OK (expires 3600 sec) │                            │
        │<───────────────────────────                            │
        │                           │                            │
        │                           │                            │
        │                           │                            │
        │                           │                            │
      Alice                     ┌────────┐                   ┌────────┐
       ┌─┐                      │OpenSips│                   │Asterisk│
       ║"│                      └────────┘                   └────────┘
       └┬┘
       ┌┼┐
        │
       ┌┴┐


1-the sip device sends a REGISTER to OpenSIPS (expires 3600)
2-OpenSIPS authentifies the REGISTER and sends back challenge to the sip
device
3-sip devices sends authenticated REGISTER to OpenSIPS, here the expires
would normally be changed to 3600 but in this case it was already set at
3600.
4-Asterisk receives the REGISTER, alters the expires to 120secs and replies
200 ok to OpenSIPS
5-OpenSIPS forwards the 200 ok but with 3600 sec expires.

My Questions is:
I was expecting OpenSIPS to automatically update the expires in it's usrloc
to 120 seconds and send 120 sec in its 200 ok. Should I be doing something
in a return route for the REGISTERs in order to update that and send the
correct value or should opensips be doing that automatically? Currently I
am calling mid_registrar_save("location") when I receive the REGISTER but
doing nothing when I receive the 200 ok.

Thanks in advance
Dominic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180920/58e852f5/attachment.html>


More information about the Users mailing list