How to disable call queues..?

Hi…I had configured two soft phone extensions on SIP for my help desk setup agent PCs…My intention is if two agents are busy on call i don`t want third call to be ringing…caller has to get busy tone…So i had set call limit to 1…but the problem is if i set call limit to 1 the agents wont be able e to do call transfer or attended call forwarding…when I change the call limit to 2 call forwarding is working fine…but the third call is landing in queue…i had also tried to ringinuse=on on queue.conf file, as per some suggestion on forum…but it doesn’t help…Pls advice

Why would you disable the queue when all agents are on a call…?

To me that is the purpose of a queue, hold callers until an agent is free and can answer the caller.

Maybe you can elaborate on why you want to disable the queue when all agents are busy.

Hi meightee,

Our setup is an internal small help desk system for IT support .We encourage users to use ticketing system than calls…so only two lines is enough to address the issues on call…if agent is busy they can try again instead of holding them on queues… That’s why I need to disable this…any option I can try?

The option, dont use a queue…

Or you could set the timeout option of the queue command, set it to ie. 10 seconds, that means that if the caller is not connected to an agent within 10 seconds the call will go to the next priority in the dialplan.

Hi…thanks for u r quick response… I m new on asterisk… Can u explain a bit more in details, where I have to make change to get it works…?

Are you using FreePBX or a GUI? If not then call execution logic exists in extensions.conf and is written by you or someone else, so we can’t give specifics as we don’t know what it’s like.

Hi meightee ,

I had tried your option and it works…thanks…but…the third call disconnect as soon calls…can we get a busy tone instead of disconnecting rashly…it may give bad feeling for the caller as the call been disconnected purposely.

As I said, then you have to change your dialplan.

Just put a congestion for about 10 seconds after your queue command line.


same => n,Queue(xxxxxxx)
same => n,Congestion(10)
same => n,Hangup()

HI…Another issue comes up when i set time out …only the calls between the two agents soft phone works…any other calls from analog or outside calls also disconnecting after 10 seconds…!!

What you wanted is that when both agents were handling a call, all other callers should get a congestion…

Thats what is does… or not?

Hi meightee,

I think it will better to explain little bit on my environment for your better uindersatanding…

Our institution have a Ericsson EPABX which have almost 1000 extension and PRI lines…I m configuring an Asterisks EPABX for our IT Help-desk operations…So i had configured two extensions from on Erickson and its been connected/created to Asterisks using SIP…So the intention is calls from Ericsson EPABX will be landing on the two extensions created on Asterisks

…If two extensions on Asterisks are busy I don`t want third call to be landed ,instead of that the caller has to get a busy tone.

I had tried your option but it doesn’t help…only way i could restricts the third call by setting calllimit=1 in Asterisk…but the problem is if call limit is 1 the Agent on Asterisks wont do any call transfer .

extensions conf add

[tutorial]

exten => XXXX,1,MixMonitor(${UNIQUEID}.wav)

same => n,Dial(SIP/XXXX)

same => n,Queue(simple-queue)

same => n,Congestion(10)

same => n,Hangup()

Sip conf add

[XXXX]

type = friend

defaultuser = 1557

secret = XXXX

host = dynamic

context = tutorial

nat = force_rport,comedia

If you configured the two extensions that are “forwarded” via the Ericsson PBX, cant that Ericsson give the congestion when both extensions are bussy?

If not… why use a queue when you do not want to use the functions offered by the queue…

I would just dump the queue, use the two extensions, when a call comes in, check the state of the extension, if its free route the call to the extension, if both have the status busy route the call to congestion…

1 Like

Definitely don’t use a queue, if you don’t want queuing.

If you also don’t want calls presented on the second line, I think you can use group counts, and arrange to increment them for both incoming and outgoing calls

1 Like

Hi…I agree that i dont want queue features....but the problem is as multiple channel involved ,second call will get through to agent on Asterisk server via second/third channel from a caller resides on Erickson....as like @ meightee said we cannot limit the calling channel on Erickson side as it configured as SIP trunk to Asterisk with minimum 10 channels..Limiting that doesn't make sense as again it will prevent call transfer....Only work around to limit the channels on Asterisks for agents extension…but doing that prevents the agent to do call transfer…bcs call channel required minimum two channel to call second party and transfer the call on hold.

My objective is soft phone on Asterisk has to work as simple extension which can answer one call at a time and transfer to another numbers on Erickson if required…I had played with asterisks config files still no success…Any one can guide pls…?

