I configured Asterisk 1.8.13.1 with digium GUI-version 2.1.0-rc1 running on Synology DS413/DSM 5.0 and wondered why outbound calls do not show any CallerID information.
Some tracing and debugging revealed that “macro-trunkdial-failover-0.3” in extensions.conf overwrites settings for CALLERID(num) and CALLERID(all) taken from user.conf with blanks (if functions with empty else statement marked in red).
Here is the code snipplet:
[size=85]exten = s,n,Set(CALLERID(num)=${[color=#BF0040]IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:[/color])})
exten = s,n,Set(CALLERID(all)=${[color=#BF0040]IF($[${LEN(${ARG5})} > 2]?${ARG5}:)[/color]})
exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1)
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})})
exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})[/size]
I can edit this code in extensions.conf to make it work properly, but next time the GUI will be used, it will overwrite my edits with the auto-generated file like before.
My question: Is there any way to prevent the auto-generated file to contain this faulty code? Is there any kind of template that I might edit?
Any hint appreciated
Ralf