I had a similar problem where I needed to filter inbound INVITEs based on the codec while keeping the call in bypass media mode. Here is what I did:

In SIP profile:
<param name="inbound-codec-prefs" value="PCMU"/>
<param name="outbound-codec-prefs" value="PCMU"/>
<param name="inbound-late-negotiation" value="false"/> - this is default behavior anyway
<action application="set" data="bypass_media=false"/>

In the dialplan:
<action application="set" data="bypass_media=true"/>

I understand that what you want is a bit different. I believe that in addition to the above,  you can explicitly indicate PCMU in the outbound INVITE.


On 13-07-11 02:12 PM, Phil Quesinberry wrote:
Limiting available codecs in bypass media mode

I’m wondering what the best way is to limit the available codecs when making outbound bypass-media calls to the PSTN.  The scenario is as follows:

Extension phones have HD codecs including G722 enabled for the best audio quality between extensions for internal calls.  When an outbound call is made to the PSTN, the first-choice wholesale provider we use offers (and seems to prefer) G722.  We’d rather ensure that G711 is used instead.  Despite the fact that G722 is not enabled for any of the codec prefs (I grep’ed the entire conf dir path to be sure), FS still passes along the offer of G722 from the endpoint, presumably since it’s operating in bypass-media mode.

Is there a setting to limit the codecs despite having bypass media set?  Could we work around this by getting rid of the global bypass media setting and then setting bypass-media before bridging the call?

Thanks,

Phil Quesinberry

Q Systems Engineering, Inc.

Embedded Hardware/Software Development and VoIP Business Telephone Hosting

Improve your business telephone services and save money

(410) 969-8002

http://www.qsystemsengineering.com



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org