<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Out of curiosity, what about using verto makes it not practical in your project right now?<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 27, 2015, at 6:31 PM, Michael Jerris <<a href="mailto:mike@jerris.com" class="">mike@jerris.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I understand what you are trying to do. The current sofia code has no way to handle this currently, and we don't have plans to add this functionality, because we can already do so with mod_verto. If you want this functionality in freeswitch, your options are using mod_verto, or a huge amount of c code in mod_sofia that will be very error prone as it will have to turn the state engine in that module on its head.<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 27, 2015, at 5:31 PM, Mateus Dalepiane <<a href="mailto:mdalepiane@gmail.com" class="">mdalepiane@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hey guys,<br class=""><br class=""></div><div class="">Thank you all for the attention and patience to respond my questions.<br class=""></div><div class=""><br class=""></div><div class="">I understand that the ideal solution would be to use Verto, but that's not practicable in our project right now.<br class=""><br class=""></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 class=""><br class=""><span style="font-family:monospace,monospace" class=""> WebRTC client . . . nginx . . . . FreeSWITCH<br class=""> (SIP.js) proxy |<br class=""> | | |<br class=""> | CONNECT | |<br class=""> |---------------->| |<br class=""> | INVITE |<br class=""> |---------------------------------->|<br class=""> | OK |<br class=""> |<----------------------------------|<br class=""> | ACK |<br class=""> |---------------------------------->|<br class=""> | Media Session |<br class=""> |<=================================>|<br class=""> | . |<br class=""> | . |<br class=""> | . |<br class=""> | CONNECTION FAIL | |<br class=""> |<-----XXXX------>| |<br class=""> | Media continues to flow |<br class=""> |<=================================>|<br class=""> | CONNECT | |<br class=""> |---------------->| |<br class=""> | re-INVITE |<br class=""> |---------------------------------->|<br class=""> | OK |<br class=""> |<----------------------------------|<br class=""> | ACK |<br class=""> |---------------------------------->|<br class=""> | . |<br class=""> | . |<br class=""> | . |<br class=""> | | INVITE |<br class=""> | |<------XXX-------|<br class=""> | | | FS hang up call<br class=""> | Media stop flowing |<br class=""> |<==============XXXXX==============>|</span><br class=""><br class=""></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 class=""><br class=""></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 class=""><br class=""></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 class=""><br class=""></div><div class="gmail_extra">Right now my question is:<br class=""></div><div class="gmail_extra"> - How does FS know which connection it should use to send SIP messages to the client?<br class=""><br class=""></div><div class="gmail_extra">Thank you!<br class=""><br class=""></div><div class="gmail_extra"><div class="gmail_quote">2015-03-27 17:15 GMT-03:00 Michael Jerris <span dir="ltr" class=""><<a href="mailto:mike@jerris.com" target="_blank" class="">mike@jerris.com</a>></span>:<br class=""><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" class="">verto has its own JS client in tree.<div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class=""><div class="h5"><div class="">On Mar 27, 2015, at 4:05 PM, Abdul Hakeem <<a href="mailto:alhakeem@gmail.com" target="_blank" class="">alhakeem@gmail.com</a>> wrote:</div><br class=""></div></div><div class=""><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" class=""><div class=""><div class="h5"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">Hi Guys,<u class=""></u><u class=""></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">What’s the best recommended client to connect to<span class=""> </span><span class="">Verto</span><span class=""> </span>?<u class=""></u><u class=""></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">Cheers,<u class=""></u><u class=""></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">Abdul Hakeem<u class=""></u><u class=""></u></span></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><a name="14c5ce3d7d878ebd__MailEndCompose" class=""> </a></div><span class=""></span><div class=""><div style="border-style:solid none none;border-top:1pt solid rgb(181,196,223);padding:3pt 0cm 0cm" class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><b class=""><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="EN-US" class="">From:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif" lang="EN-US" class=""><span class=""> </span><a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" class="">freeswitch-users-bounces@lists.freeswitch.org</a> [<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank" class="">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>]<span class=""> </span><b class="">On Behalf Of<span class=""> </span></b>Michael<span class=""> </span><span class="">Jerris</span><br class=""><b class="">Sent:</b><span class=""> </span>Friday, March 27, 2015 7:43 PM<br class=""><b class="">To:</b><span class=""> </span>FreeSWITCH Users Help<br class=""><b class="">Subject:</b><span class=""> </span>Re: [Freeswitch-users] Re-establish connection within a SIP session<u class=""></u><u class=""></u></span></div></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><u class=""></u> <u class=""></u></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">This is not a feature in any of the sip<span class=""> </span><span class="">js</span><span class=""> </span>stacks I know of, and I'm not quite sure how it would be implemented on top of sip. As Brian said, this is a feature in<span class=""> </span><span class="">verto</span>.<u class=""></u><u class=""></u></span></div></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div><div class=""><blockquote style="margin-top:5pt;margin-bottom:5pt" type="cite" class=""><div class=""><div class="h5"><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">On Mar 27, 2015, at 3:28 PM,<span class=""> </span><span class="">Mateus</span><span class=""> </span><span class="">Dalepiane</span><span class=""> </span><<a href="mailto:mdalepiane@gmail.com" style="color:purple;text-decoration:underline" target="_blank" class="">mdalepiane@gmail.com</a>> wrote:<u class=""></u><u class=""></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div></div></div><div class=""><div class=""><div class="h5"><div class=""><div class=""><div class=""><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:"Times New Roman",serif"><span class="">Hello Brian,<u class=""></u><u class=""></u></span></p></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">Thank you for the answer. We will consider using<span class=""> </span><span class="">Verto</span><span class=""> </span>in the future.<br class=""><br class="">Right now we will have to stick with WebRTC over SIP, we are using SIP.js for that.<br class=""><br class="">I ran some more tests and once the<span class=""> </span><span class="">Websocket</span><span class=""> </span>connection drops and is re-established,<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">even if we send a re-INVITE, FS identifies it as belonging to the old call, and<u class=""></u><u class=""></u></span></div></div><div class=""><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:"Times New Roman",serif"><span class="">responds to it, after a while FS hangs up the call reporting a NORMAL_TEMPORARY_FAILURE.<u class=""></u><u class=""></u></span></p></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">If the<span class=""> </span><span class="">Websocket</span><span class=""> </span>is not disconnected, I can see that FS sends an re-INVITE to the client after a while,<u class=""></u><u class=""></u></span></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">so I guess that what is happening is that when FS tries to send this re-INVITE it realizes that the old connection<u class=""></u><u class=""></u></span></div></div><div class=""><p class="MsoNormal" style="margin:0cm 0cm 12pt;font-size:12pt;font-family:"Times New Roman",serif"><span class="">was closed and hangs up the call.<u class=""></u><u class=""></u></span></p></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">My question now is: Why FS does not update the connection information for the call once the re-INVITE from<br class="">the new connection is received?<u class=""></u><u class=""></u></span></div></div></div></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div><div class=""><div class=""><div class="h5"><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">2015-03-26 15:15 GMT-03:00 Brian West <<a href="mailto:brian@freeswitch.org" style="color:purple;text-decoration:underline" target="_blank" class="">brian@freeswitch.org</a>>:<u class=""></u><u class=""></u></span></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">Have you taken a look at<span class=""> </span><span class="">Verto</span>?<u class=""></u><u class=""></u></span></div></div></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div><div class=""><div class=""><div class="h5"><div class=""><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class="">On Thu, Mar 26, 2015 at 12:08 PM,<span class=""> </span><span class="">Mateus</span><span class=""> </span><span class="">Dalepiane</span><span class=""> </span><<a href="mailto:mdalepiane@gmail.com" style="color:purple;text-decoration:underline" target="_blank" class="">mdalepiane@gmail.com</a>> wrote:<u class=""></u><u class=""></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" class=""><div class=""><div class=""><div class=""><div class=""><div class=""><div class="h5"><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11.5pt;font-family:Arial,sans-serif" class="">We have the following scenario: The session is established between WebRTC and FreeSWITCH using<span class=""> </span><span class="">Websockets</span>.</span><span class=""><u class=""></u><u class=""></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div></div></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11.5pt;font-family:Arial,sans-serif" class="">Once the session is established, if the<span class=""> </span><span class="">websocket</span><span class=""> </span>connection drops the media continues to flow<span class=""> </span><span class="">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 class=""><u class=""></u><u class=""></u></span></div></div><span class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11.5pt;font-family:Arial,sans-serif" class="">Now, if the<span class=""> </span><span class="">websocket</span><span class=""> </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 class=""><u class=""></u><u class=""></u></span></div></div><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span class=""> </span></div><div class=""><div style="margin:0cm 0cm 0.0001pt;font-size:12pt;font-family:"Times New Roman",serif" class=""><span style="font-size:11.5pt;font-family:Arial,sans-serif" class="">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 class="">_</blockquote></div></div></div></div></blockquote></div></div></div></div></blockquote></div></div></body></html>