<div dir="ltr">Hi,<div><br></div><div>I am struggling tuning Freeswitch for late codec negotiation. Here is local profile settings:</div><div><br></div><div><param name="inbound-late-negotiation" value="true"/><br><param name="inbound-codec-prefs" value="G722,PCMA"/><br><param name="outbound-codec-prefs" value="G722,PCMA"/><br><param name="inbound-codec-negotiation" value="greedy"/><br></div><div><br></div><div>As you see I enabled late-negotiation and set codecs prefs to allow G722 and PCMA. My goal is to use G722 if both sides support it and fall back to PCMA if G722 is not an option for A leg or B leg.</div><div><br></div><div>Here is the local dial plan config where I bridge calls:</div><div><br></div><div>    <extension name="local_accounts_freeswitch"><br>      <condition regex="all"><br>        <regex field="destination_number" expression="^[0-9]{4}$"/><br>        <regex field="${local_user_exists}" expression="^true$|^TRUE$|^True$"/><br>        <regex field="${santral_kontrol}" expression="^freeswitch$"/><br>        <action application="set" inline="true" data="call_pickup_group=${user_data(${destination_number}@${domain_name} var call_pickup_group)}"/><br>        <action application="hash" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/><br>        <action application="hash" data="insert/${domain_name}-group_pickup_last_uuid/${call_pickup_group}/${uuid}"/><br>        <action application="hash" data="insert/${domain_name}-pickup_last_uuid/${destination_number}/${uuid}"/><br>        <action application="log" data="ep_codec_string -- ${ep_codec_string}" /><br>        <action application="set" data="inherit_codec=true"/><br>        <action application="export" data="nolocal:absolute_codec_string='${ep_codec_string}'"/><br>        <action application="set_profile_var" data="callee_id_name=${user_data(${destination_number}@${domain_name} var effective_caller_id_name)}"/><br>        <action application="set" data="hangup_after_bridge=true"/><br>        <action application="set" data="continue_on_fail=true"/><br>        <action application="set" data="call_timeout=30"/><br>        <action application="set" data="execute_on_answer=sched_hangup +21600 alloted_timeout" /><br>        <action application="bridge" data="{origination_callee_id_name=${user_data(${destination_number}@${domain_name} var effective_caller_id_name)}}user/${destination_number}@${domain_name}"/><br>        <action application="execute_extension" data="hata-${originate_disposition} XML hata_anonslari"/><br>      </condition><br>    </extension><br></div><div><br></div><div>So I export absolute_codec_string to B leg using ep_codec_string. When I test a call from 2730->2110, the call fails with "incompetible_destination".  Call logs here: <a href="https://pastebin.freeswitch.org/view/b2978e79" target="_blank">https://pastebin.freeswitch.org/view/b2978e79</a> The 2730 is a Cisco phone with "G722,PCMU,PCMA,G729,L16,iLBC" codec support. The 2110 is a Samsung phone that only supports "PCMA,PCMU,G729" codecs. As you see cisco invites with all codecs it supports and freeswitch sets absolute_codec_string with "G722,PCMA" as expected from the config. But as you see in the call logs Freeswitch only sends "G722" in SDP to Samsung phone so Samsung rejects the call.</div><div><br></div><div>Why does Freeswitch only send G722? How can I fix this? What am I doing wrong?</div><div><br></div><div>P.S. using debian packages: FreeSWITCH Version 1.10.6-release-18-1ff9d0a60e~64bit (-release-18-1ff9d0a60e 64bit)</div><div><br></div><div>Regards,</div><div><br></div><div>Rahman Duran</div></div>