Michael003
Michael003

Reputation: 442

Asterisk context configuration

I have three contexts on my asterisk configuration and I want to configure it. This is my extensions.conf with my users :

[agent]
exten => 100,1,NoOp(Communication en cours)
exten => 100,n,Dial(SIP/legende,10)
exten => 100,n,Hangup()
exten => 200,1,NoOp(Communication en cours)
exten => 200,n,Dial(SIP/malotru,10)
exten => 200,n,Hangup()

[sources]
exten => 300,1,NoOp(Communication en cours)
exten => 300,n,Dial(SIP/pepe,10)
exten => 300,n,Hangup()
exten => 400,1,NoOp(Communication en cours)
exten => 400,n,Dial(SIP/meme,10)
exten => 400,n,Hangup()

[analyste]
exten => 500,1,NoOp(Communication en cours)
exten => 500,n,Dial(SIP/cyclone,10)
exten => 500,n,Hangup()
exten => 600,1,NoOp(Communication en cours)
exten => 600,n,Dial(SIP/lafouine,10)
exten => 600,n,Hangup()

I want the users from the context "sources" not to be able to call anyone but they can receive calls from others and I want the context "analyst" only be able to call the "agents" users. Maybe we have to add regex ?

Upvotes: 0

Views: 742

Answers (1)

arheops
arheops

Reputation: 15247

If you want context not able call anything use something like that

[sources]
exten => _.,1,Answer
exten => _.,n,Playback(pbx-invalid); or put name of any sound file you want.

Incoming calls from OTHER contexts depend of that contexts, i.e incoming will work if it work now.

Upvotes: 1

Related Questions