<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Were you aware that FreeSWITCH also supports websockets natively?<div><br><div><div>On Sep 29, 2013, at 1:01 PM, James Mortensen &lt;<a href="mailto:james.mortensen@synclio.com">james.mortensen@synclio.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Kristian,&nbsp;<div><br></div><div>No, I wasn't aware&nbsp;<span style="color:rgb(102,102,102);font-family:'Trebuchet MS',sans-serif,Verdana,Arial;font-size:13px;line-height:21.578125px">OpenSIPS</span>&nbsp;handled WebSockets. Looks like it's even been supported since v1.9, which is the one we're using.</div>

<div><br></div><div>This gives us more to think about. &nbsp;Thank you!</div><div><br></div><div class="gmail_extra"><div><div dir="ltr"><div><br></div><div>James<br></div><div><br><div><br></div></div></div></div><br><div class="gmail_quote">

On Sat, Sep 28, 2013 at 4:22 PM, Kristian Kielhofner <span dir="ltr">&lt;<a href="mailto:kris@kriskinc.com" target="_blank">kris@kriskinc.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I'm glad it worked for you.<div><br></div><div>Are you aware that Opensips supports SIP over websockets and secure websockets&nbsp;<span></span>natively?<div><div class="h5"><br><br>On Saturday, September 28, 2013, James Mortensen  wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Kristian,<div><br></div><div>You're right, what I want is a WebRTC SDP, which FreeSWITCH is clearly capable of generating as it does this with the default configuration by default if port 5066 is enabled for the ws-binding parameter. &nbsp;</div>




<div><br></div><div>To answer your question, OverSIP sits in front of Opensips between the Chrome client and Opensips. &nbsp;Chrome can only register with a SIP endpoint using websockets, so OverSIP listens on a TCP/WS port and passes the SIP messages to Opensips.</div>




<div><br></div><div><a href="http://BANDWIDTH.com">BANDWIDTH.com</a> --udp--&gt; &nbsp;FreeSWITCH -udp--&gt; &nbsp;Opensips -udp--&gt; OverSIP --ws--&gt; Chrome WebRTC client.</div><div><br></div><div>It looks like what I was missing was the&nbsp;&lt;action application="export" data="media_webrtc=true"/&gt; and using application export instead of set. &nbsp;I was able to get an inbound call routed to my Chrome client, answer it, and experience two way audio.</div>




<div><br></div><div><br></div><div>Thanks again! :)</div><div><br></div><div class="gmail_extra"><div><div dir="ltr"><div><br></div><div>James<br></div><div><br><div><br></div></div></div></div><br><div>

On Sat, Sep 28, 2013 at 12:46 PM, Kristian Kielhofner <span dir="ltr">&lt;<a>kris@kriskinc.com</a>&gt;</span> wrote:<br><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

