Asterisk & Self Registration Queue

Idea: make a queue of calls in which agents will register themselves. A man came to work, dialed a secret combination, “signed up,” and he is all in line and ready to receive calls. Let’s make it happen.

First we need to create a queue.


As you can see, I have no task to create a queue with announcements or other features. Our task is to subscribe and take a call.

Now we need to wrap the incoming calls in this queue. In my case, the queue, I point to calls from external numbers and IAX.

exten => s,1,Queue(companyqueue,t)

Now you need to implement the functionality of signing a phone number in the queue. I will have special numbers for this: 3000 and 3001.
That is, came to work, dial 3000 – you are registering in the queue.
When you leave work, dial 3001 and exit the queue.

exten => 3000,1,AddQueueMember(companyqueue,SIP/${CALLERID(num)})
exten => 3000,n,Playback(ru/hello)
exten => 3000,n,Playback(ru/agent-loginok)

exten => 3001,1,RemoveQueueMember(companyqueue,SIP/${CALLERID(num)})
exten => 3001,n,Playback(ru/vm-goodbye)
exten => 3001,n,Playback(ru/agent-loggedoff)

Leave a Reply

Your email address will not be published.