Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] Overriding hangup cause in CDR logs


 
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:49 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


Regards,


Rahman Duran
Back to top
rahman.duran at erzuru...
Guest





PostPosted: Fri Nov 05, 2021 8:35 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:

Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


Regards,


Rahman Duran

Back to top
david.villasmil.work a...
Guest





PostPosted: Fri Nov 05, 2021 9:30 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
Back to top
martin at pattersong.c...
Guest





PostPosted: Mon Nov 08, 2021 9:10 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

David is right, the hangup cause for the a-leg is ORIGINATOR_CANCEL
because that's what actually happened to the a-leg. However the CDR
for the b-leg will show the hangup cause that you expect. I think by
default b-leg CDRs aren't generated, but you can turn them on in
config.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Sat, 6 Nov 2021 at 02:02, David Villasmil
<david.villasmil.work@gmail.com> wrote:
Quote:

The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.


On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr> wrote:
Quote:

Hi,

Bump. Any hints on this?

Regards,

Rahman

Rahman Duran <rahman.duran@erzurum.edu.tr>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:
Quote:

Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan

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

And here is announcements context that I handle hangup causes:

<include>
<!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
-->
<context name="hata_anonslari">
<!-- yerel dahili -->
<extension name="error-causes-user_busy">
<condition field="destination_number" expression="^hata-USER_BUSY$">
<action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-no_answer">
<condition field="destination_number" expression="^hata-NO_ANSWER$">
<action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-user_not_registered">
<condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
<action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-any">
<condition field="destination_number" expression="^hata-(.*)$">
<action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<!-- context hata_anonslari sonu -->
</context>
</include>


The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.

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
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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337
_________________________________________________________________________

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
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
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
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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com
Back to top
gregor at infomedia.si
Guest





PostPosted: Mon Nov 08, 2021 9:43 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

If you are using xml_cdr and creating your own CDRs, you can set variable and read it later in your code and override it.


On Mon, 8 Nov 2021 at 15:06, Martin Paterson <martin@pattersong.co.uk (martin@pattersong.co.uk)> wrote:

Quote:
David is right, the hangup cause for the a-leg is ORIGINATOR_CANCEL
because that's what actually happened to the a-leg. However the CDR
for the b-leg will show the hangup cause that you expect. I think by
default b-leg CDRs aren't generated, but you can turn them on in
config.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Sat, 6 Nov 2021 at 02:02, David Villasmil
<david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)> wrote:
Quote:

The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.


On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:
Quote:

Hi,

Bump. Any hints on this?

Regards,

Rahman

Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:
Quote:

Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan

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

And here is announcements context that  I handle hangup causes:

<include>
   <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
     -->
   <context name="hata_anonslari">
     <!-- yerel dahili  -->
     <extension name="error-causes-user_busy">
       <condition field="destination_number" expression="^hata-USER_BUSY$">
         <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-no_answer">
       <condition field="destination_number" expression="^hata-NO_ANSWER$">
         <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-user_not_registered">
       <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
         <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-any">
       <condition field="destination_number" expression="^hata-(.*)$">
         <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
   <!-- context hata_anonslari sonu -->
   </context>
</include>


The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.

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

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
_________________________________________________________________________

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
rahman.duran at erzuru...
Guest





PostPosted: Mon Nov 08, 2021 1:49 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:

Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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
david.villasmil.work a...
Guest





PostPosted: Mon Nov 08, 2021 6:39 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:


Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
Back to top
martin at pattersong.c...
Guest





PostPosted: Tue Nov 09, 2021 4:40 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Rahman,

CDRs don't have a mechanism like you describe, but variables do. You
can put any variable into the CDR and looking back at your original
post, you are doing exactly the right thing here by setting a variable
(cdr_hata anonsu) with the information you require and putting it in
the CDR. Your request was for a real solution - but I think you have
it already.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Mon, 8 Nov 2021 at 23:20, David Villasmil
<david.villasmil.work@gmail.com> wrote:
Quote:

I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr> wrote:
Quote:

Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?

Regards,

Rahman

David Villasmil <david.villasmil.work@gmail.com>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:
Quote:

The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.


On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr> wrote:
Quote:

Hi,

Bump. Any hints on this?

Regards,

Rahman

