Custom context

I just took the plunge and switched from TrixBox to FreePBX 5.211.65-13

So far, everything has gone smoothly, with one tiny exception.

I have a doorphone on my back gate. When the user presses the button, it goes off hook. The extension is configured to immediately go to a custom context. The one I had in TrixBox:

[from-gate] exten => s,1,Goto(ext-group,2200,1)

worked fine.

On FreePBX, I’ve tried all sorts of permutations in the custom context editor, however, typing in the dial rules:


results in (in extensions_additional.conf):

[from-gate] include => from-gate_bad-number include => bad-number exten => _s,1,Goto(ext-group,2200,1),1,Goto(from-gate_rulematch,${EXTEN},1)

exten => s,1,Macro(hangupcall,)

exten => h,1,Macro(hangupcall,)

;–== end of [from-gate] ==–;

include => from-gate_bad-number
include => bad-number
exten => s,1,Macro(hangupcall,)

exten => h,1,Macro(hangupcall,)

;–== end of [from-gate_rulematch] ==–;


;–== end of [from-gate_bad-number] ==–;

When I hit the button on the doorphone, I just get a busy tone.

If I replace the context with the one from my TrixBox installation, hitting the button on the doorphone rings the members of the ring group but, when I hangup, the doorphone goes to a busy tone instead of hanging up.

Any suggestions would be appreciated.

In the old system there was probably a trunk or an extension for the doorphone in the “from-gate” context.

What is a custom context editor?

The gate extension was on a ZAP channel (now DAHDI). Its context was set to from-gate (as opposed to from-internal).

The custom context editor is under Connectivity > Custom Contexts.

You must have installed that. Custom context has not been officially supported for several versions. It’s functionality is in other modules.

I don’t see what you would need the custom context module for.

No, I did not manually install that. The only reason that this component is there is because it was installed automatically when I installed FreePBX. If it is unsupported, someone might want to tell the packagers.
However, it’s presence is irrelevant.
I have an Algo 3007 control unit that worked just fine with TrixBox. Now it doesn’t. Everything is fine until I hang up the call. At that point, Asterisk reports that it has entered the hangup macro and then that it has hung up the door phone, however, at the door phone, rather than silence, I get a ‘number unavailable’ or ‘busy’ tone.