<div dir="ltr"><div>I'm still fighting with this and would love some assistance. <br><br></div>Is there more data I should be collecting? do I need to post more configuration details?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 20, 2019 at 4:09 PM John Kiniston <<a href="mailto:johnkiniston@gmail.com">johnkiniston@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Phone sends it's request to the Proxy, the VIA specifies TLS, The From & To are using port 5061, the Contact has transport=TLS <br></div><div dir="ltr"><br><br> REGISTER sip:<a href="http://pbxj.simplybits.net:5061" target="_blank">pbxj.simplybits.net:5061</a> SIP/2.0 <br> Via: SIP/2.0/TLS 172.16.52.69:11974;branch=z9hG4bK4233722137;rport <br> From: "Test" <<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>>;tag=3020551445 <br> To: "Test" <<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>> <br> Call-ID: <a href="mailto:0_3070192302@172.16.52.69" target="_blank">0_3070192302@172.16.52.69</a> <br> CSeq: 1 REGISTER <br> Contact: <sip:7004salesdemo@172.16.52.69:11974;transport=TLS> <br> Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE <br> Max-Forwards: 70 <br> User-Agent: Yealink SIP-T42G 29.83.0.50<br> Expires: 300 <br> Allow-Events: talk,hold,conference,refer,check-sync <br> Mac: 00:15:65:72:e5:f3 <br> Line: 1 <br> Content-Length: 0 <br><br></div><div>I see in my opensips logs:<br><br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:mid_reg_save: saving to location...<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: from: '"Test" <<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>>;tag=3020551445'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: Call-ID: '<a href="mailto:0_3070192302@172.16.52.69" target="_blank">0_3070192302@172.16.52.69</a>'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: Contact: '<sip:7004salesdemo@172.16.52.69:11974;transport=TLS>'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: registering ptr 0x7f46e9dad850 on TMCB_REQUEST_FWDED ...<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_FWDED, mri=0x7f46e9dad850 ...<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:prepare_forward: registering for TMCB_RESPONSE_DELETED, mri=0x7f46e9dad850 ...<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:mid_reg_req_fwded: msg expires: '300'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:calc_contact_expires: expires: 300<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:calc_ob_contact_expires: outgoing expires: 1553121490<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:overwrite_contact_expirations: ....... contact: 'sip:7004salesdemo@172.16.52.69:11974;transport=TLS>#015' Calculated TIMEOUT = 1553121490 (600)<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:replace_expires_hf: ....... Exp hdr: '300'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:mid_reg_req_fwded: trimming all Contact URIs into one...<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:calc_contact_expires: expires: 300<br><br>Everything is transport=TLS up until this line:<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:trim_to_single_contact: deleting Contact '<sip:7004salesdemo@172.16.52.69:11974;transport=TLS>'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:trim_to_single_contact: inserting new Contact '<<a href="http://sip:7004salesdemo@67.212.192.99:5060" target="_blank">sip:7004salesdemo@67.212.192.99:5060</a>>'<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:calc_contact_expires: expires: 300<br><br>Here's the forward to the right host, the right port and the wrong protocol<br>Mar 20 15:28:10 sip2 /usr/sbin/opensips[20404]: DBG:mid_registrar:mid_reg_req_fwded: REQ FORWARDED TO 'sip:<a href="http://pbxj.simplybits.net:5061" target="_blank">pbxj.simplybits.net:5061</a>' (obp: ), expires=600<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: aor: '7004salesdemo' 0x7f46e9daa928<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: from: '<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>' 0x7f46e9d8eaa8<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: to: '<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>' 0x7f46e9da9e60<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: callid: '<a href="mailto:0_3070192302@172.16.52.69" target="_blank">0_3070192302@172.16.52.69</a>' 0x7f46e9daaea0<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: main reg: 'sip:<a href="http://pbxj.simplybits.net:5061" target="_blank">pbxj.simplybits.net:5061</a>' 0x7f46e9da0d60<br>Mar 20 15:28:46 sip2 /usr/sbin/opensips[20400]: DBG:mid_registrar:mri_free: ct_uri: '' (nil)<br><br></div><div>Heres the registration as it goes out from the Proxy to the PBX. <br></div><div dir="ltr"><br> REGISTER sip:<a href="http://pbxj.simplybits.net:5061" target="_blank">pbxj.simplybits.net:5061</a> SIP/2.0 <br> Via: SIP/2.0/UDP 67.212.192.99:5060;branch=z9hG4bK9c1a.7b3004a7.0;i=8f1ca045 <br> Via: SIP/2.0/TLS 172.16.52.69:11974;received=64.119.40.170;branch=z9hG4bK4233722137;rport=11974 <br> From: "Test" <<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>>;tag=3020551445 <br> To: "Test" <<a href="http://sip:7004salesdemo@pbxj.simplybits.net:5061" target="_blank">sip:7004salesdemo@pbxj.simplybits.net:5061</a>> <br> Call-ID: <a href="mailto:0_3070192302@172.16.52.69" target="_blank">0_3070192302@172.16.52.69</a> <br> CSeq: 1 REGISTER <br> Contact: <<a href="http://sip:7004salesdemo@67.212.192.99:5060" target="_blank">sip:7004salesdemo@67.212.192.99:5060</a>> <br> Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE <br> Max-Forwards: 69 <br> User-Agent: Yealink SIP-T42G 29.83.0.50<br> Expires: 600 <br> Allow-Events: talk,hold,conference,refer,check-sync <br> Mac: 00:15:65:72:e5:f3 <br> Line: 1 <br> Content-Length: 0 <br><br>And the PBX never processes the registration request (it's being communicated via the wrong protocol on the wrong port so
it's ignoring it which it should)<br><br>How can mid_registrar return code '2' if there is no response from the PBX?<br></div><div></div></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 18, 2019 at 8:35 AM Bogdan-Andrei Iancu <<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
When mid_registrar_save() returns code "2", you need to explicitly route <br>
(by changing RURI or DST URI) to the address of the main registrar (by <br>
IP+port+proto). See <br>
<a href="https://opensips.org/html/docs/modules/2.4.x/mid_registrar.html#func_mid_registrar_save" rel="noreferrer" target="_blank">https://opensips.org/html/docs/modules/2.4.x/mid_registrar.html#func_mid_registrar_save</a> <br>
.<br>
<br>
Regards,<br>
<br>
Bogdan-Andrei Iancu<br>
<br>
OpenSIPS Founder and Developer<br>
<a href="https://www.opensips-solutions.com" rel="noreferrer" target="_blank">https://www.opensips-solutions.com</a><br>
OpenSIPS Summit 2019<br>
<a href="https://www.opensips.org/events/Summit-2019Amsterdam/" rel="noreferrer" target="_blank">https://www.opensips.org/events/Summit-2019Amsterdam/</a><br>
<br>
On 03/15/2019 06:50 PM, John Kiniston wrote:<br>
> I'm using mid_registrar.<br>
><br>
> modparam("mid_registrar", "mode", 2)<br>
> modparam("mid_registrar", "received_avp", "$avp(received)")<br>
> modparam("mid_registrar", "max_contacts", 4)<br>
> modparam("mid_registrar", "outgoing_expires", 3600)<br>
> modparam("mid_registrar", "default_expires", 300)<br>
> modparam("mid_registrar", "min_expires", 60)<br>
> modparam("mid_registrar", "max_expires", 600)<br>
> modparam("mid_registrar", "tcp_persistent_flag", <br>
> "TCP_PERSIST_REGISTRATIONS")<br>
><br>
> I'm not modifying RURI in my script anywhere, this is working fine <br>
> with udp, just a t_relay at the end of my script.<br>
><br>
> mid_registrar_save("location", , , "3600");<br>
><br>
><br>
><br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_-3466171740300647697gmail_signature">A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.<br>---Heinlein</div>