Queues working

Hi everybody. I’m wondering if this situation is possible.

  • 2 desktop support telephones.
  • Both of them into one queue
  • When a call is incoming and none of them are registered/loged, the system must return busy tone, without answer it
  • When you put a call on the queue, the system must return ringing tone,without answer it, until one operator answers it.

Sorry if these questions are too generic.Thanks to all.

You can put on a similar scenario:

When an external call arrives and your IPphones are registered, you can decide to make them ring in the same moment or make ring a phone and then the other (if the first doesn’t answer). You can decide to use the Asterisk Queue function too (instead of Dial): In this way, if every phone is busy you’ll put the call in a queue and the first “free” phone will serve the call. You can find here more informations:

voip-info.org/wiki-Asterisk+call+queues

Bye,
Giulio

Thanks for your answer. But the problem is that if i use this simple sentence, for incoming calls, to test Busy program, it returns busy tone to caller, but the call is answered for one second, so the caller will have to pay despite of
[sangoma-context]
exten => _X.,n,Busy;

we have one Sangoma A500 and an ISDN line connected to it for receiving call from outside. We’ve installed Asterisk 1.4 on a Debian 2.6.18.
On the other hand, if I use this sentence
exten => _X.,n,Queue(afternoon);
the call is answered again. I don’t know if the problem is related to the Sangoma card or i’n doing the things wrong in the Dialplan.
Thanks, for your help, i’m a bit desperate.

Thanks for your answer. But the problem is that if i use this simple sentence, for incoming calls, to test Busy program, it returns busy tone to caller, but the call is answered for one second, so the caller will have to pay despite of
[sangoma-context]
exten => _X.,n,Busy;

we have one Sangoma A500 and an ISDN line connected to it for receiving call from outside. We’ve installed Asterisk 1.4 on a Debian 2.6.18.
On the other hand, if I use this sentence
exten => _X.,n,Queue(afternoon);
the call is answered again, even if the extensions in the queue are busy. I don’t know if the problem is related to the Sangoma card or i’n doing the things wrong in the Dialplan.
Thanks, for your help, i’m a bit desperate.

If you want to put a call on a queue you’ve to answer to it.

Cheers.

Marco Bruni

There is no need to use the command Busy(). This command requires that the call is “answered”, so it’s natural that the caller will pay. If you use Queue(), you have to configure the queues.conf with the parameter leavewhenempty set to “strict”.

[queue_name]
leavewhenempty = strict

If you have any static queue members defined as “Member => Agent/XXXX” in your Queue definiation, Asterisk will considered the Queue in-use, regardless of whether any Agents are logged in or not, so, in queues.conf you mustn’t have static queue members. You have to add/remove queue members “dynamically” with commands AddQueueMember and RemoveQueueMember. In your extensions.conf you’ll have something like this:

[callgroup_incoming]
;incoming calls group
exten => s,1,NoOp()
exten => s,n,AddQueueMember(queue_name|SIP/101)
exten => s,n,Queue(queue_name)
exten => s,n,RemoveQueueMember(queue_name|SIP/101)
exten => s,n,HangUp()

In the example I’ve added/removed the member SIP/101 only… If there aren’t agents logged, the incoming callers will immediately be removed from the queue.

Bye,
Giulio

Thanks again. I’ve used your [callgroup_incoming] and works fine…except for the fact that the call is answered, when reach Hangup sentence. The cellular from i’m phoning to Asterisk, tells me that the call last 1 second, so i think the call was answered.

I have the same behaviour with apps Busy() and with HangUp(), the call is answered.

Is there a way to redirect a call to a busy extension, so the caller receive busy tone without being answered?.

Thanks Giulio and everyboy for the efforts.

Thanks again. I’ve used your [callgroup_incoming] and works fine…except for the fact that the call is answered, when reach Hangup sentence. The cellular from i’m phoning to Asterisk, tells me that the call last 1 second, so i think the call was answered.

I have the same behaviour with apps Busy() and with HangUp(), the call is answered.

Is there a way to redirect a call to a busy extension, so the caller receive busy tone without being answered?.

On the other hand, if i configure one queue with parameter maxlen=3, and 2 members, added “dinamically”, and both of them have answered one call, and another call is put into the queue, is there a way to return this call ringing tone until one member is free, without answering the call?

Thanks Giulio and everyboy for the efforts.

Hi!

If you have static queue members defined in your queues.conf, the leavewhenempty parameter doesn’t work correctly and the call is answered. So you have to verify that your queue is empty (no static member).

