Asterisk Amateur Needs Help with Dial-Plan

First, thank you in advance for your patience and your help.

I about 40 internal phones with three-digit extensions.

One of the phones is actually a call-panel in an elevator that is hard-coded to dial extension 100 when you press the panic button.

The extension for the elevator phone is currently set to be 397.

Since it has proven impossible to reprogram the autodial function on the elevator phone, I would like to configure the dial-plan in Asterisk to take any call made from the elevator (extension 397) to the front desk (extension 100) and send it to a different extension or even an outside number.

I do not want to change the behavior of any other extensions, only the calls from 397 to 100.

397 will still auto-dial 100 but I want to capture that and send it to extension 119 or to an outside number like “123-234-5678”

I want all other calls between all other extensions and from the in-bound routes to be left unchanged.

I just want to redirect the calls made to extension 100 from 397 to go someplace totally different as defined in Asterisk.

Can somebody please give me an actual example that I can copy and paste into Asterisk?

Thank you!!

You don’t mean extension.

The best solution is to put the device entry in the relevant channel technology configuration file, to be in a different context.

E.g. for SIP, matching device


[another internal device]

For dahdi, I think you put context= before the channel specification for the device.

For dahdi, 367 will not appear in the configuration of the device. For SIP, it is common practice to make it the device name the same as the primary outgoing extension number for the device, but is not good security practice.

Once you have the context, it is easy to have

exten => 100,1,Dial(…)

If you want to dial other numbers normally from the lift phone, add

include => fromphones

before the exten line.

You may want to avoid giving the lift phone external access.

Here is a DropBox link to the screenshot of how the elevator / lift device is setup … 8.png?dl=0

Note that the context is current set to “from-internal” I understand that you want me to change that to “from-lift” for this device.

Thank you.

I’m not familiar with any GUI, but probably yes.

Note that you should get support from the developers of your GUI, as what you can do will be constrained by their dialplan logic.