The default behaviour is to select the codec for an incoming call *before* it hits the dialplan.<br><br>To work around that you should enable late-negotiation on the sofia profile taking the incoming call. That'll delay selecting a codec until media starts for a bridge. The codec will then match the bleg if possible, and otherwise will pick the preferred codec from your lists. The alternative would be to have multiple profiles with different codec preferences on each.<br>
<br>-Steve<br><br><br><br><div class="gmail_quote">On 3 June 2011 18:49, Dmitry Saratsky <span dir="ltr"><<a href="mailto:freeswitch@simpot.com">freeswitch@simpot.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal">Hi All,</p><p class="MsoNormal"> </p><p class="MsoNormal">I have some codec-prefs in my FS configured globally for all profiles (In my case: "global_codec_prefs=G729,PCMU,PCMA,GSM"/>)</p>
<p class="MsoNormal">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 dialplan.</p>
<p class="MsoNormal">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…</p><p class="MsoNormal">
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…</p><p class="MsoNormal">
</p><p class="MsoNormal">Any ideas?</p><div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm"><p class="MsoNormal" style="border:none;padding:0cm"> </p></div><p class="MsoNormal"> </p><p class="MsoNormal">
Relevant part of profile config:</p><p class="MsoNormal"> </p><p class="MsoNormal"><profile name="providers"></p><p class="MsoNormal"> <gateways></p><p class="MsoNormal"> <X-PRE-PROCESS cmd="include" data="providers/*.xml"/></p>
<p class="MsoNormal"> </gateways></p><p class="MsoNormal"> </p><p class="MsoNormal"> <settings></p><p class="MsoNormal"> <param name="debug" value="0"/></p><p class="MsoNormal">
<param name="shutdown-on-fail" value="true"/></p>
<p class="MsoNormal"> <param name="auth-calls" value="false"/></p><p class="MsoNormal"> <param name="sip-trace" value="no"/></p><p class="MsoNormal"> <param name="disable-register" value="true"/></p>
<p class="MsoNormal"> <param name="rfc2833-pt" value="101"/></p><p class="MsoNormal"> <param name="dialplan" value="XML"/></p><p class="MsoNormal"> <param name="context" value="providers"/></p>
<p class="MsoNormal"> <param name="apply-inbound-acl" value="013SONUS-IPS"/></p><p class="MsoNormal"> <param name="hold-music" value="$${hold_music}"/></p><p class="MsoNormal">
<param name="stun-enabled" value="false"/></p><p class="MsoNormal"> <param name="stun-auto-disable" value="true"/></p><p class="MsoNormal"> <param name="manage-presence" value="false"/></p>
<p class="MsoNormal"> <param name="nonce-ttl" value="60"/></p><p class="MsoNormal"> <param name="dtmf-type" value="rfc2833"/></p><p class="MsoNormal"> <param name="dtmf-duration" value="2000"/></p>
<p class="MsoNormal"> </p><p class="MsoNormal"> <param name="rtp-timer-name" value="soft"/></p><p class="MsoNormal"> <param name="rtp-timeout-sec" value="50"/></p>
<p class="MsoNormal"> <param name="rtp-hold-timeout-sec" value="300"/></p><p class="MsoNormal"> </p><p class="MsoNormal"> <param name="sip-port" value="$${sip_port}"/></p>
<p class="MsoNormal"> </p><p class="MsoNormal"> <param name="rtp-ip" value="$${rtp_ip}"/></p><p class="MsoNormal"> <param name="sip-ip" value="$${ext_ip}"/></p><p class="MsoNormal">
</p><p class="MsoNormal"><!-- <param name="codec-prefs" value="$${global_codec_prefs}"/>--></p><p class="MsoNormal"> <param name="inbound-codec-prefs" value="PCMU,PCMA,G729"/></p>
<p class="MsoNormal"> <param name="outbound-codec-prefs" value="$${global_codec_prefs}"/></p><p class="MsoNormal"> <param name="inbound-late-negotiation" value="false"/></p>
<p class="MsoNormal"> <param name="inbound-codec-negotiation" value="greedy"/></p><p class="MsoNormal"> <param name="disable-transcoding" value="false"/></p><p class="MsoNormal">
</p><p class="MsoNormal"> </settings></p><p class="MsoNormal"></profile></p><p class="MsoNormal"> </p></div></div><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>
<br></blockquote></div><br><div style="visibility: hidden; left: -5000px; position: absolute; z-index: 9999; padding: 0px; margin-left: 0px; margin-top: 0px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 130%;" id="avg_ls_inline_popup">
</div>