Upgrade 3CX to v18 and get it hosted free!

Asterisk Queue with limited calls per IAX agent

Author image

IAX2 does not have SIP-like call-limit configuration option. I was implementing a call queue, where clients used IAX2 softphone (idefisk). It was very disturbing for operators to have calls ringing on background of ongoing call, so I tried to find a solution to limit calling only to users not on the phone.

Queue members:

Define them like this:

member => Local/934@queue-to-agent/n

Extensions.conf

[exithandling]

; this is just my exit handler. the important thing is in queue-to-agent context

exten => s-NOANSWER,1,NoOP(There was no answer to call from ${CALLERIDNUM})
exten => s-NOANSWER,2,Hangup

exten => s-BUSY,1,NoOP(Extension busy, call from ${CALLERIDNUM})
exten => s-BUSY,2,Hangup

exten => s-CHANUNAVAIL,1,NoOP(Channel unavailable, call from ${CALLERIDNUM})
exten => s-CHANUNAVAIL,2,Hangup

exten => s-CONGESTION,1,NoOP(Congestion, call from ${CALLERIDNUM})
exten => s-CONGESTION,2,Hangup

exten => s-ANSWER,1,NoOP(Answered and completed call from ${CALLERIDNUM})
exten => s-ANSWER,2,Hangup

[queue-to-agent]
exten => _9.,1,Set(GROUP()=${EXTEN})
exten => _9.,2,NoOP(Group count is ${GROUP_COUNT()}, group is ${GROUP()}, exten is ${EXTEN})
exten => _9.,3,GotoIf($[${GROUP_COUNT()} > 1]?6:4)
exten => _9.,4,Dial(IAX2/user${EXTEN},120,rtT) ; alternatively, you can goto extension in some context, my IAX users are called user9XX
exten => _9.,5,Goto(exithandling,s-${DIALSTATUS},1) ; be sure to hangup or return congestion on connection error, queue relies on returning
exten => _9.,6,Wait(7) ; limit cycling of calls, when all operators are busy/congested
exten => _9.,7,Congestion

See also


Article Reviews

Write a Review

Your email address will not be published. Required fields are marked *

Required Field. Minimum 5 characters.

Required Field. Minimum 5 characters, maximum 50.

Required field.There is an error with this field.

Required Field.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

There are no reviews for this article. Be the first one to write a review.

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.