Restrict extension to internal calls only

Hello all, not sure if this is the correct place to ask this…

I have an extension we are trying to restrict to only be able to dial internal extensions only as it will be in a public lobby. Is this possible? How/where could I accomplish this?

Also would it be possible to have said extension, automatically dial an extension when the handset is picked up?

Any information would be greatly appreciated,

Thank you


The answer to your first question is yes - see:
How to give a particular extension different or restricted trunk access for outgoing calls

As for your second question, that would depend on the type of extension and how it is connected to server. Usually if there is a “dial plan” associated with the phone or device, there is a way to set up a “hot line” service. It can definitely be done if the extension is plugged into a Linksys or Sipura adapter but since you didn’t mention the type of phone (regular PSTN type or SIP) and how it’s connecting (make and model of adapter, if any) we can’t really give you specific information.

To accomplish the first task, making it dial only internal extensions, you can do something like this.

Create a new context like from-lobby and put the phone in that context. Then add this context to the bottom of the extensions_custom.conf file and write some code that looks like this.


exten => 911,1,goto(from-internal,911,1)
;this will match all 4 digit extens starting with 2
exten => _2XXX,1,goto(from-internal,${EXTEN},1)
; hangup all other calls
exten => _.,1,hangup()

To make it auto dial, you will have to set the phone to dial immediately and change your context in extensions_custom.conf to look like this.


exten => s,1,goto(from-internal,2000,1) ; where 2000 is the operator’s extension #