<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 "assuming default for this example"</div><div><br></div><div><div><extension name="lock_codec"> </div><div><span style="white-space:pre"> </span><condition field="destination_number" expression="^lock_codec$"></div><div> <action application="set" data="absolute_codec_string=${rtp_use_codec_name}"/></div><div><span style="white-space:pre"> </span></condition></div><div></extension></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><action application="set" data="execute_on_answer=execute_extension lock_codec XML default"/><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 "export" 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"><<a href="mailto:giggsey@gmail.com" target="_blank">giggsey@gmail.com</a>></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, <<a href="mailto:sebastian_ml@gmx.net" target="_blank">sebastian_ml@gmx.net</a>> 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">
<snip><br class="m_3426128373464260232gmail_msg">
<br class="m_3426128373464260232gmail_msg">
> It's probably not the smartest move for the phone to renegotiate codecs<br class="m_3426128373464260232gmail_msg">
> at this point. But I think FS should be able to deal with it (without<br class="m_3426128373464260232gmail_msg">
> simply falling back to transcoding). I've tried if putting<br class="m_3426128373464260232gmail_msg">
> "disable-transcoding" into the profiles changes anything, but it didn't.<br class="m_3426128373464260232gmail_msg">
> "renegotiate-codec-on-hold" and "renegotiate-codec-on-<wbr>reinvite" are gone<br class="m_3426128373464260232gmail_msg">
> since FS 1.6.10 so I can't try those. I read something about<br class="m_3426128373464260232gmail_msg">
> "indicate_hold" which probably means that FS will send a reINVITE on the<br class="m_3426128373464260232gmail_msg">
> 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's offer and<br class="m_3426128373464260232gmail_msg">
use transcoding to make the bridge work. It's not what I would like to<br class="m_3426128373464260232gmail_msg">
happen, but that'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, "case closed".<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>