I wanted to create a hook that runs after call ends in extensions_custom.conf with Config Edit Module like describe here:
How to run the script after the call ends?
But I run into exactly the same problem as the user of that linked thread no matter what hook I try I get a warning messages like this:
WARNING pbx.c: Unable to register extension 's' priority 1 in 'macro-dialout-one-predial-hook', already in use
So I grepped all config files in /etc/asterisk for ‘macro-dialout-one-predial-hook’ but the only 2 files I have found this is my extensions_custom.conf and extensions.conf. So I checked extensions.conf and it has for all hooks empty macros like this:
[macro-dialout-one-predial-hook] exten => s,1,MacroExit()
Obviously this is conflicting with extensions_custom.conf where I have:
[macro-dialout-one-predial-hook] exten => s,1,Noop(Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf) exten => s,n,Set(CHANNEL(hangup_handler_push)=marc-do-this-on-hangup,s,1) exten => s,n,MacroExit [marc-do-this-on-hangup] exten => s,1,Noop(Entering user defined context marc-do-this-on-hangup in extensions_custom.conf) ; additional lines exten => s,n,Return
So the instructions given in https://community.freepbx.org/t/hooking-for-fun-and-income/57718/23 don’t seem to work anymore on recent releases of PBX Distro. Any ideas on how to solve this issue of conflicting dummy macros from extensions.conf with the ones from extensions_custom.conf?