[Freeswitch-users] Codec enforcment from dialplan?

Dmitry Saratsky freeswitch at simpot.com
Fri Jun 3 21:49:19 MSD 2011

Hi All,


I have some codec-prefs in my FS configured globally for all profiles (In my
case: "global_codec_prefs=G729,PCMU,PCMA,GSM"/>)

In addition, I need to provide for some specific incoming channels other
codec order (PCMU,PCMA) that destined to FS itself. I can identify those
channels by destination number of incoming call (fax service) in my

I can enforce needed codec from dialplan successfully for my outgoing
channels by using (absolute_codec_string='PCMU,PCMA'), but I'm failing to do
the same for incoming channels.

So now I'm enforcing all incoming calls from my provider to different from
global order (<param name="inbound-codec-prefs" value="PCMU,PCMA"/>),
instead of doing this for fax calls only.


Any ideas?



Relevant part of profile config:


<profile name="providers">


    <X-PRE-PROCESS cmd="include" data="providers/*.xml"/>




    <param name="debug" value="0"/>

    <param name="shutdown-on-fail" value="true"/>

    <param name="auth-calls" value="false"/>

    <param name="sip-trace" value="no"/>

    <param name="disable-register" value="true"/>

    <param name="rfc2833-pt" value="101"/>

    <param name="dialplan" value="XML"/>

    <param name="context" value="providers"/>

    <param name="apply-inbound-acl" value="013SONUS-IPS"/>

    <param name="hold-music" value="$${hold_music}"/>

    <param name="stun-enabled" value="false"/>

    <param name="stun-auto-disable" value="true"/>

    <param name="manage-presence" value="false"/>

    <param name="nonce-ttl" value="60"/>

    <param name="dtmf-type" value="rfc2833"/>

    <param name="dtmf-duration" value="2000"/>


    <param name="rtp-timer-name" value="soft"/>

    <param name="rtp-timeout-sec" value="50"/>

    <param name="rtp-hold-timeout-sec" value="300"/>


    <param name="sip-port" value="$${sip_port}"/>


    <param name="rtp-ip" value="$${rtp_ip}"/>

    <param name="sip-ip" value="$${ext_ip}"/>


<!--    <param name="codec-prefs" value="$${global_codec_prefs}"/>-->

    <param name="inbound-codec-prefs" value="PCMU,PCMA,G729"/>

    <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/>

    <param name="inbound-late-negotiation" value="false"/>

    <param name="inbound-codec-negotiation" value="greedy"/>

    <param name="disable-transcoding" value="false"/>





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110603/694282cb/attachment-0001.html 

More information about the FreeSWITCH-users mailing list