Rahman Duran <rahman.duran@erzurum.edu.tr>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:
Quote:

Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan

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

And here is announcements context that I handle hangup causes:

<include>
<!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
-->
<context name="hata_anonslari">
<!-- yerel dahili -->
<extension name="error-causes-user_busy">
<condition field="destination_number" expression="^hata-USER_BUSY$">
<action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-no_answer">
<condition field="destination_number" expression="^hata-NO_ANSWER$">
<action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-user_not_registered">
<condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
<action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
<action application="pre_answer"/>
<action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
<action application="sleep" data="1000"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<extension name="error-causes-any">
<condition field="destination_number" expression="^hata-(.*)$">
<action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
<action application="hangup" data="${originate_disposition}"/>
</condition>
</extension>
<!-- context hata_anonslari sonu -->
</context>
</include>


The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.

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
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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337
_________________________________________________________________________

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
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
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
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
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
https://freeswitch.com

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com
phone: +34669448337
_________________________________________________________________________

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
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
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
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
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: Tue Nov 09, 2021 10:14 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Martin,

I was looking for a way to reduce cdr vars Smile So I can search or generate reports on the logging server with the same fields. But know I have to consider two separate fields and it does not aggregate nicely on the log server. I also export some variables for "destination_number" as it changes when I do dialplan transfers, and I want to see the original destination number and the reason it changed with exporting lots of other variables. I hopped if I find a way in the cdr template I can combine many of them too.


But I see there is no way to do what I want csv_cdr so I will focus on the log parsing side to generate accurate CDRs.


Regards,


Rahman


Martin Paterson <martin@pattersong.co.uk (martin@pattersong.co.uk)>, 9 Kas 2021 Sal, 12:43 tarihinde şunu yazdı:

Quote:
Rahman,

CDRs don't have a mechanism like you describe, but variables do. You
can put any variable into the CDR and looking back at your original
post, you are doing exactly the right thing here by setting a variable
(cdr_hata anonsu) with the information you require and putting it in
the CDR. Your request was for a real solution - but I think you have
it already.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Mon, 8 Nov 2021 at 23:20, David Villasmil
<david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)> wrote:
Quote:

I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:
Quote:

Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?

Regards,

Rahman

David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:
Quote:

The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.


On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:
Quote:

Hi,

Bump. Any hints on this?

Regards,

Rahman

Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:
Quote:

Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan

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

And here is announcements context that  I handle hangup causes:

<include>
   <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
     -->
   <context name="hata_anonslari">
     <!-- yerel dahili  -->
     <extension name="error-causes-user_busy">
       <condition field="destination_number" expression="^hata-USER_BUSY$">
         <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-no_answer">
       <condition field="destination_number" expression="^hata-NO_ANSWER$">
         <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-user_not_registered">
       <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
         <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
         <action application="pre_answer"/>
         <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
         <action application="sleep" data="1000"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
     <extension name="error-causes-any">
       <condition field="destination_number" expression="^hata-(.*)$">
         <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
         <action application="hangup" data="${originate_disposition}"/>
       </condition>
     </extension>
   <!-- context hata_anonslari sonu -->
   </context>
</include>


The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.

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

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
_________________________________________________________________________

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

--
Regards,

David Villasmil
email: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337
_________________________________________________________________________

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
rahman.duran at erzuru...
Guest





PostPosted: Tue Nov 09, 2021 10:21 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

I already tried to set hangup_cause in my "error anouncement" dialplan extension. But as A leg hangup before playback ends, Freeswitch does not execute remaining actions in the "error anouncement" dialplan extension so it does not work.

In "freeradius" configuration, I can write dynamic templates for access and accounting logs like this "%{%{Aruba-Location-Id}:-%{%{Siemens-AP-Name}:-none}}" This will evaluates first "Aruba-Location-Id" and use its value. If it is empty or not exists, then it lookup for "Siemens-AP-Name". If it is empty than it uses string "none".


I hoped for some dynamic markup language in Freeswitch csv_cdr module so I can write a template for my needs. I don't want to use xml_cdr because all I need is to key-value based cdr logs sent to syslog (graylog) and analysed there.  If this is not possible I will try to use xml_cdr but this will add more complexity and I fear I will loose cdr records is http server is down and Freeswitch continue to operate.


