<div dir="ltr"><div dir="ltr"><div>Hi all, I have the following setup:</div><div>-sip device is registering to OpenSIPS setup as a mid_registrar who then fowards registers to asterisk once they are authenticated<br></div><div>-OpenSIPS is setup in contact throttling mode with outgoing expires set to 3600 sec. <br></div><div><br></div><div>The scenario I came accross is the following:</div><div><br></div><div><pre>              "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│
       ║"│                      └────────┘                   └────────┘
       └┬┘                                                             
       ┌┼┐                                                             
        │                                                              
       ┌┴┐                                      </pre></div><div><br></div><div>1-the sip device sends a REGISTER to OpenSIPS (expires 3600)</div><div>2-OpenSIPS authentifies the REGISTER and sends back challenge to the sip device</div><div>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.</div><div>4-Asterisk receives the REGISTER, alters the expires to 120secs and replies 200 ok to OpenSIPS</div><div>5-OpenSIPS forwards the 200 ok but with 3600 sec expires.</div><div><br></div><div>My Questions is:<br></div><div>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.</div><div><br></div><div>Thanks in advance</div><div>Dominic<br></div><div><br></div></div></div>