Digium GUI extensions.conf CallerID overwrites

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

Contact Synology for support; they made the decision to supply code for which support ended several years ago, so they should take on the support responsibility.

Hi Ralf,

facing the same issue, I wonder, did you get anywhere with Synology support?

Cheers
Stefan

@david55:
The issue is not so much a Synology issue as it has an Asterisk ticket: issues.asterisk.org/jira/browse/AGUI-302

@ralf:
This one should get you going for (now at least). The next package update will overwrite this file (most likely). So keep it in a safe place

Cheers,
Stefan

It’s a Synology problem because they chose to use unsupported, end of life, software, so they took on support responsibility.

I got an similar issue with:

this code will deleted every time I’m logging in the gui.
gui was downloaded from:
downloads.asterisk.org/pub/telephony/asterisk-gui/releases/asterisk-gui-2.0.4.tar.gz

Is there any posibility to fix this?

the tempalte can be found in: js/pbx.js about at line 100:

check_For_Contexts[ 'macro-' + ASTGUI.contexts.dialtrunks ] = [                                                          
 // "; Macro by =  Brandon Kruse, Matthew O'Gorman 
// & Erin Spiceland <espiceland@digium.com>",                    
 'exten=s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1)',                                                                                                                        
 'exten=s,n,SipAddHeader(P-Preferred-Identity: sip:${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(nu
 'exten=s,n,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} >1]?1 setgbobname,1)',                                    
 'exten=s,n,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)})',           
 'exten=s,n,Set(CALLERID(all)=${IF($[${LEN(${ARG5})} > 2]?${ARG5}:)})',                                           
 '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}:)})',                                           
 'exten=s,n,Goto(1-dial,1)',                                                                                      
 'exten=1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME})',                                           
 'exten=1-setgbobname,n,Goto(s,3)',                                                                               
 'exten=1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM})',                                                             
 'exten=1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME})',                                                           
'exten=1-fmsetcid,n,Goto(s,4)',                                                                                  
 'exten=1-dial,1,Dial(${ARG1})',                                                                                  
'exten=1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1)',                                         
 'exten=1-CHANUNAVAIL,1,Dial(${ARG2})',                                                                           
 'exten=1-CHANUNAVAIL,n,Hangup()',                                                                                
 'exten=1-CONGESTION,1,Dial(${ARG2})',                                                                            
'exten=1-CONGESTION,n,Hangup()',                                                                                 
 'exten=1-out,1,Hangup()'                                                                                         
                                ]; 

Its annoying that Synology won’t update their package to something reasonably recent (or clean out the insane amount of junk code in the configs), but I’ve found that this can be worked around by setting the CallerID fields in the Outgoing Calling Rules settings.