Hello Ricardo, I noticed this issue too. My work around is Where 7200 is outgoing_expires in module params. if($(hdr("Expires"){s.int})!=7200) { remove_hf("Expires"); append_hf("Expires: 7200\r\n"); } volga629 On 3/23/21 12:46 PM, Ricardo Martinez
wrote:
Hi. I’m still unable to understand why the REGISTER is not using the outgoing_expire. First. It's weird because according to the debug seems to change the outgoing_expire to 3600 but when I check the outgoing REGISTER from the MID_REGISTRAR still has the Expire Header = 300. One thing I noticed is for the first REGISTER (the one the outgoing_expires works) it changes the Expires header ok, this REGISTER does not have contact expire header, but for the second REGISTER.. which has Expire header and expire contact header.. seems to apply only the "expire in the contact header" (DBG:mid_registrar:replace_expires_ct_param). These are the debugs... Is this a bug? Or maybe I'm missing something?1. Outgoing Expire OK INCOMING REGISTER Contact: sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.ins tance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0> Expires: 300. DBG:mid_registrar:mid_reg_save: saving to location... DBG:mid_registrar:prepare_forward: from: '"Ricardo Martinez"<sip:d2....@dom1.company.com:5061>;tag=ba489a60' DBG:mid_registrar:prepare_forward: Call-ID: '187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg' DBG:mid_registrar:prepare_forward: Contact: '<sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.i nstance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"' DBG:mid_registrar:prepare_forward: registering ptr 0x7f6efc9c6b78 on TMCB_REQUEST_FWDED ... DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_FWDED, mri=0x7f6efc9c6b78 ... DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_DELETED, mri=0x7f6efc9c6b78 ... [187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg] [from_vex] [REGISTER sin totag][mid_registrar_save]: Retorna valor 1 [187541_mobile-rel120YzljYzJjNjcwOGJlYmYxOTU0MDM1NDBlMDJiZDQyNjg] [from_vex] [REGISTER sin totag][mid_registrar_save]: sip:d2....@dom1.company.com:5061 salvado en tabla location DBG:mid_registrar:mid_reg_req_fwded: msg expires: '300' DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:calc_ob_contact_expires: outgoing expires: 1616511318 DBG:mid_registrar:overwrite_contact_expirations: ....... contact: 'sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.in stance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"#015' Calculated TIMEOUT = 1616511318 (3600) DBG:mid_registrar:replace_expires_hf: ....... Exp hdr: '300' DBG:mid_registrar:mid_reg_req_fwded: trimming all Contact URIs into one... DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:trim_to_single_contact: deleting Contact '<sip:d2.596@192.168.0.34;rinstance=fa92ef51cba5543d;transport=tls>;+sip.i nstance="<urn:uuid:f7a5b4e0-92dd-5227-b355-0467623c49c0>"' DBG:mid_registrar:trim_to_single_contact: inserting new Contact '<sip:d2.596@192.141.64.134:5060>' DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:mid_reg_req_fwded: REQ FORWARDED TO 'sip:dom1.company.com:5061' (obp: sip:192.141.XXX.94:5060), expires=3600 OUTGOING REGISTER Contact: <sip:d2....@192.141.xx.134:5060>. Expires: 3600. 2. Outgoing_expire fail But for the Second REGISTER (from the PUSH SERVER) INCOMING REGISTER Contact: <sip:d2....@216.93.xxx.120:5060;transport=TLS>;+sip.instance="<urn:uuid:f7 a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1;expires=300 Expires: 300. DBG:mid_registrar:mid_reg_save: saving to location... DBG:mid_registrar:prepare_forward: from: '<sip:d2....@dom1.company.com:5061>;tag=0f1c2a07' DBG:mid_registrar:prepare_forward: Call-ID: 'y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121' DBG:mid_registrar:prepare_forward: Contact: '<sip:d2....@216.93.xxx.120:5060;transport=TLS>;+sip.instance="<urn:uuid:f 7a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1;expires=300' DBG:mid_registrar:prepare_forward: registering ptr 0x7f6efc9b60d0 on TMCB_REQUEST_FWDED ... DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_FWDED, mri=0x7f6efc9b60d0 ... DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_DELETED, mri=0x7f6efc9b60d0 ... [y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121] [from_vex] [REGISTER sin totag][mid_registrar_save]: Retorna valor 1 [y12mg-n8ka5jro_j-bhqn...@216.93.xxx.121] [from_vex] [REGISTER sin totag][mid_registrar_save]: sip:d2....@dom1.company.com:5061 salvado en tabla location DBG:mid_registrar:mid_reg_req_fwded: msg expires: '300' DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:calc_ob_contact_expires: outgoing expires: 1616511408 DBG:mid_registrar:overwrite_contact_expirations: ....... contact: 'sip:d2....@216.93.xxx.120:5060;transport=TLS>;+sip.instance="<urn:uuid:f7 a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1;expires=300#015' Calculated TIMEOUT = 1616511408 (3600) DBG:mid_registrar:replace_expires_ct_param: replacing expires, ct 'sip:d2....@216.93.xxx.120:5060;transport=TLS' '300' with 3600, 0x7f6f3cf1e5b0 -> 0x7f6f3cf1e861 (0x7f6f3cf1e6d9) DBG:mid_registrar:mid_reg_req_fwded: trimming all Contact URIs into one... DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:trim_to_single_contact: deleting Contact '<sip:d2....@216.93.xxx.120:5060;transport=TLS>;+sip.instance="<urn:uuid:f 7a5b4e0-92dd-5227-b355-0467623c49c0>";reg-id=1;expires=300' DBG:mid_registrar:trim_to_single_contact: inserting new Contact '<sip:d2....@192.141.xx.134:5060>' DBG:mid_registrar:calc_contact_expires: expires: 300 DBG:mid_registrar:mid_reg_req_fwded: REQ FORWARDED TO 'sip:dom1.company.com:5061' (obp: sip:192.141.XXX.94:5060), expires=3600 OUTGOING REGISTER Contact: <sip:d2.596@192.141.64.134:5060> Expires: 300 Could this be a bug? Hope someone could point me in the right direction. Best Regards, Ricardo Martinez De: Ricardo Martinez <rmarti...@redvoiss.net> Enviado el: viernes, 19 de marzo de 2021 16:03 Para: 'OpenSIPS users mailling list' <users@lists.opensips.org> Asunto: Mid_Registrar outgoing_expire issue 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 _______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users |
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users