<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">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.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Nov 2021 at 15:06, Martin Paterson <<a href="mailto:martin@pattersong.co.uk" target="_blank">martin@pattersong.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">David is right, the hangup cause for the a-leg is ORIGINATOR_CANCEL<br>
because that's what actually happened to the a-leg. However the CDR<br>
for the b-leg will show the hangup cause that you expect. I think by<br>
default b-leg CDRs aren't generated, but you can turn them on in<br>
config.<br>
<br>
Martin.<br>
<br>
Martin Paterson, Pattersong Music<br>
Reduced orchestrations of G&S<br>
<br>
On Sat, 6 Nov 2021 at 02:02, David Villasmil<br>
<<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>> wrote:<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></blockquote></div><div><br></div><div dir="ltr"></div>
</div>