I tested this configuration and when I call from my cellular and no telephone is registered on the PBX, the call isn’t answered (I don’t pay) and if I see the CLI output the call channel results “busy”. If I register a phone, it rings correctly… and if this registered phone is busy the caller will wait until the line will be free.

Let me know if it works!
Bye!

Giulio

i’m putting my config.

[quote]queues.conf

[queue_name_1]
announce-frequency=0
announce-holdtime=no
eventmemberstatus=no
eventwhencalled=no
joinempty=no
leavewhenempty=strict
maxlen=3
music=default
periodic-announce-frequency=0
queue-callswaiting=silence/1
queue-thereare=silence/1
queue-youarenext=silence/1
retry=5
strategy=ringall
timeout=15
wrapuptime=0
[/quote]

[quote]extensions.conf
[sangoma1]
exten => s,1,NoOp()
exten => s,n,AddQueueMember(queue_name_1|Local/302)
exten => s,n,Queue(queue_name_1)
exten => s,n,RemoveQueueMember(queue_name_1|Local/302)
exten => s,n,HangUp()
[/quote]
CLI output when i’m calling (Local/302 isn’t logged in)

[quote]EVENT INCOMING w1g1
Unique-Call-Id: w1g1-1350490027-1025202362
Remote-Number: 64800xxxx
Remote-Name:
Protocol: BRI
User-Agent: sangoma_mgd
Local-Number: 98573xxxx
Channel-Name: g1/1
Trunk-Group: 1
Presentation: 0
Screening: 3
RDNIS:

[WOOMERA] +++LAUCN TECH THREAD
[WOOMERA] Receive Message: {default} [localhost/42420]

EVENT HELLO Sangoma Media Gateway
Supported-Protocols: TDM
Version: v1.30
Remote-Address: 127.0.0.1
Remote-Port: 35296
Raw-Format: ALAW

[WOOMERA] Send Message: {default} [localhost/42420]

PROCEED w1g1-1350490027-1025202362
Unique-Call-Id: w1g1-1350490027-1025202362

[WOOMERA] Receive Message: {default} [localhost/42420]

200 w1g1-1350490027-1025202362 PROCEED OK
Unique-Call-Id: w1g1-1350490027-1025202362

[WOOMERA] Send Message: {default} [localhost/42420]

hangup w1g1-1350490027-1025202362
cause: INVALID_CALL_REFERENCE
Q931-Cause-Code: 81
Unique-Call-Id: w1g1-1350490027-1025202362

[WOOMERA] Receive Message: {default} [localhost/42420]

200 HANGUP OK
Unique-Call-Id: w1g1-1350490027-1025202362[/quote]

Despite of this, the call is answered for 1 second.
Thanks.

I tried to put on your configuration. The system works for me. On my cellular i can hear a busy tone and read “Senza Risposta” (in english it would be: “Without Answer”). Moreover, after the “rejected” call i’ve got the same credit on my cellular…

My CLI output is:

[quote]pc006CLI>
– Executing [05009xxxxx@from_external:1] Goto(“SIP/05009xxxxx-081ee8d0”, “callgroup_incoming|s|1”) in new stack
– Goto (callgroup_incoming,s,1)
– Executing [s@callgroup_incoming:1] NoOp(“SIP/05009xxxxx-081ee8d0”, “”) in new stack
– Executing [s@callgroup_incoming:2] AddQueueMember(“SIP/05009xxxxx-081ee8d0”, “queue_name_1|SIP/101”) in new stack
[May 28 15:24:51] NOTICE[17542]: app_queue.c:3625 aqm_exec: Added interface ‘SIP/101’ to queue ‘queue_name_1’
– Executing [s@callgroup_incoming:3] Queue(“SIP/05009xxxxx-081ee8d0”, “queue_name_1”) in new stack
– Started music on hold, class ‘default’, on SIP/05009xxxxx-081ee8d0
– Stopped music on hold on SIP/05009xxxxx-081ee8d0
– Executing [s@callgroup_incoming:4] RemoveQueueMember(“SIP/05009xxxxx-081ee8d0”, “queue_name_1|SIP/101”) in new stack
[May 28 15:24:51] NOTICE[17542]: app_queue.c:3549 rqm_exec: Removed interface ‘SIP/101’ from queue ‘queue_name_1’
– Executing [s@callgroup_incoming:5] Hangup(“SIP/05009xxxxx-081ee8d0”, “”) in new stack
== Spawn extension (callgroup_incoming, s, 5) exited non-zero on 'SIP/05009xxxxx-081ee8d0’
pc006
CLI> [/quote]

For these tests i’m using a VoIP account (Italian VoIP provider). I suppose your problem can be caused by using the Sangoma card…

Bye,
Giulio