Well, there is this API:<br><br><a href="http://wiki.freeswitch.org/wiki/Mod_commands#uuid_media">http://wiki.freeswitch.org/wiki/Mod_commands#uuid_media</a><br><br>You might be able to do something like api_on_answer on the bridge. The key for you is just doing a condition that matches when the caller and callee are in the same office. All things being equal, how do you know when the caller and callee are in the same office?<br>
<br>-MC<br><br><div class="gmail_quote">On Mon, Feb 13, 2012 at 8:59 AM, Tim St. Pierre <span dir="ltr">&lt;<a href="mailto:fs-list@communicatefreely.net">fs-list@communicatefreely.net</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>
<br>
In order to eliminate NAT issues, we have built routable tunnels to our<br>
larger customers so that their phones are on a private subnet that is<br>
routable to a private subnet at our datacenter.  Each Freeswitch system<br>
has a profile called nonat that uses an interface and address bound to<br>
this network.  The remaining customers register to the &quot;internal&quot;<br>
profile, which is bound to a public IP address.<br>
<br>
At the moment, everything works just great - no nat issues, instant<br>
failover between the primary and secondary (shared registrations in DB),<br>
but all media flows through our network.<br>
<br>
If someone in office A calls another phone in office A, I would like FS<br>
to instruct the phones to send their media direct.  The addresses and<br>
ports are all correct in this case.<br>
If someone in office A calls a phone in office B, I want Freeswitch to<br>
stay in the media path, as these two offices are not routable to each<br>
other, even though each is routable to Freeswitch.<br>
<br>
Is there a way to set up a profile (or dialplan) so that FS will bypass<br>
media only if the two endpoints are on the same subnet?   An ACL isn&#39;t<br>
really the right thing, since it would require an exponential number of<br>
ACLs.  Also, many calls go to ring groups, where several phones ring and<br>
we don&#39;t know which one will answer until it actually does (eliminating<br>
some sort of dialplan code using the rtp variables).<br>
<br>
Is this possible?<br>
<br>
<br>
<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>
</blockquote></div><br>