One more thing i had noticed…instead of soft phone i had used IP phone…its works as like intended…But same not working on soft phones…that means when i test with ip phone if the extension on Asterisk busy, the second caller will get busy tone…but when i use soft phone the second caller get ring back tone,so the caller might think no one answering the call.

I agree with David, This really is a use case for GROUP_COUNT/GROUP

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_GROUP

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_GROUP_COUNT

Set a group on the incoming call

Count the number of calls with that group

If the count is > 1 then Hangup/Busy/Congestion/Whatever

If the count is 0 then Dial your SIP endpoint.

Thanks @johnkiniston…As i m new on Asterisks, can you explain how to set group on Asterisk…I had refereed the documentation but could not find any like you mentioned… Can u give an example of create a group for incoming calls…? Is it configured on extention.conf file…?

Group is used something like this.

exten => 100,1,NoOP() ; Start
 same => n,Set(GROUP(MyGroup)=${EXTEN}) ; Assign the value of 100@MyGroup
 same => n,ExecIF$[${GROUP_COUNT($EXTEN}@MyGroup)} > 1]?Busy()); Count the number of calls for 100@MyGroup, If its more than 1 call then Busy 
 same => n,Dial(PJSIP/${EXTEN}) ; If we are not Busy Dial
 same => n,Hangup() ; Hangup

@johnkiniston…I had tried your configuration but getting below error…can u pls guide…?

exten => 1544,1,NoOP() ; Start
same => n,Set(GROUP(asterisk)=${EXTEN}) ; Assign the value of 100@MyGroup
same => n,ExecIfIf($[${GROUP_COUNT($EXTEN}@asterisk)} > 1]?Busy()); Count the number of calls for 100@MyGroup, If its more than 1 call then Busy
same => n,Dial(SIP/1544) ; If we are not Busy Dial
same => n,Hangup() ; Hangup

Error Message

  • Executing [1544@tutorial:1] NoOp(“SIP/1557-00000000”, “”) in new stack
    – Executing [1544@tutorial:2] Set(“SIP/1557-00000000”, “GROUP(asterisk)=1544”) in new stack
    [Sep 27 11:40:56] WARNING[43181][C-00000001]: pbx.c:2906 pbx_extension_helper: No application ‘ExecIfIf’ for extension (tutorial, 1544, 3)
    == Spawn extension (tutorial, 1544, 3) exited non-zero on ‘SIP/1557-00000000’

The warning tells you precisely the problem. There is no application “ExecIfIf”. @johnkiniston added an extra “If” in there. It should be “ExecIf”.

@jcolp

Thanks @jcolp to point out the error…I had corrected and tested again…now call is landing but the issue is group count is not seems to be effective line mentioned by @johnkiniston …after i m dealing with first call i can see scond call also landing on my soft phone…!..my intention is only one call has to land at a time…during answering that call second caller has to get busy .

pls see the code i m using

exten => 1544,1,NoOP() ; Start
same => n,Set(GROUP(user1)=${EXTEN}) ; Assign the value of 100@MyGroup
same => n,ExecIf($[${GROUP_COUNT($EXTEN}@user1)} > 1]?Busy()); Count the number of calls for 100@MyGroup, If its more than 1 call then Busy
same => n,Dial(SIP/user1) ; If we are not Busy Dial
same => n,Hangup() ; Hangup

Out put message

  • Executing [1544@tutorial:1] NoOp(“SIP/asterisk-00000006”, “”) in new stack
    – Executing [1544@tutorial:2] Set(“SIP/asterisk-00000006”, “GROUP(user1)=1544”) in new stack
    [Sep 27 15:55:26] WARNING[47052][C-00000007]: pbx_functions.c:460 func_args: Can’t find trailing paren thesis for function ‘GROUP_COUNT($EXTEN’?
    [Sep 27 15:55:26] WARNING[47052][C-00000007]: ast_expr2.fl:470 ast_yyerror: ast_yyerror(): syntax err or: syntax error, unexpected ‘)’, expecting $end; Input:
    0@user1)} > 1
    ^
    [Sep 27 15:55:26] WARNING[47052][C-00000007]: ast_expr2.fl:474 ast_yyerror: If you have questions, ple ase refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables
    – Executing [1544@tutorial:3] ExecIf(“SIP/asterisk-00000006”, “0@user1?Busy()”) in new stack
    – Executing [1544@tutorial:4] Dial(“SIP/asterisk-00000006”, “SIP/user1”) in new stack
    == Using SIP RTP CoS mark 5
    – Called SIP/user1
    – SIP/user1-00000007 is ringing