<div dir="ltr">you could try setting execute_on_answer variable to lock in the codec <div><div><br></div><div>Make an extension in the same context &quot;assuming default for this example&quot;</div><div><br></div><div><div>&lt;extension name=&quot;lock_codec&quot;&gt;                                                                                                                                   </div><div><span style="white-space:pre">  </span>&lt;condition field=&quot;destination_number&quot; expression=&quot;^lock_codec$&quot;&gt;</div><div>    &lt;action application=&quot;set&quot; data=&quot;absolute_codec_string=${rtp_use_codec_name}&quot;/&gt;</div><div><span style="white-space:pre">  </span>&lt;/condition&gt;</div><div>&lt;/extension&gt;</div></div><div><br></div><div><br></div><div>In your normal call processing extension add this condition before calling bridge:</div><div><br></div><div>&lt;action application=&quot;set&quot; data=&quot;execute_on_answer=execute_extension lock_codec XML default&quot;/&gt;<br></div><div><br></div><div><br></div><div>Then when the channel is answered it will execute the extension and set the absolute_codec_string to whatever codec was first negotiated, that should limit what it will choose on the re-invite.</div><div><br></div><div>You can probably set it on both legs with &quot;export&quot; instead of set or by adding it also to the {} before bridge.</div><div><br></div><div><br></div><div>







<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Dialplan: sofia/internal/<a href="mailto:1007@192.168.168.35">1007@192.168.168.35</a> Regex (PASS) [lock_codec] destination_number(lock_codec) =~ /^lock_codec$/ break=on-false</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">Dialplan: sofia/internal/<a href="mailto:1007@192.168.168.35">1007@192.168.168.35</a> Action set(absolute_codec_string=${rtp_use_codec_name}) </font></span></p>
<p class="gmail-p2"><span class="gmail-s1"><font face="monospace, monospace">2016-12-14 00:51:19.722495 [NOTICE] switch_core_session.c:2966 Execute set(absolute_codec_string=${rtp_use_codec_name})</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">EXECUTE sofia/internal/<a href="mailto:1007@192.168.168.35">1007@192.168.168.35</a> set(absolute_codec_string=PCMU)</font></span></p>
<p class="gmail-p1"><span class="gmail-s1"><font face="monospace, monospace">2016-12-14 00:51:19.722495 [DEBUG] mod_dptools.c:1562 SET sofia/internal/<a href="mailto:1007@192.168.168.35">1007@192.168.168.35</a> [absolute_codec_string]=[PCMU]</font></span></p></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 12, 2016 at 12:37 AM, Joshua Gigg <span dir="ltr">&lt;<a href="mailto:giggsey@gmail.com" target="_blank">giggsey@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I opened a JIRA on a related note earlier this year, because when you have this call recorded, and it gets switched between G711 and G722, it messes up the recording.</p><div class="HOEnZb"><div class="h5">
<br><div class="gmail_quote"><div dir="ltr">On Mon, 12 Dec 2016, 04:11 Sebastian Kemper, &lt;<a href="mailto:sebastian_ml@gmx.net" target="_blank">sebastian_ml@gmx.net</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Dec 09, 2016 at 10:47:35PM +0100, Sebastian Kemper wrote:<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
&lt;snip&gt;<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
&gt; It&#39;s probably not the smartest move for the phone to renegotiate codecs<br class="m_3426128373464260232gmail_msg">
&gt; at this point. But I think FS should be able to deal with it (without<br class="m_3426128373464260232gmail_msg">
&gt; simply falling back to transcoding). I&#39;ve tried if putting<br class="m_3426128373464260232gmail_msg">
&gt; &quot;disable-transcoding&quot; into the profiles changes anything, but it didn&#39;t.<br class="m_3426128373464260232gmail_msg">
&gt; &quot;renegotiate-codec-on-hold&quot; and &quot;renegotiate-codec-on-<wbr>reinvite&quot; are gone<br class="m_3426128373464260232gmail_msg">
&gt; since FS 1.6.10 so I can&#39;t try those. I read something about<br class="m_3426128373464260232gmail_msg">
&gt; &quot;indicate_hold&quot; which probably means that FS will send a reINVITE on the<br class="m_3426128373464260232gmail_msg">
&gt; other leg, so I might try that.<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
I thought about it some more and came to the conclusion that for a B2BUA<br class="m_3426128373464260232gmail_msg">
it does seem legit to accept the first codec in the reINVTIE&#39;s offer and<br class="m_3426128373464260232gmail_msg">
use transcoding to make the bridge work. It&#39;s not what I would like to<br class="m_3426128373464260232gmail_msg">
happen, but that&#39;s a different story :D<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
I also found a posting from 2011 which mentions this behavior:<br class="m_3426128373464260232gmail_msg">
<a href="http://lists.freeswitch.org/pipermail/freeswitch-users/2011-December/078228.html" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://lists.freeswitch.org/<wbr>pipermail/freeswitch-users/<wbr>2011-December/078228.html</a><br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
Anyway, &quot;case closed&quot;.<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
Regards,<br class="m_3426128373464260232gmail_msg">
Sebastian<br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
______________________________<wbr>______________________________<wbr>_____________<br class="m_3426128373464260232gmail_msg">
Professional FreeSWITCH Consulting Services:<br class="m_3426128373464260232gmail_msg">
<a href="mailto:consulting@freeswitch.org" class="m_3426128373464260232gmail_msg" target="_blank">consulting@freeswitch.org</a><br class="m_3426128373464260232gmail_msg">
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
Official FreeSWITCH Sites<br class="m_3426128373464260232gmail_msg">
<a href="http://www.freeswitch.org" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://www.freeswitch.org</a><br class="m_3426128373464260232gmail_msg">
<a href="http://confluence.freeswitch.org" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://confluence.freeswitch.<wbr>org</a><br class="m_3426128373464260232gmail_msg">
<a href="http://www.cluecon.com" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://www.cluecon.com</a><br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
FreeSWITCH-users mailing list<br class="m_3426128373464260232gmail_msg">
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" class="m_3426128373464260232gmail_msg" target="_blank">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br class="m_3426128373464260232gmail_msg">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br class="m_3426128373464260232gmail_msg">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br class="m_3426128373464260232gmail_msg">
<a href="http://www.freeswitch.org" rel="noreferrer" class="m_3426128373464260232gmail_msg" target="_blank">http://www.freeswitch.org</a><br class="m_3426128373464260232gmail_msg">
</blockquote></div>
</div></div><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Anthony Minessale II       ♬ @anthmfs  ♬ @FreeSWITCH  ♬<div><br><div>☞ <a href="http://freeswitch.org/" target="_blank">http://freeswitch.org/</a>  ☞ <a href="http://cluecon.com/" target="_blank">http://cluecon.com/</a>  ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank">http://twitter.com/FreeSWITCH</a></div><div><div>☞ <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch ☞ <u><a href="http://freeswitch.org/g+" target="_blank">http://freeswitch.org/g+</a></u><br><br></div><div>ClueCon Weekly Development Call <br></div><div>☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a>  ☎ +19193869900 </div><div><br></div></div></div><div><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br></div></div></div></div></div></div></div>
</div>