Blocking extension to extension calls

Hi All,

How can I stop or block some extension to extension calls on the sme Asterisk Server? I need to stop my Call Centre gents from calling each other an calling some extensions. They need to only receive external or extension calls and not to call either.

Any code snippet or clue to get this done is appreciated.

Cheers to All.

This is not a complete solution but it might help. Let me know if you can’t work it out from this.

;Go to context outgoing priority 1 and dial the number entered if the caller ID is 304.

exten => _X.,1,GotoIf($["${CALLERID(num)}" = “304”]?outgoing,${EXTEN},1)

good idea. Its worked great. I finally came up with this;

exten => _X.,1,GotoIf($["${EXTEN}" = “7000”]?agentlogin)
exten => _X.,n,Congestion()
exten => _X.,n,Hangup()
exten => _X.,n(agentlogin),AgentLogin()

with that, I can restricts agent to only dial 7000 to logon to their respective queue. I am working on a more robust snippet to take care of everyone with both CallerID(num) and dialled digits. I will post updates when done.

Cheers to all.