<div dir="ltr"><div>Hey guys,<br><br></div><div>Thank you all for the attention and patience to respond my questions.<br></div><div><br></div><div>I understand that the ideal solution would be to use Verto, but that&#39;s not practicable in our project right now.<br><br></div><div class="gmail_extra">So, about the reconnected session, I am not sure if I made myself clear about what is happening, and what I am trying to do.<br><br><span style="font-family:monospace,monospace">    WebRTC client  . . . nginx  . . . . FreeSWITCH<br>      (SIP.js)           proxy               |<br>         |                 |                 |<br>         |     CONNECT     |                 |<br>         |----------------&gt;|                 |<br>         |              INVITE               |<br>         |----------------------------------&gt;|<br>         |                OK                 |<br>         |&lt;----------------------------------|<br>         |                ACK                |<br>         |----------------------------------&gt;|<br>         |           Media Session           |<br>         |&lt;=================================&gt;|<br>         |                 .                 |<br>         |                 .                 |<br>         |                 .                 |<br>         | CONNECTION FAIL |                 |<br>         |&lt;-----XXXX------&gt;|                 |<br>         |       Media continues to flow     |<br>         |&lt;=================================&gt;|<br>         |     CONNECT     |                 |<br>         |----------------&gt;|                 |<br>         |              re-INVITE            |<br>         |----------------------------------&gt;|<br>         |                OK                 |<br>         |&lt;----------------------------------|<br>         |                ACK                |<br>         |----------------------------------&gt;|<br>         |                 .                 |<br>         |                 .                 |<br>         |                 .                 |<br>         |                 |     INVITE      |<br>         |                 |&lt;------XXX-------|<br>         |                 |                 | FS hang up call<br>         |         Media stop flowing        |<br>         |&lt;==============XXXXX==============&gt;|</span><br><br></div><div class="gmail_extra">So, based on this scenario, when the Websocket connection to nginx fails, we reconnect it, but since the media is going through other connections, RTP over UDP, it is not affected.<br><br></div><div class="gmail_extra">Now, with the new websocket connection in place the client is able to send re-INVITEs and BYE to FS, and it is recognized as requests for the session established using the first connection.<br><br></div><div class="gmail_extra">The problem is that when FS tries to send a message to the client it fails (NORMAL_TEMPORARY_FAILURE) and hangs up the call.<br><br></div><div class="gmail_extra">Right now my question is:<br></div><div class="gmail_extra"> - How does FS know which connection it should use to send SIP messages to the client?<br><br></div><div class="gmail_extra">Thank you!<br><br></div><div class="gmail_extra"><div class="gmail_quote">2015-03-27 17:15 GMT-03:00 Michael Jerris <span dir="ltr">&lt;<a href="mailto:mike@jerris.com" target="_blank">mike@jerris.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">verto has its own JS client in tree.<div><br><div><blockquote type="cite"><div><div class="h5"><div>On Mar 27, 2015, at 4:05 PM, Abdul Hakeem &lt;<a href="mailto:alhakeem@gmail.com" target="_blank">alhakeem@gmail.com</a>&gt; wrote:</div><br></div></div><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div class="h5"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Hi Guys,<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>What’s the best recommended client to connect to<span> </span><span>Verto</span><span> </span>?<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Cheers,<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Abdul Hakeem<u></u><u></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><a name="14c5ce3d7d878ebd__MailEndCompose"> </a></div><span></span><div><div style="border-style:solid none none;border-top:1pt solid rgb(181,196,223);padding:3pt 0cm 0cm"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><b><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="EN-US">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="EN-US"><span> </span><a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>]<span> </span><b>On Behalf Of<span> </span></b>Michael<span> </span><span>Jerris</span><br><b>Sent:</b><span> </span>Friday, March 27, 2015 7:43 PM<br><b>To:</b><span> </span>FreeSWITCH Users Help<br><b>Subject:</b><span> </span>Re: [Freeswitch-users] Re-establish connection within a SIP session<u></u><u></u></span></div></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><u></u> <u></u></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>This is not a feature in any of the sip<span> </span><span>js</span><span> </span>stacks I know of, and I&#39;m not quite sure how it would be implemented on top of sip.  As Brian said, this is a feature in<span> </span><span>verto</span>.<u></u><u></u></span></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div><div><blockquote style="margin-top:5pt;margin-bottom:5pt" type="cite"><div><div class="h5"><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>On Mar 27, 2015, at 3:28 PM,<span> </span><span>Mateus</span><span> </span><span>Dalepiane</span><span> </span>&lt;<a href="mailto:mdalepiane@gmail.com" style="color:purple;text-decoration:underline" target="_blank">mdalepiane@gmail.com</a>&gt; wrote:<u></u><u></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div></div></div><div><div><div class="h5"><div><div><div><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Hello Brian,<u></u><u></u></span></p></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Thank you for the answer. We will consider using<span> </span><span>Verto</span><span> </span>in the future.<br><br>Right now we will have to stick with WebRTC over SIP, we are using SIP.js for that.<br><br>I ran some more tests and once the<span> </span><span>Websocket</span><span> </span>connection drops and is re-established,<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>even if we send a re-INVITE, FS identifies it as belonging to the old call, and<u></u><u></u></span></div></div><div><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>responds to it, after a while FS hangs up the call reporting a NORMAL_TEMPORARY_FAILURE.<u></u><u></u></span></p></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>If the<span> </span><span>Websocket</span><span> </span>is not disconnected, I can see that FS sends an re-INVITE to the client after a while,<u></u><u></u></span></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>so I guess that what is happening is that when FS tries to send this re-INVITE it realizes that the old connection<u></u><u></u></span></div></div><div><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>was closed and hangs up the call.<u></u><u></u></span></p></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>My question now is: Why FS does not update the connection information for the call once the re-INVITE from<br>the new connection is received?<u></u><u></u></span></div></div></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div><div><div><div class="h5"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>2015-03-26 15:15 GMT-03:00 Brian West &lt;<a href="mailto:brian@freeswitch.org" style="color:purple;text-decoration:underline" target="_blank">brian@freeswitch.org</a>&gt;:<u></u><u></u></span></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>Have you taken a look at<span> </span><span>Verto</span>?<u></u><u></u></span></div></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div><div><div><div class="h5"><div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span>On Thu, Mar 26, 2015 at 12:08 PM,<span> </span><span>Mateus</span><span> </span><span>Dalepiane</span><span> </span>&lt;<a href="mailto:mdalepiane@gmail.com" style="color:purple;text-decoration:underline" target="_blank">mdalepiane@gmail.com</a>&gt; wrote:<u></u><u></u></span></div></div></div></div></div><blockquote style="border-style:none none none solid;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm" type="cite"><div><div><div><div><div><div class="h5"><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.5pt;font-family:Arial,sans-serif">We have the following scenario: The session is established between WebRTC and FreeSWITCH using<span> </span><span>Websockets</span>.</span><span><u></u><u></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div></div></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.5pt;font-family:Arial,sans-serif">Once the session is established, if the<span> </span><span>websocket</span><span> </span>connection drops the media continues to flow<span> </span><span>util</span>FreeSWITCH tries to send a re-INVITE to the client. At this point it realizes that the connection was closed and hangs up the call.</span><span><u></u><u></u></span></div></div><span class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.5pt;font-family:Arial,sans-serif">Now, if the<span> </span><span>websocket</span><span> </span>connection drops and is re-established, would it be possible to inform FreeSWITCH that the new connection should be used for the previously established session?</span><span><u></u><u></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span> </span></div><div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.5pt;font-family:Arial,sans-serif">If the WebRTC client sends an INVITE message with the old session parameters, FreeSWITCH will be able to understand that it belongs to the old session?</span></div></div></span></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div></div>