<div dir="ltr">Martin,<div><br></div><div>I was looking for a way to reduce cdr vars :) 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.</div><div><br></div><div>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.</div><div><br></div><div>Regards,</div><div><br></div><div>Rahman</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Martin Paterson <<a href="mailto:martin@pattersong.co.uk">martin@pattersong.co.uk</a>>, 9 Kas 2021 Sal, 12:43 tarihinde şunu yazdı:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Rahman,<br>
<br>
CDRs don't have a mechanism like you describe, but variables do. You<br>
can put any variable into the CDR and looking back at your original<br>
post, you are doing exactly the right thing here by setting a variable<br>
(cdr_hata anonsu) with the information you require and putting it in<br>
the CDR. Your request was for a real solution - but I think you have<br>
it already.<br>
<br>
Martin.<br>
<br>
Martin Paterson, Pattersong Music<br>
Reduced orchestrations of G&S<br>
<br>
On Mon, 8 Nov 2021 at 23:20, David Villasmil<br>
<<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<br>
><br>
> I’ve never tried actually manually setting the reason after hangup, you may want to try that.<br>
><br>
> On Mon, 8 Nov 2021 at 19:03, Rahman Duran <<a href="mailto:rahman.duran@erzurum.edu.tr" target="_blank">rahman.duran@erzurum.edu.tr</a>> wrote:<br>
>><br>
>> Hi David,<br>
>><br>
>> 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?<br>
>><br>
>> Regards,<br>
>><br>
>> Rahman<br>
>><br>
>> David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>, 6 Kas 2021 Cmt, 05:07 tarihinde şunu yazdı:<br>
>>><br>
>>> 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.<br>
>>><br>
>>><br>
>>> On Sat, 6 Nov 2021 at 01:20, Rahman Duran <<a href="mailto:rahman.duran@erzurum.edu.tr" target="_blank">rahman.duran@erzurum.edu.tr</a>> wrote:<br>
>>>><br>
>>>> Hi,<br>
>>>><br>
>>>> Bump. Any hints on this?<br>
>>>><br>
>>>> Regards,<br>
>>>><br>
>>>> Rahman<br>
>>>><br>
>>>> Rahman Duran <<a href="mailto:rahman.duran@erzurum.edu.tr" target="_blank">rahman.duran@erzurum.edu.tr</a>>, 26 Eki 2021 Sal, 09:14 tarihinde şunu yazdı:<br>
>>>>><br>
>>>>> Hi,<br>
>>>>><br>
>>>>> I am using announcements for fail hungup causes like busy, no_answer etc. Here is my dial plan<br>
>>>>><br>
>>>>> <extension name="local_accounts_freeswitch"><br>
>>>>> <condition regex="all"><br>
>>>>> <regex field="destination_number" expression="^[0-9]{4}$"/><br>
>>>>> <regex field="${local_user_exists}" expression="^true$|^TRUE$|^True$"/><br>
>>>>> <regex field="${santral_kontrol}" expression="^freeswitch$"/><br>
>>>>> <action application="set" inline="true" data="call_pickup_group=${user_data(${destination_number}@${domain_name} var call_pickup_group)}"/><br>
>>>>> <action application="hash" data="insert/${domain_name}-last_dial/${caller_id_number}/${destination_number}"/><br>
>>>>> <action application="hash" data="insert/${domain_name}-group_pickup_last_uuid/${call_pickup_group}/${uuid}"/><br>
>>>>> <action application="hash" data="insert/${domain_name}-pickup_last_uuid/${destination_number}/${uuid}"/><br>
>>>>> <action application="log" data="ep_codec_string -- ${ep_codec_string}" /><br>
>>>>> <action application="set" data="inherit_codec=true"/><br>
>>>>> <action application="export" data="nolocal:absolute_codec_string=${ep_codec_string}"/><br>
>>>>> <action application="set_profile_var" data="callee_id_name=${user_data(${destination_number}@${domain_name} var effective_caller_id_name)}"/><br>
>>>>> <action application="set" data="hangup_after_bridge=true"/><br>
>>>>> <action application="set" data="continue_on_fail=true"/><br>
>>>>> <action application="set" data="call_timeout=30"/><br>
>>>>> <action application="set" data="execute_on_answer=sched_hangup +21600 alloted_timeout" /><br>
>>>>> <action application="bridge" data="{origination_callee_id_name=${user_data(${destination_number}@${domain_name} var effective_caller_id_name)}}user/${destination_number}@${domain_name}"/><br>
>>>>> <action application="execute_extension" data="hata-${originate_disposition} XML hata_anonslari"/><br>
>>>>> </condition><br>
>>>>> </extension><br>
>>>>><br>
>>>>> And here is announcements context that I handle hangup causes:<br>
>>>>><br>
>>>>> <include><br>
>>>>> <!-- Burada iç çağrılarda alınan hata durumlarının anonsları işlenecek.<br>
>>>>> --><br>
>>>>> <context name="hata_anonslari"><br>
>>>>> <!-- yerel dahili --><br>
>>>>> <extension name="error-causes-user_busy"><br>
>>>>> <condition field="destination_number" expression="^hata-USER_BUSY$"><br>
>>>>> <action application="export" data="cdr_hata_anonsu=USER_BUSY"/><br>
>>>>> <action application="pre_answer"/><br>
>>>>> <action application="playback" data="$${anons_dosya_yolu}/user_busy.wav"/><br>
>>>>> <action application="sleep" data="1000"/><br>
>>>>> <action application="hangup" data="${originate_disposition}"/><br>
>>>>> </condition><br>
>>>>> </extension><br>
>>>>> <extension name="error-causes-no_answer"><br>
>>>>> <condition field="destination_number" expression="^hata-NO_ANSWER$"><br>
>>>>> <action application="export" data="cdr_hata_anonsu=NO_ANSWER"/><br>
>>>>> <action application="pre_answer"/><br>
>>>>> <action application="playback" data="$${anons_dosya_yolu}/no_answer.wav"/><br>
>>>>> <action application="sleep" data="1000"/><br>
>>>>> <action application="hangup" data="${originate_disposition}"/><br>
>>>>> </condition><br>
>>>>> </extension><br>
>>>>> <extension name="error-causes-user_not_registered"><br>
>>>>> <condition field="destination_number" expression="^hata-USER_NOT_REGISTERED$"><br>
>>>>> <action application="export" data="cdr_hata_anonsu=USER_NOT_REGISTERED"/><br>
>>>>> <action application="pre_answer"/><br>
>>>>> <action application="playback" data="$${anons_dosya_yolu}/user_not_registered.wav"/><br>
>>>>> <action application="sleep" data="1000"/><br>
>>>>> <action application="hangup" data="${originate_disposition}"/><br>
>>>>> </condition><br>
>>>>> </extension><br>
>>>>> <extension name="error-causes-any"><br>
>>>>> <condition field="destination_number" expression="^hata-(.*)$"><br>
>>>>> <action application="export" data="cdr_hata_anonsu=${originate_disposition}"/><br>
>>>>> <action application="hangup" data="${originate_disposition}"/><br>
>>>>> </condition><br>
>>>>> </extension><br>
>>>>> <!-- context hata_anonslari sonu --><br>
>>>>> </context><br>
>>>>> </include><br>
>>>>><br>
>>>>><br>
>>>>> 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.<br>
>>>>><br>
>>>>> Regards,<br>
>>>>><br>
>>>>> Rahman Duran<br>
>>>><br>
>>>> _________________________________________________________________________<br>
>>>><br>
>>>> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
>>>> Build your next product on our scalable cloud platform.<br>
>>>><br>
>>>> Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
>>>><br>
>>>> Professional FreeSWITCH Services<br>
>>>> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
>>>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
>>>><br>
>>>> Official FreeSWITCH Sites<br>
>>>> <a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
>>>> <a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
>>>> <a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
>>>><br>
>>>> FreeSWITCH-users mailing list<br>
>>>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
>>><br>
>>> --<br>
>>> Regards,<br>
>>><br>
>>> David Villasmil<br>
>>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>>> phone: +34669448337<br>
>>> _________________________________________________________________________<br>
>>><br>
>>> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
>>> Build your next product on our scalable cloud platform.<br>
>>><br>
>>> Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
>>><br>
>>> Professional FreeSWITCH Services<br>
>>> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
>>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
>>><br>
>>> Official FreeSWITCH Sites<br>
>>> <a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
>>> <a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
>>> <a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
>>><br>
>>> FreeSWITCH-users mailing list<br>
>>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
>>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
>><br>
>> _________________________________________________________________________<br>
>><br>
>> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
>> Build your next product on our scalable cloud platform.<br>
>><br>
>> Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
>><br>
>> Professional FreeSWITCH Services<br>
>> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
>><br>
>> Official FreeSWITCH Sites<br>
>> <a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
>> <a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
>> <a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
>><br>
>> FreeSWITCH-users mailing list<br>
>> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
>> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
>> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
>> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
><br>
> --<br>
> Regards,<br>
><br>
> David Villasmil<br>
> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
> phone: +34669448337<br>
> _________________________________________________________________________<br>
><br>
> The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
> Build your next product on our scalable cloud platform.<br>
><br>
> Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
><br>
> Professional FreeSWITCH Services<br>
> <a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
><br>
> Official FreeSWITCH Sites<br>
> <a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
> <a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
> <a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
><br>
> FreeSWITCH-users mailing list<br>
> <a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>