P.S. I already log both a and b legs so this is not about legs.
Rahman Duran








David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 9 Kas 2021 Sal, 02:46 tarihinde şunu yazdı:

Quote:
I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:


Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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




David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 9 Kas 2021 Sal, 02:46 tarihinde şunu yazdı:

Quote:
I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:


Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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
david.villasmil.work a...
Guest





PostPosted: Tue Nov 09, 2021 6:17 pm    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

You won't lose cdrs if done right. If fs can't post the CDR it can save the files locally wherever you instruct it to.try this:


<action application="set" data="hangup_after_bridge=false"/>

then do your dialplan.
at the end, AFTER the bridge, add


<action application="set" data="hangup_cause=SOMETHING_OR_OTHER"/>



let's see what happens...
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337








On Tue, Nov 9, 2021 at 3:06 PM Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
I already tried to set hangup_cause in my "error anouncement" dialplan extension. But as A leg hangup before playback ends, Freeswitch does not execute remaining actions in the "error anouncement" dialplan extension so it does not work.

In "freeradius" configuration, I can write dynamic templates for access and accounting logs like this "%{%{Aruba-Location-Id}:-%{%{Siemens-AP-Name}:-none}}" This will evaluates first "Aruba-Location-Id" and use its value. If it is empty or not exists, then it lookup for "Siemens-AP-Name". If it is empty than it uses string "none".


I hoped for some dynamic markup language in Freeswitch csv_cdr module so I can write a template for my needs. I don't want to use xml_cdr because all I need is to key-value based cdr logs sent to syslog (graylog) and analysed there.  If this is not possible I will try to use xml_cdr but this will add more complexity and I fear I will loose cdr records is http server is down and Freeswitch continue to operate.


P.S. I already log both a and b legs so this is not about legs.
Rahman Duran








David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 9 Kas 2021 Sal, 02:46 tarihinde şunu yazdı:

Quote:
I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:


Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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




David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 9 Kas 2021 Sal, 02:46 tarihinde şunu yazdı:

Quote:
I’ve never tried actually manually setting the reason after hangup, you may want to try that.

On Mon, 8 Nov 2021 at 19:03, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi David,

You are right but I don't want or need to change any freeswitch internals. All I need is to fiddle with cdr. So I wonder if the CSV CDR template has any dynamic mechanism to use on variables. For example can I say "if variable A is not empty use A, else use variable B" in the CDR template?


Regards,


Rahman


David Villasmil <david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:


Quote:
The fact is A is hanging up the call. I don’t think you can actually change this without changing FS source code to override it.



On Sat, 6 Nov 2021 at 01:20, Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)> wrote:

Quote:
Hi,

Bump. Any hints on this?


Regards,


Rahman


Rahman Duran <rahman.duran@erzurum.edu.tr (rahman.duran@erzurum.edu.tr)>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:


Quote:
Hi,

I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan


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


And here is announcements context that  I handle hangup causes:


<include>
  <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.
    -->
  <context name="hata_anonslari">
    <!-- yerel dahili  -->
    <extension name="error-causes-user_busy">
      <condition field="destination_number" expression="^hata-USER_BUSY$">
        <action application="export" data="cdr_hata_anonsu=USER_BUSY"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-no_answer">
      <condition field="destination_number" expression="^hata-NO_ANSWER$">
        <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-user_not_registered">
      <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$">
        <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/>
        <action application="pre_answer"/>
        <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/>
        <action application="sleep" data="1000"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
    <extension name="error-causes-any">
      <condition field="destination_number" expression="^hata-(.*)$">
        <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/>
        <action application="hangup" data="${originate_disposition}"/>
      </condition>
    </extension>
  <!-- context hata_anonslari sonu -->
  </context>
</include>




The problem is if the calling leg does not listen the announcement to the end and hangup, CDR logs shows "Originator Cancel" as hangup cause. As I already know the real hangup cause, how can I override the CDR hangup cause with the real one? For now I am setting another variable (cdr_hata_anonsu) and added it to CDR logs, but if possible I want to fix this with a real solution.


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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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


--
Regards,


David Villasmilemail: david.villasmil.work@gmail.com (david.villasmil.work@gmail.com)
phone: +34669448337


_________________________________________________________________________

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