extensions.conf or extensions_additional.conf

lelik67's picture

Both extensions.conf or extensions_additional.conf have section [macro-outisbusy]

extensions.conf

[macro-outisbusy]
exten => s,1,Progress
exten => s,n,Playback(all-circuits-busy-now,noanswer)
exten => s,n,Playback(pls-try-call-later,noanswer)
exten => s,n,Macro(hangupcall)

and

extensions_additional.conf

[macro-outisbusy]
include => macro-outisbusy-custom
exten => s,1,Progress
exten => s,n,GotoIf($["${EMERGENCYROUTE}" = "YES"]?emergency,1)
exten => s,n,GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?intracompany,1)
exten => s,n,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => s,n,Congestion(20)
exten => s,n,Hangup
exten => intracompany,1,Playback(all-circuits-busy-now&pls-try-call-later, noanswer)
exten => intracompany,n,Congestion(20)
exten => intracompany,n,Hangup
exten => emergency,1,Playback(all-circuits-busy-now&pls-try-call-later)
exten => emergency,n,Congestion(20)
exten => emergency,n,Hangup

As a result I am getting warnings

WARNING[32729] pbx.c: Unable to register extension 's', priority 1 in 'macro-outisbusy', already in use
WARNING[32729] pbx.c: Unable to register extension 's', priority 2 in 'macro-outisbusy', already in use
WARNING[32729] pbx.c: Unable to register extension 's', priority 3 in 'macro-outisbusy', already in use
WARNING[32729] pbx.c: Unable to register extension 's', priority 4 in 'macro-outisbusy', already in use

I assume that means that section [macro-outisbusy] in extensions_additional.conf is ignored.
Which section is correct? Can they co-exist?


__________________


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

That looks like a bug.

mickecarlsson's picture

That looks like a bug. Please create a ticket for it.

extensions_additional.conf is included in the beginning of extensions.conf and the macro-outisbusy in extensions.conf will be skipped.


__________________

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)


Thanks. In a mean time from

lelik67's picture

Thanks. In a mean time from which file section [macro-outisbusy] should it be removed from extensions_additional.conf or extensions.conf?


None. It will be fixed in

mickecarlsson's picture

None. It will be fixed in the next update for framework.
It is a trivial error and the correct macro-outisbusy is used.


__________________

Mikael Carlsson
(I am off-line, tinkering with my Chevy and my radios, don't know when I will be back)


Thanks. Got it. I want to

lelik67's picture

Thanks. Got it.
I want to understand the correct approach to those situations in general though.

For example, I am reading a "How to give a particular extension different or restricted trunk access for outgoing calls" guide.
At some point author says to create a section [macro-dialout-trunk-predial-hook]
in extensions_custom.conf. But extensions.conf has [macro-dialout-trunk-predial-hook] already also. So, in this case, do I remove it from extensions.conf and put in extensions_custom.conf? Leave the two? Edit extensions.conf instead? How FreePBX will handle it? Would my changes be overwritten by FreePBX at some point?
Thanks once again for your time.


Ticket 5558 created.

miken32's picture

Ticket 5558 created.

extensions.conf will always be overwritten by FreePBX and has to be left alone. The earliest definition of a context takes precedence, so as long as your definition is first you won't have any problems.