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
martin at pattersong.c...
Guest





PostPosted: Thu Dec 02, 2021 6:16 am    Post subject: [Freeswitch-users] Overriding hangup cause in CDR logs Reply with quote

Rahman,

If it's any consolation, I do exactly the same with the initial
destination. As soon as the call arrives, I store the
destination_number in a variable initial_destination. I also have a
history variable that gets appended to each time something interesting
happens in the dialplan. Both go in the CDR.

Martin.

Martin Paterson, Pattersong Music
Reduced orchestrations of G&S

On Tue, 9 Nov 2021 at 09:57, Rahman Duran <rahman.duran@erzurum.edu.tr> wrote:
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>, 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> 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

_________________________________________________________________________

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