<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt">in your ws-Opensips gateway definition, you have "register" set to "false"<br>If you change it to "true", FreeSWITCH will authenticate on that gateway.<br><br>is that what you try to achieve?<br><br><div><span><br></span></div><div><br></div>  <div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span style="font-weight:bold;">From:</span></b> James Mortensen &lt;james.mortensen@synclio.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> FreeSWITCH Users Help &lt;freeswitch-users@lists.freeswitch.org&gt; <br> <b><span style="font-weight: bold;">Sent:</span></b> Saturday, September 28, 2013 2:26 AM<br> <b><span style="font-weight: bold;">Subject:</span></b>
 [Freeswitch-users] Sending SAVPF INVITE to Opensips<br> </font> </div> <div class="y_msg_container"><br><div id="yiv1311942392"><div dir="ltr">Hello,<div><br></div><div>I have a <a rel="nofollow" target="_blank" href="http://bandwidth.com/">bandwidth.com</a> number pointed to opensips, and a WebRTC peer registered with Opensips. &nbsp;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>&lt;include&gt;</div><div>&nbsp; &nbsp;&lt;gateway name="ws-Opensips"&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;!-- &lt;param name="from-user" value="fromuser"/&gt; --&gt;</div>

<div>&nbsp; &nbsp; &nbsp;&lt;param name="from-domain" value="54.X.X.75"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="proxy" value="54.X.X.75"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="expire-seconds" value="600"/&gt;</div>

<div>&nbsp; &nbsp; &nbsp;&lt;param name="register" value="false"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="retry_seconds" value="30"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="extension" value="18257773456"/&gt;</div>

<div>&nbsp; &nbsp; &nbsp;&lt;param name="context" value="public"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="avpf" value="yes"/&gt;</div><div>&nbsp; &nbsp; &nbsp;&lt;param name="username" value="11234"/&gt;</div>

<div>&nbsp; &nbsp; &nbsp;&lt;param name="password" value="password"/&gt;</div><div>&nbsp; &nbsp;&lt;/gateway&gt;</div><div>&lt;/include&gt;</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>&nbsp;&lt;extension name="from_opensips"&gt;</div><div>&nbsp; &nbsp; &lt;condition field="network_addr" expression="^54\.X\.X\.75$" break="never"&gt; &lt;!--CUSTOMIZE--&gt;</div>

<div>&nbsp; &nbsp; &nbsp; &lt;action application="transfer" data="${destination_number} XML default"/&gt;</div><div>&nbsp; &nbsp; &lt;/condition&gt;</div><div>&nbsp; &nbsp; &lt;condition field="network_addr" expression="^54\.X\.X\.111$"&gt; &lt;!--CUSTOMIZE Use a third context here --&gt;</div>

<div>&nbsp; &nbsp; &nbsp; &lt;action application="transfer" data="${destination_number} XML default-inbound"/&gt;</div><div>&nbsp; &nbsp; &lt;/condition&gt;</div><div>&nbsp; &lt;/extension&gt;</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. &nbsp;The problem is that I either end up sending back AVP INVITES, or Opensips refuses to authenticate the user.&nbsp;</div>

<div><br></div><div><div>&lt;extension name="<a rel="nofollow" target="_blank" href="http://bandwidth.com/">bandwidth.com</a> inbound bridge"&gt;</div><div>&nbsp; &nbsp; &lt;condition field="destination_number" expression="^\+1(5035551212)$"&gt;<br>

</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="answer" /&gt;<br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="variable_sip_auth_username=11234"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="set" data="variable_sip_auth_password=password"/&gt;</div>

<div>&nbsp; &nbsp; &nbsp; &nbsp;&lt;action application="bridge" data="sofia/external/ws-Opensips/11234@54.X.X.75"/&gt;</div><div><br></div><div>&nbsp; &nbsp; &lt;/condition&gt;</div><div>&nbsp; &lt;/extension&gt;</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. &nbsp;</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? &nbsp;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></div><br>_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services:<br><a ymailto="mailto:consulting@freeswitch.org" 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
 ymailto="mailto:FreeSWITCH-users@lists.freeswitch.org" 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><br></div> </div> </div>  </div></body></html>