Macro-hangupcall-custom macro-hangupcall problem

Hi,

In my FreePBX it looks like that:
/etc/asterisk/extensionextensions_additional.conf

[macro-hangupcall]
include => macro-hangupcall-custom
exten => s,1(start),GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" | "${CHANNEL}"!="${UNIQCHAN}"]?theend)
exten => s,n(delrgi),Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
exten => s,n(theend),ExecIf($["${ONETOUCH_RECFILE}"!="" & "${CDR(recordingfile)}"=""]?Set(CDR(recordingfile)=${ONETOUCH_RECFILE}))
exten => s,n,Hangup
exten => s,n,MacroExit()

/etc/asterisk/extensionextensions_custom.conf

[macro-hangupcall-custom]
exten => s,1,Noop('Hangupcall custom OK')
exten => s,n,Noop('Hangupcall custom OK')

In asterisk console:

localhost*CLI> dialplan show macro-hangupcall
[ Context 'macro-hangupcall' created by 'pbx_config' ]
  's' =>            1. GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" | "${CHANNEL}"!="${UNIQCHAN}"]?theend) [pbx_config]
     [delrgi]       2. Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})}) [pbx_config]
     [theend]       3. ExecIf($["${ONETOUCH_RECFILE}"!="" & "${CDR(recordingfile)}"=""]?Set(CDR(recordingfile)=${ONETOUCH_RECFILE})) [pbx_config]
                    4. Hangup()                                   [pbx_config]
                    5. MacroExit()                                [pbx_config]
  Include =>        'macro-hangupcall-custom'                     [pbx_config]

-= 1 extension (5 priorities) in 1 context. =-
localhost*CLI> dialplan show macro-hangupcall-custom
[ Context 'macro-hangupcall-custom' created by 'pbx_config' ]
  's' =>            1. Noop('Hangupcall custom OK')               [pbx_config]
                    2. Noop('Hangupcall custom OK')               [pbx_config]
                    3. Macro(missedcall2email)                    [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-

And now problem is that macro-hangupcall-custom will never be executed. Problem was submitted here:
https://issues.freepbx.org/browse/FREEPBX-6625

But in Philippe Lindheimer wrote:
“This is not a bug or feature request. The inclusion of those is automatic for every single context although in many cases you are correct you can’t use it practically. There are other ways to address this but it takes a deeper understanding of the dialplan, file layout and Asterisk in general.”

And im question now? Is possible to use macro-hangupcall-custom in that case? If not that’s bug! If something was crate to allow customize dialplan and it’s not work and need to override in different ways, is not BUG?

1 Like

It’s not a bug.

Thanks for answer, i lost a lot time at discovery this :frowning:

I use file extensions_override_freepbx.conf
#include /etc/asterisk/extensions_override_fop2.conf

[macro-hangupcall]
include => macro-hangupcall-custom
exten => s,1(start),GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" | "${CHANNEL}"!="${UNIQCHAN}"]?theend)
exten => s,n(delrgi),Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL} ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
exten => s,n(theend),ExecIf($["${ONETOUCH_RECFILE}"!="" & "${CDR(recordingfile)}"=""]?Set(CDR(recordingfile)=${ONETOUCH_RECFILE}))
exten => s,n,Noop('Hangupcall custom OK')
exten => s,n,Noop('Hangupcall custom OK')
exten => s,n,Noop('Hangupcall custom OK')
exten => s,n,Hangup
exten => s,n,MacroExit()
1 Like