<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Liviu, </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I used git to clone the repot . Im assuming is the latest ? </div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><pre style="font-size:0.9em;font-family:"Lucida Console","Andale Mono","Courier New",Courier;margin-top:0px;margin-bottom:0px;color:rgb(102,102,102);font-variant-ligatures:normal"><strong><code class="escaped" style="font-size:11.7072px;font-family:"Lucida Console","Andale Mono","Courier New",Courier;padding:6px;border:1px solid rgb(235,235,235);background-color:rgb(251,254,250);white-space:nowrap">git clone <a href="https://github.com/OpenSIPS/opensips.git">https://github.com/OpenSIPS/opensips.git</a> -b 2.3 opensips-2.3</code></strong></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 14, 2018 at 5:06 AM, Liviu Chircu <span dir="ltr"><<a href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><tt>Hi Sebastian,</tt></p>
<p><tt>Are you using the major (initial) release RPM of 2.3, or the
latest minor release one? This issue has only been fixed a
couple of months ago -- the fix is available starting with
2.3.3.</tt></p>
<p><tt>Regards,</tt><br>
</p>
<pre class="m_-1021961541819069050moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_-1021961541819069050moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.<wbr>com</a></pre><div><div class="h5">
<div class="m_-1021961541819069050moz-cite-prefix">On 13.03.2018 21:19, Sebastian Sastre
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:tahoma,sans-serif">Razvan, </div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">You
are right, It actually looks like a bug with mid_registrar, I
changed the function from midregistar_save to save only and I
can now see the received attribute. </div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><b>This
is my registration Route </b></div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">As
you can see I call the fix_nated_register right before calling
the save </div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif"><br>
</div>
<div class="gmail_default" style="font-family:tahoma,sans-serif">
<div class="gmail_default">route {</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>if
(is_method("REGISTER")){<span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
<span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>route(user_registration);<span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>exit;</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}<span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default">}</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">route[user_registration]{</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_INFO","$var(prefix)
- [Registration Route] \n");</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>if
(!www_authorize("", "subscriber")){</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
xlog("L_INFO","$var(prefix) - Challenge, come back with
good credentials \n");</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
www_challenge("", "1");</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
exit;</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}
</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
</div>
<div class="gmail_default"> setflag(TCP_PERSIST_REGISTER);</div>
<div class="gmail_default">
setflag(TCP_PERSIST_<wbr>REGISTRATIONS); </div>
<div class="gmail_default"> setbflag(NAT_BFLAG);</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>if
(!db_check_to()){</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>xlog("L_INFO","$var(prefix)
- Forbidden auth ID \n");</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>sl_send_reply("403","Forbidden
auth ID"); </div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>exit;</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>}
</div>
<div class="gmail_default"> </div>
<div class="gmail_default"> fix_nated_register();
</div>
<div class="gmail_default"> mid_registrar_save("location",
"mf", "$fu"); </div>
<div class="gmail_default"> switch ($retcode) {</div>
<div class="gmail_default"> case 1:</div>
<div class="gmail_default"> xlog("L_INFO","$var(prefix)
- Registration Successfull (Forwarding) \n");</div>
<div class="gmail_default"> $ru = "sip:<a href="http://10.101.10.153:5060" target="_blank">10.101.10.153:5060</a>";</div>
<div class="gmail_default"> t_relay();</div>
<div class="gmail_default"> break;</div>
<div class="gmail_default"> case 2:</div>
<div class="gmail_default"> xlog("L_INFO","$var(prefix)
- Registration Successfull (absorbing) \n");</div>
<div class="gmail_default"> break;</div>
<div class="gmail_default"> default:</div>
<div class="gmail_default"> xlog("L_INFO","$var(prefix)
- failed to save registration! ($$ci=$ci)\n");</div>
<div class="gmail_default"> sl_reply_error();</div>
<div class="gmail_default"> exit;<span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default"> } <span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>exit; </div>
<div class="gmail_default"><span class="m_-1021961541819069050gmail-Apple-tab-span" style="white-space:pre-wrap"> </span></div>
<div class="gmail_default">}</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Mar 13, 2018 at 11:43 AM,
Răzvan Crainea <span dir="ltr"><<a href="mailto:razvan@opensips.org" target="_blank">razvan@opensips.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,
Sebastian!<br>
<br>
The fix_nated_register() doesn't seem to be called for
REGISTERs, because I don't see any "Received" line in the
"ul dump" command. Make sure you call fix_nated_register()
for all the WSS REGISTER messages.<br>
<br>
Best regards,<br>
Răzvan<span><br>
<br>
On 03/12/2018 10:28 PM, Sebastian Sastre wrote:<br>
</span>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
<br>
I’m experiencing a problem regarding web socket
registrations. I saw a similar thread but didn’t have a
resolution so here we go.<br>
<br>
Im using the 2.3 Branch with rtpengine , wss and mid
registrar. Using Sip.js library I can register the
client without a problem and also able to place calls
thru an asterisk box without problems. To be exact, my
setup is<br>
<br>
Sip.JS ——> Opensips + rtpengine —-> Asterisk 1.3
—-> PSTN<br>
<br>
<br>
However, when trying to call the subscriber from
asterisk (opposite direction), opensips fails to get a
valid tcp connection. It complagreatins about not
finding a suitable tcp and timing out to a TCP block
477/TM transaction.<br>
<br>
DBG:proto_<a class="m_-1021961541819069050moz-txt-link-freetext">wss:proto_wss_send</a>: no open tcp connection
found, opening new one<br>
DBG:core:probe_max_sock_buff: getsockopt: snd is
initially 16384<br>
DBG:core:probe_max_sock_buff: trying : 32768<br>
DBG:core:probe_max_sock_buff: setting snd:
set=32768,verify=65536<br>
DBG:core:probe_max_sock_buff: trying : 65536<br>
DBG:core:probe_max_sock_buff: setting snd:
set=65536,verify=131072<br>
DBG:core:probe_max_sock_buff: trying : 131072<br>
DBG:core:probe_max_sock_buff: setting snd:
set=131072,verify=262144<br>
DBG:core:probe_max_sock_buff: trying : 262144<br>
DBG:core:probe_max_sock_buff: setting snd:
set=262144,verify=425984<br>
<a class="m_-1021961541819069050moz-txt-link-freetext">INFO:core:probe_max_sock_buff</a>: using snd buffer of 416
kb<br>
<a class="m_-1021961541819069050moz-txt-link-freetext">INFO:core:init_sock_keepalive</a>: TCP keepalive enabled on
socket 7<br>
ERROR:core:tcp_connect_blockin<wbr>g: timeout 99198 ms
elapsed from 100000 s<br>
ERROR:proto_<a class="m_-1021961541819069050moz-txt-link-freetext">wss:ws_sync_connec</a><wbr>t:
tcp_blocking_connect failed<br>
ERROR:proto_<a class="m_-1021961541819069050moz-txt-link-freetext">wss:ws_connect</a>: connect failed<br>
ERROR:proto_<a class="m_-1021961541819069050moz-txt-link-freetext">wss:proto_wss_send</a><wbr>: connect failed<br>
</span>
ERROR:tm:msg_send: send() to <a href="http://192.0.2.48:443" rel="noreferrer" target="_blank">192.0.2.48:443</a>
<<a href="http://192.0.2.48:443" rel="noreferrer" target="_blank">http://192.0.2.48:443</a>>
for proto wss/6 failed<span><br>
ERROR:tm:t_forward_nonack: sending request failed<br>
<br>
Whats interesting is that if I execute a constant
opensipsctl fifo list_tcp_conns, The connection never
drops.<br>
<br>
</span>
*root@gcwRegistrar151:~$ opensipsctl fifo list_tcp_conns*<br>
Connection:: ID=1189087375 Type=wss State=0 Source=<a href="http://192.168.91.2:60888" rel="noreferrer" target="_blank">192.168.91.2:60888</a>
<<a href="http://192.168.91.2:60888" rel="noreferrer" target="_blank">http://192.168.91.2:60888</a>>
Destination=<a href="http://10.101.10.151:443" rel="noreferrer" target="_blank">10.101.10.151:443</a>
<<a href="http://10.101.10.151:443" rel="noreferrer" target="_blank">http://10.101.10.151:443</a>>
Lifetime=2106-02-07 02:28:25<span><br>
<br>
<br>
I tried seting the tcp_persistent_flag before the
register and the NAT flag as well. Here is the AOR<br>
<br>
</span>
*This is the registration part. *<br>
*<br>
*<span><br>
<br>
setflag(TCP_PERSIST_REGISTRATI<wbr>ONS);<br>
fix_nated_register();<br>
setbflag(NAT_BFLAG);<br>
<br>
if (!db_check_to()){<br>
xlog("L_INFO","$var(prefix) - Forbidden auth ID
\n");<br>
sl_send_reply("403","Forbidden auth ID");<br>
exit;<br>
}<br>
<br>
<br>
mid_registrar_save("location", "mf");<br>
switch ($retcode) {<br>
case 1:<br>
xlog("L_INFO","$var(prefix) - Registration
Successfull (Forwarding) \n");<br>
</span>
$ru = "sip:<a href="http://10.101.10.153:5060" rel="noreferrer" target="_blank">10.101.10.153:5060</a>
<<a href="http://10.101.10.153:5060" rel="noreferrer" target="_blank">http://10.101.10.153:5060</a>>";<span><br>
t_relay();<br>
break;<br>
case 2:<br>
xlog("L_INFO","$var(prefix) - Registration
Successfull (absorbing) \n");<br>
break;<br>
default:<br>
xlog("L_INFO","$var(prefix) - failed to save
registration! ($$ci=$ci)\n");<br>
sl_reply_error();<br>
exit;<br>
}<br>
<br>
<br>
</span>
*And here is the lookup part.*<span><br>
<br>
if (mid_registrar_lookup("locatio<wbr>n", "m")){<br>
xlog("L_INFO","$var(prefix) - Call is for local user
$rU , forwarding ... \n");<br>
route(inbound_call);<br>
}<br>
<br>
Domain:: location hash_size=512<br>
</span>
* AOR:: <a href="mailto:agent@gcwregistrar.domain.com" target="_blank">agent@gcwregistrar.domain.com</a>
<mailto:<a href="mailto:agent@gcwregistrar.domain.com" target="_blank">agent@gcwregistrar.dom<wbr>ain.com</a>>*<br>
Contact:: <a href="mailto:sip%3Abcd9bu7j@192.0.2.37" target="_blank">sip:bcd9bu7j@192.0.2.37</a>
<mailto:<a href="mailto:sip%253Abcd9bu7j@192.0.2.37" target="_blank">sip%3Abcd9bu7j@192.0.2<wbr>.37</a>>;transport=wss
Q=<span><br>
ContactID:: 1722063907515827933<br>
Expires:: 352<br>
Callid:: 4oqvt7es6ga8pqd8ei7nt0<br>
Cseq:: 193<br>
User-agent:: SIP.js/0.7.8 BB<br>
State:: CS_NEW<br>
Flags:: 0<br>
Cflags:: NAT_BFLAG<br>
</span>
Socket:: wss:<a href="http://10.101.10.151:443" rel="noreferrer" target="_blank">10.101.10.151:443</a>
<<a href="http://10.101.10.151:443" rel="noreferrer" target="_blank">http://10.101.10.151:443</a>><span><br>
Methods:: 5439<br>
SIP_instance::
<urn:uuid:07e6eb5c-2294-42a1-b<wbr>263-a00642b0c277><br>
<br>
<br>
<br>
I don’t think its related to the mid registrar since I
tried just using the regular registrar and the same
thing happens.<br>
<br>
Any ideas?<br>
<br>
Thanks<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br>
<span class="m_-1021961541819069050HOEnZb"><font color="#888888">
</font></span></blockquote>
<span class="m_-1021961541819069050HOEnZb"><font color="#888888">
<br>
-- <br>
Răzvan Crainea<br>
OpenSIPS Core Developer<br>
<a href="http://www.opensips-solutions.com" rel="noreferrer" target="_blank">http://www.opensips-solutions.<wbr>com</a><br>
OpenSIPS Summit 2018<br>
<a href="http://www.opensips.org/events/Summit-2018Amsterdam" rel="noreferrer" target="_blank">http://www.opensips.org/events<wbr>/Summit-2018Amsterdam</a><br>
<br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
</font></span></blockquote>
</div>
<br>
</div>
<br>
<fieldset class="m_-1021961541819069050mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Users mailing list
<a class="m_-1021961541819069050moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a class="m_-1021961541819069050moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-<wbr>bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>