<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Sammy and Fred,<div><br></div><div>Basically I'm building a hosted PBX platform using a muti domain FreeSWITCH setup. &nbsp;Freeswitch and Kamailio are on a public IP. &nbsp;Previously all endpoints registered to Freeswitch directly which works great. &nbsp;For scalability purposes, my thought was to use Kamailio in front of Freeswitch to handle the grunt work of far end NAT traversal and using rtpproxy for media proxy. &nbsp;Here's where things get a bit complicated. &nbsp;I don't have a way to handle auth directly from Kamailio in this particular setup as the application's db schema will not map to what I need to do multi-domain auth in Kamailio. &nbsp;So I'm blindly forwarding everything not originating from Freeswitch to Freeswitch and dealing with auth there. &nbsp;</div><div><br></div><div>Since the client endpoints are behind NAT, this gets interesting :-). &nbsp;I need to ping all NATed endpoints to keep the connection open. &nbsp;I can't just forward the REGISTER and let Freeswitch ping the devices because it can't get to them as they opened a pinhole to Kamailio. &nbsp;I also need presence to work, and all presence is handled by Freeswitch as well. &nbsp;So my thought is this:</div><div><br></div><div>Let Kamailo ping the endpoints. &nbsp;This obviously requires a registration. &nbsp;Since Freeswitch is the only piece with credentials, save every REGISTER and remove the ones that fail in a failure route. &nbsp;I check for a not empty $au before saving and remove the ones that fail. &nbsp;I'm using usrloc in memory only mode so I'm not sure about the extra load this would create.</div><div><br></div><div>I need to store the REGISTERs in both Kamailio and Freeswitch. &nbsp;I rewrite the Contact before forwarding to Freeswitch so that it sends INVITEs back to Kamailio which can get to the endpoints. &nbsp;I can't use Path as I need the domain in the RURI.</div><div><br></div><div>I forward SUBSCRIBEs to Freeswitch with the Contact rewritten to point to the registered user in Kamailio. &nbsp;Freeswitch then sends NOTIFYs to Kamailio which can get to the endpoints.</div><div><br></div><div>I'm completely open to input on how I might improve this setup or flaws in my logic but it at least works :-)</div><div><br></div><div>Thanks,</div><div>Spencer</div><div><br></div><div><br><div><br><div><div>On Aug 17, 2012, at 8:04 AM, SamyGo wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div><br></div><div>You kind of sound a little different here. Are you saying that the REGISTRATIONs will be handled by Freeswitch but store the registration Data in Kamailio "location" table !?&nbsp;</div><div><br>
</div><div>Just go through the Kamailio blog by-Miconda or <a href="http://kb.asipto.com/">kb.asipto.com</a> specially the one on integrating the Asterisk Realtime with kamailio, In that articular configuration file Kamailio Forwards/relays the Registration attempts to the Media-Server (FreeSwitch in your case).&nbsp;</div>
<div><br></div><div>That will get your NAT thing handled atleast. Next thing is , if I'm right about your requirement, saving of Authenticated users in the Kamailio locations table and I'm not very sure about how to do this.</div>
<div><br></div><div><br></div><div>BR</div><div>Sammy</div><div><br></div><div><br><div class="gmail_quote">On Fri, Aug 17, 2012 at 1:59 AM, Spencer Thomason <span dir="ltr">&lt;<a href="mailto:spencer@5ninesolutions.com" target="_blank">spencer@5ninesolutions.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
I'd like to use Kamailio in from of FreeSWITCH to handle NAT traversal. &nbsp;Is there a way I can allow freeswitch to handle all auth but store the registration in usrloc as I need to send an options ping to the endpoints?<br>

<br>
My thought is something like this:<br>
<br>
natted endpoint -&gt; kamailio -&gt; freeswitch<br>
If the response is 200OK, save the registration.<br>
<br>
Thanks,<br>
Spencer<br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br></div>
_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br><a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></blockquote></div><br></div></div></body></html>