James,<br>
<br>
&nbsp; There's quite a bit of detail omitted here but a few points:<br>
<br>
- avpf=yes on your gateway definition isn't doing anything.<br>
- Have you tried exporting media_webrtc=true before bridging back to Opensips?<br>
- Try exporting the actual variables, not including variable_ :<br>
<div><br>
&lt;extension name="<a href="http://bandwidth.com/" target="_blank">bandwidth.com</a> inbound bridge"&gt;<br>
&nbsp; &nbsp; &lt;condition field="destination_number" expression="^\+1(5035551212)$"&gt;<br>
</div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="answer" /&gt; &lt;!-- This probably shouldn't be<br>
here either --&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="export" data="sip_auth_username=11234"/&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="export" data="sip_auth_password=password"/&gt;<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="export" data="media_webrtc=true"/&gt;<br>
<div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge"<br>
data="<a href="mailto:sofia/external/ws-Opensips/11234@54.X.X.75">sofia/external/ws-Opensips/11234@54.X.X.75</a>"/&gt;<br>
&nbsp; &nbsp; &lt;/condition&gt;<br>
&nbsp; &lt;/extension&gt;<br>
<br>
</div>- While you do want an "SAVPF INVITE" you really want a WebRTC SDP,<br>
which includes much much more than just SAVPF.<br>
- You'll probably want to do all other sorts of codec manipulation,<br>
fixups, etc when bridging between typical SIP endpoints and WebRTC<br>
endpoints. &nbsp;Look into late negotiation and every codec<br>
variable/setting you can find.<br>
- You may want to re-consider the interaction and authentication<br>
between OpenSIPS and FreeSWITCH.<br>
<br>
&nbsp; Also, what are you using OverSIP for in this scenario?<br>
<div><br>
<br>
On Fri, Sep 27, 2013 at 8:26 PM, James Mortensen<br>
&lt;<a>james.mortensen@synclio.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt;<br>
&gt; I have a <a href="http://bandwidth.com/" target="_blank">bandwidth.com</a> number pointed to opensips, and a WebRTC peer<br>
&gt; registered with Opensips. &nbsp;I'm trying to dial the 10 digit number from a<br>
&gt; cell phone and connect the call through FreeSWITCH to the Chrome WebRTC<br>
&gt; client.<br>
&gt;<br>
&gt;<br>
&gt; I defined opensips as a gateway, in the external profile:<br>
&gt;<br>
&gt; &lt;include&gt;<br>
&gt; &nbsp; &nbsp;&lt;gateway name="ws-Opensips"&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;!-- &lt;param name="from-user" value="fromuser"/&gt; --&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="from-domain" value="54.X.X.75"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="proxy" value="54.X.X.75"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="expire-seconds" value="600"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="register" value="false"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="retry_seconds" value="30"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="extension" value="18257773456"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="context" value="public"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="avpf" value="yes"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="username" value="11234"/&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&lt;param name="password" value="password"/&gt;<br>
&gt; &nbsp; &nbsp;&lt;/gateway&gt;<br>
&gt; &lt;/include&gt;<br>
&gt;<br>
&gt;<br>
&gt; In the public dialplan context, I added in a condition to catch the INVITE<br>
&gt; coming in from opensips and pass it to a context I've called<br>
&gt; "default-inbound". See the second condition:<br>
&gt;<br>
&gt; &nbsp;&lt;extension name="from_opensips"&gt;<br>
&gt; &nbsp; &nbsp; &lt;condition field="network_addr" expression="^54\.X\.X\.75$"<br>
&gt; break="never"&gt; &lt;!--CUSTOMIZE--&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;action application="transfer" data="${destination_number} XML<br>
&gt; default"/&gt;<br>
&gt; &nbsp; &nbsp; &lt;/condition&gt;<br>
&gt; &nbsp; &nbsp; &lt;condition field="network_addr" expression="^54\.X\.X\.111$"&gt;<br>
&gt; &lt;!--CUSTOMIZE Use a third context here --&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;action application="transfer" data="${destination_number} XML<br>
&gt; default-inbound"/&gt;<br>
&gt; &nbsp; &nbsp; &lt;/condition&gt;<br>
&gt; &nbsp; &lt;/extension&gt;<br>
&gt;<br>
&gt;<br>
&gt; Then, in the default-inbound context, I match the dialed number, answer the<br>
&gt; call leg from the PSTN, and then try to transfer back through opensips to<br>
&gt; oversip and to Chrome. &nbsp;The problem is that I either end up sending back AVP<br>
&gt; INVITES, or Opensips refuses to authenticate the user.<br>
&gt;<br>
&gt; &lt;extension name="<a href="http://bandwidth.com/" target="_blank"></a></div></blockquote></div></div></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><br>-- <br>Sent from mobile device<br>
</font></span><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>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com/" target="_blank">http://www.cudatel.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://wiki.freeswitch.org/" target="_blank">http://wiki.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>
<br></blockquote></div><br></div></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>http://www.freeswitchsolutions.com<br><br>FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>http://www.cudatel.com<br><br>Official FreeSWITCH Sites<br>http://www.freeswitch.org<br>http://wiki.freeswitch.org<br>http://www.cluecon.com<br><br>FreeSWITCH-users mailing list<br>FreeSWITCH-users@lists.freeswitch.org<br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>