[Freeswitch-users] Codec problem, Freeswitch does not regard absolute_codec_string?

Rahman Duran rahman.duran at erzurum.edu.tr
Mon Oct 25 06:52:59 UTC 2021


Hi,

I am struggling tuning Freeswitch for late codec negotiation. Here is local
profile settings:

<param name="inbound-late-negotiation" value="true"/>
<param name="inbound-codec-prefs" value="G722,PCMA"/>
<param name="outbound-codec-prefs" value="G722,PCMA"/>
<param name="inbound-codec-negotiation" value="greedy"/>

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.

Here is the local dial plan config where I bridge calls:

    <extension name="local_accounts_freeswitch">
      <condition regex="all">
        <regex field="destination_number" expression="^[0-9]{4}$"/>
        <regex field="${local_user_exists}"
expression="^true$|^TRUE$|^True$"/>
        <regex field="${santral_kontrol}" expression="^freeswitch$"/>
        <action application="set" inline="true"
data="call_pickup_group=${user_data(${destination_number}@${domain_name}
var call_pickup_group)}"/>
        <action application="hash"
data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/>
        <action application="hash"
data="insert/${domain_name}-group_pickup_last_uuid/${call_pickup_group}/${uuid}"/>
        <action application="hash"
data="insert/${domain_name}-pickup_last_uuid/${destination_number}/${uuid}"/>
        <action application="log" data="ep_codec_string --
${ep_codec_string}" />
        <action application="set" data="inherit_codec=true"/>
        <action application="export"
data="nolocal:absolute_codec_string='${ep_codec_string}'"/>
        <action application="set_profile_var"
data="callee_id_name=${user_data(${destination_number}@${domain_name} var
effective_caller_id_name)}"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="continue_on_fail=true"/>
        <action application="set" data="call_timeout=30"/>
        <action application="set" data="execute_on_answer=sched_hangup
+21600 alloted_timeout" />
        <action application="bridge"
data="{origination_callee_id_name=${user_data(${destination_number}@${domain_name}
var effective_caller_id_name)}}user/${destination_number}@${domain_name}"/>
        <action application="execute_extension"
data="hata-${originate_disposition} XML hata_anonslari"/>
      </condition>
    </extension>

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:
https://pastebin.freeswitch.org/view/b2978e79 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.

Why does Freeswitch only send G722? How can I fix this? What am I doing
wrong?

P.S. using debian packages: FreeSWITCH Version
1.10.6-release-18-1ff9d0a60e~64bit (-release-18-1ff9d0a60e 64bit)

Regards,

Rahman Duran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20211025/7785fb23/attachment-0003.html>


More information about the FreeSWITCH-users mailing list