Bypass media

Hi guys, so we are close now to releasing our hosted fusion setup, idea is this we have a few cloud servers running multi tenant fusionpbx systems, all ok so far we estimate to put about 20 - 30 customers per pbx with apporx 10 - 20 handsets per customer, however i would like to keep the rtp streams on the customers own lans and only use fusion for signalling, i presume most functions will work ok, ie transfer, voicemail access and call forwards and groups etc, i understand things like call recording wont work which is fine as if they require call recording we will offer an on site setup to capture the rtp. Now the question is how do i get fusionpbx to bypass the rtp when it can ? is it the inbound-bypass-media in sip profile i need to set ? also what other consequences could this have for the users as things like blf should be fine etc etc.. PS we will be using ASTPP as the gateways for billing etc... proxy works fine on astpp so far..
thanks in advance
K
 
Not sure but I don't think any media services will work if you use inbound-bypass-media. So voicemail, call recording etc. You can proxy rtp for being able to do that but it defeats the purpose of direct media.
 
Hmm i see your point, its a pity that you cant bypass the media until you need MOH or VM etc then it redirect back via the switch, that could take like 80% of the load of a switch, mind you i think our hosted server with the above users shoudl cope fine it was just an idea for testing..

Thanks
 
If you are running a hosted platform in the cloud and all of a client's phones are behind the same public NAT, you can turn on bypass_media with this dialplan step. It will check the IP's of leg_a and leg_b. If they match, then the feature is enabled. You need to test and may have to tweak it according to your environment. MoH may have issues. I can't remember the exact behavior.

Code:
<extension name="local_bypass_media" continue="true" uuid="279f0212-23ab-4a8b-b5ca-370ace75406e">
    <condition field="${call_direction}" expression="^local$">
        <action application="set" data="called_contact=${sofia_contact(*/${destination_number}@${domain_name})}" inline="true"/>
        <action application="set" data="calling_contact=${sofia_contact(*/${caller_id_number}@${domain_name})}" inline="true"/>
    </condition>
     <condition field="${calling_contact}" expression="^.*sofia.*sofia.*$" break="on-true"/>     <condition field="${called_contact}" expression="^.*sofia.*sofia.*$" break="on-true"/>    <condition field="${called_contact}" expression="^.*sip:.*@(\b(?:\d{1,3}\.){3}\d{1,3}\b)" break="never">
        <action application="set" data="called_contact_ip=$1" inline="true"/>
        <anti-action application="set" data="called_contact_ip=unknown" inline="true"/>
    </condition>
    <condition field="${calling_contact}" expression="^.*sip:.*@(\b(?:\d{1,3}\.){3}\d{1,3}\b)" break="never">
        <action application="set" data="calling_contact_ip=$1" inline="true"/>
        <anti-action application="set" data="calling_contact_ip=unknown" inline="true"/>
    </condition>
    <condition field="${called_contact}" expression="^.*fs_path=sip%3A\d+%40((?:\d{1,3}\.){3}\d{1,3})%" break="never">
        <action application="set" data="called_contact_ip=$1" inline="true"/>
    </condition>
    <condition field="${calling_contact}" expression="^.*fs_path=sip%3A\d+%40((?:\d{1,3}\.){3}\d{1,3})%" break="never">
        <action application="set" data="calling_contact_ip=$1" inline="true"/>
    </condition>
    <condition field="${called_contact_ip}" expression="^${calling_contact_ip}$">
        <action application="set" data="bypass_media_after_bridge=true"/>
        <action application="set" data="bypass_media_resume_on_hold=true"/>
        <action application="set" data="bypass_media_after_hold=true"/>
        <action application="set" data="api_on_answer=uuid_debug_media"/>
        <action application="set" data="rtp_manual_rtp_bugs=ALWAYS_AUTO_ADJUST"/>
    </condition>
</extension>