[OpenSIPS-Users] Mid_Registrar outgoing_expire issue

Ricardo Martinez rmartinez at redvoiss.net
Fri Mar 19 19:02:50 EST 2021


Hi.

I’m facing two problems with my mid_registrar module scenario.

The scenario is as follows:



UAC ------- MID_REGISTRAR ----- PBX



When a REGISTER came from the UAC to MID_REGISTRAR it has a header
Expires:300

I have set the

modparam("mid_registrar", "outgoing_expires", 3600)



UAC ------------- MID_REGISTRAR ------------------- PBX

        REG

   Contact: (no expire)

  Expires: 300

                                     REG

                                    Contact: ( no expire)

                                    Expires: 3600



Seems ok!..

But in another scenario I have:





UAC ------------- MID_REGISTRAR ------------------- PBX

        REG

   Contact: (expire=600)

  Expires: 600

                                     REG

                                    Contact: (no expire)

                                    *Expires: 600*





I’m not getting why the mid_registrar does not modified the outgoing
Expires to the PBX to 3600.  Anyone has a clue about this?

Part of the configuration is:

### MID_REGISTRAR module

loadmodule "mid_registrar.so"

modparam("mid_registrar", "mode", 2) /* 0 = mirror / 1 = ct / 2 = AoR */

modparam("mid_registrar", "outgoing_expires", 3600)

modparam("mid_registrar", "contact_id_insertion", "ct-param")

modparam("mid_registrar", "max_contacts", 6)

modparam("mid_registrar", "received_avp", "$avp(rcv)")

modparam("mid_registrar", "extra_contact_params_avp",
"$avp(extra_ct_params)")



if (( is_method("REGISTER")) && (!has_totag())) {

mid_registrar_save("location","M<rinstance>");

                switch($retcode) {

                        case 1:

                                $du = $var(r_pbx_sethost);

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Retorna valor 1\n");

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: $fu salvado en tabla location\n");

                                t_relay(,$var(r_pbx_send));

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Redirecting $rm to destination
[$var(r_pbx)]\n");

                                exit;

                        case 2:

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Retorna valor 2\n");

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Absorbiendo $rm from $si to domain $rd\n");

                                break;

                        default:

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: Retorna valor -2\n");

                                xlog("[$ci] [from_vex] [REGISTER sin
totag][mid_registrar_save]: SECURITY: No se puede salvar localmente el
registro desde [$si] a dominio [$rd]\n");

                                send_reply(503,"MID Register Failed");

                                exit;

                }

        }






Beside of that subsequest REGISTER from that endpoint are route to the PBX
instead of absorve the REGISTERS.  Could this be related??





Thanks!

*Ricardo*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210319/8368f46f/attachment-0001.html>


More information about the Users mailing list