Time Condition feature code/password

Using Freepbx 2.11 I am using time conditions to determine when to route to our receptionist and when to route to an ivr. I also have set up a day/night toggle for the receptionist to use as an override to send calls to ivr. I have set up BLF’s on the receptionists phone so that she can see the status of the time condition checks and the day/night override. This all works fine. The problem that I’ve run into is that it seems that the feature code for the time conditions needs to be enabled for the BLF hints to be generated. This means anyone in the company can dial the feature code and accidentally(or maliciously I suppose) toggle the time condition. The day/night toggles have a password associated. I am trying to figure out a way to either require a password for time condition toggles and/or disable the toggle entirely without breaking the BLF.

Also, is there an easy way to change the feature code that is auto generated for the time conditions? We have internal users that have extensions in that range. Having a feature code the same as the extension causes issues if the receptionist tries to transfer directly to someone’s voicemail using *.

Thank you for any guidance.

Passwords for time conditions exists in 12 so you’ll need to upgrade

Thank you for the heads up. I figured out the answer to my boneheaded question about the feature code. Since we aren’t ready to upgrade yet, I was trying to work on a quick fix to just get rid of the toggling functionality. From the dial plan, here is the code in question:

[timeconditions-toggles]
include => timeconditions-toggles-custom
exten => *9271,1,Macro(user-callerid,)
exten => *9271,n,Macro(toggle-tc,1)
exten => *9271,n,Hangup
exten => *9271,hint,Custom:TC1

I tried adding this code into extensions_custom.conf

[timeconditions-toggles-custom]
exten => *9271,1,Macro(user-callerid,)
exten => *9271,n,Hangup
exten => *9271,hint,Custom:TC1

basically just removing the toggle. However, the sort order of the dial plan still uses the code from [timeconditions-toggles] instead of the custom code:

APFDEV*CLI> dialplan show *[email protected]
[ Included context ‘timeconditions-toggles’ created by ‘pbx_config’ ]
’*9271’ => hint: Custom:TC1 [pbx_config]
1. Macro(user-callerid,) [pbx_config]
2. Macro(toggle-tc,1) [pbx_config]
3. Hangup() [pbx_config]
[ Included context ‘timeconditions-toggles-custom’ created by ‘pbx_config’ ]
’*9271’ => hint: Custom:TC1 [pbx_config]
1. Macro(user-callerid,) [pbx_config]
2. noop(Entering user defined context, ${CONTEXT} defined in extensions_override_freepbx.conf) [pbx_config]
3. Hangup() [pbx_config]

-= 2 extensions (8 priorities) in 2 contexts. =-

I also tried moving the custom code to extensions_override_freepbx.conf. This fell victim to the same dial plan sort order issue:
APFDEV*CLI> dialplan show *[email protected]
[ Included context ‘timeconditions-toggles’ created by ‘pbx_config’ ]
’*9271’ => hint: Custom:TC1 [pbx_config]
1. Macro(user-callerid,) [pbx_config]
2. Macro(toggle-tc,1) [pbx_config]
3. Hangup() [pbx_config]
[ Included context ‘timeconditions-toggles-custom’ created by ‘pbx_config’ ]
’*9271’ => hint: Custom:TC1 [pbx_config]
1. Macro(user-callerid,) [pbx_config]
2. noop(Entering user defined context, ${CONTEXT} defined in extensions_override_freepbx.conf) [pbx_config]
3. Hangup() [pbx_config]

-= 2 extensions (8 priorities) in 2 contexts. =-

I tried naming the context to something entirely different in extensions_override_freepbx.conf also, but it still ends up being the last match in the dial plan.

Can someone help fill in the blanks for me on the dial plan sort order? I’m sure I’m probably missing something simple due to my lack of experience.

Thank you.

In case anyone is interested, I discovered my mistake was that I needed to put the context I am overriding in extensions_override_freepbx.conf instead of as an included context or a different context that matched the pattern. I’m sure this was obvious to some. Here is what I put in extensions_override_freepbx.conf:

[timeconditions-toggles]
exten => *9271,1,Macro(user-callerid,)
exten => *9271,n,noop(Entering user defined context, ${CONTEXT} defined in extensions_override_freepbx.conf)
exten => *9271,n,Hangup
exten => *9271,hint,Custom:TC1

Hopefully someone else can learn from my stumbles.

Thanks.