You may have replied here before you saw my last email, but definitely go read the codec negotiation page on the wiki. There you will find out whether or not you need "inherit_codec" or something else. It all depends on exactly what you are trying to accomplish.<div>
<br></div><div>-MC<br><br><div class="gmail_quote">On Fri, Jun 3, 2011 at 12:41 PM, 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 lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Hi Steven,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal">
<span style="font-size:11.0pt;color:#1F497D">Thanks for your input, in that case you are right – I need to do late-negotiation.</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">I have already tried to work with late-negotiation, but I was failed probably because I still not understand enough about configuring this in right way…</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">As far as I do understand, I should:</span></p><p><span style="font-size:11.0pt;color:#1F497D"><span>1.<span style="font:7.0pt "Times New Roman""> </span></span></span><span dir="LTR"></span><span style="font-size:11.0pt;color:#1F497D">Configure (</span><param name="inbound-late-negotiation" value="true"/><span style="font-size:11.0pt;color:#1F497D">) on my external profile. This is clear for me.</span></p>
<p><span style="font-size:11.0pt;color:#1F497D"><span>2.<span style="font:7.0pt "Times New Roman""> </span></span></span><span dir="LTR"></span><span style="font-size:11.0pt;color:#1F497D">Is there any limitation for ("inbound-codec-negotiation" value) in that case?</span></p>
<p><span style="font-size:11.0pt;color:#1F497D"><span>3.<span style="font:7.0pt "Times New Roman""> </span></span></span><span dir="LTR"></span><span style="font-size:11.0pt;color:#1F497D">Configure (</span><action application="set" data="inherit_codec=true"/><span style="font-size:11.0pt;color:#1F497D">) in dialplan. This is not clear… Where in dialpan? On A leg (before “transfer” DID) or on B leg (in general part before “bridge”)? </span></p>
<p><span style="font-size:11.0pt;color:#1F497D"><span>4.<span style="font:7.0pt "Times New Roman""> </span></span></span><span dir="LTR"></span><span style="font-size:11.0pt;color:#1F497D">Is this enough, or I should use also additional settings in dialplan (Maybe: </span><action application="export" data="codec_string=${ep_codec_string}"/><span style="font-size:11.0pt;color:#1F497D">)? Where?</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Thanks,</span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Dmitry.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D"> </span></p><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt">From:</span></b><span style="font-size:10.0pt"> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Steven Ayre<br>
<b>Sent:</b> 03 Jun 2011 22:09<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> Re: [Freeswitch-users] Codec enforcment from dialplan?</span></p></div><p class="MsoNormal"> </p><p class="MsoNormal" style="margin-bottom:12.0pt">
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></p><div><div></div><div class="h5"><div><p class="MsoNormal">On 3 June 2011 18:49, Dmitry Saratsky <<a href="mailto:freeswitch@simpot.com" target="_blank">freeswitch@simpot.com</a>> wrote:</p>
<div><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"> </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><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>
FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">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></p>
</div><p class="MsoNormal"> </p></div></div></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>