<div dir="ltr">Hello,<div><br></div><div>I have a <a href="http://bandwidth.com">bandwidth.com</a> number pointed to opensips, and a WebRTC peer registered with Opensips. I'm trying to dial the 10 digit number from a cell phone and connect the call through FreeSWITCH to the Chrome WebRTC client.</div>
<div><br></div><div><br></div><div>I defined opensips as a gateway, in the external profile:</div><div><br></div><div><div><include></div><div> <gateway name="ws-Opensips"></div><div> <!-- <param name="from-user" value="fromuser"/> --></div>
<div> <param name="from-domain" value="54.X.X.75"/></div><div> <param name="proxy" value="54.X.X.75"/></div><div> <param name="expire-seconds" value="600"/></div>
<div> <param name="register" value="false"/></div><div> <param name="retry_seconds" value="30"/></div><div> <param name="extension" value="18257773456"/></div>
<div> <param name="context" value="public"/></div><div> <param name="avpf" value="yes"/></div><div> <param name="username" value="11234"/></div>
<div> <param name="password" value="password"/></div><div> </gateway></div><div></include></div></div><div><br></div><div><br></div><div>In the public dialplan context, I added in a condition to catch the INVITE coming in from opensips and pass it to a context I've called "default-inbound". See the second condition:</div>
<div><br></div><div><div> <extension name="from_opensips"></div><div> <condition field="network_addr" expression="^54\.X\.X\.75$" break="never"> <!--CUSTOMIZE--></div>
<div> <action application="transfer" data="${destination_number} XML default"/></div><div> </condition></div><div> <condition field="network_addr" expression="^54\.X\.X\.111$"> <!--CUSTOMIZE Use a third context here --></div>
<div> <action application="transfer" data="${destination_number} XML default-inbound"/></div><div> </condition></div><div> </extension></div><div><br></div><div><br></div><div>
Then, in the default-inbound context, I match the dialed number, answer the call leg from the PSTN, and then try to transfer back through opensips to oversip and to Chrome. The problem is that I either end up sending back AVP INVITES, or Opensips refuses to authenticate the user. </div>
<div><br></div><div><div><extension name="<a href="http://bandwidth.com">bandwidth.com</a> inbound bridge"></div><div> <condition field="destination_number" expression="^\+1(5035551212)$"><br>
</div><div> <action application="answer" /><br></div><div> <action application="set" data="variable_sip_auth_username=11234"/></div><div> <action application="set" data="variable_sip_auth_password=password"/></div>
<div> <action application="bridge" data="sofia/external/ws-Opensips/11234@54.X.X.75"/></div><div><br></div><div> </condition></div><div> </extension></div></div><div><br></div>
<div><br></div><div>As you can see, I've hard-coded my peer, 11234, in the configuration. This is a registered user on Opensips. </div><div><br></div><div>How can I get FreeSWITCH to send the SAVPF INVITE through to Opensips for the WebRTC portion of the call leg? I apologize if this is covered somewhere, but I've been wracking my brain on this for days and am not getting anywhere.</div>
<div><br></div><div>The Opensips configuration I have works with existing Asterisk 11 servers, and I'm hoping I can just simply plug in FreeSWITCH servers seamlessly into the mix.</div><div><br></div><div>Thank you!</div>
<div><div dir="ltr"><div><br></div><div>James<br></div><div><br><div><br></div></div></div></div></div></div>