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

Liviu Chircu liviu at opensips.org
Thu Sep 20 10:09:14 EDT 2018


Hi Dominic,

The 200 OK returned by OpenSIPS should definitely contain a 120s expiry 
time.  Thanks for the detailed explanation - I will look into this asap.

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 20.09.2018 16:29, Dominic wrote:
> 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
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180920/c1af14aa/attachment-0001.html>


More information about the Users mailing list