Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
rahman.duran at erzuru...
Guest





PostPosted: Wed Oct 27, 2021 1:43 pm    Post subject: [Freeswitch-users] Codec problem, Freeswitch does not regard Reply with quote

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
Back to top
dragos at freeswitch.org
Guest





PostPosted: Fri Oct 29, 2021 6:43 am    Post subject: [Freeswitch-users] Codec problem, Freeswitch does not regard Reply with quote

maybe the comments on this issue will help: https://github.com/signalwire/freeswitch/issues/1340 .

On Wed, Oct 27, 2021 at 8:13 PM Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
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

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
rahman.duran at erzuru...
Guest





PostPosted: Mon Nov 01, 2021 4:08 pm    Post subject: [Freeswitch-users] Codec problem, Freeswitch does not regard Reply with quote

Hi,

The problem was single quotes around ep_codec string:
<action application="export" data="nolocal:absolute_codec_string='${ep_codec_string}'"/>



Once I removed single quotes, it worked.


Regards,


Rahman


Dragos Oancea <dragos@freeswitch.org (dragos@freeswitch.org)>, 29 Eki 2021 Cum, 14:40 tarihinde şunu yazdı:

Quote:
maybe the comments on this issue will help: https://github.com/signalwire/freeswitch/issues/1340 .

On Wed, Oct 27, 2021 at 8:13 PM Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
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

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com

_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services