Queue with no agents

Hi!

I’m new in asterisk and I’m testing queues.
I have a problem with queue when no agents are online, I’ve try:
leavewhenempty = strict
joinempty = no

strict, yes, no and all guides i found on internet

When there is no agent online, client is waiting forever.

It is possible to play a voice like “We are sorry but service is not available, try to call later” and hangup?

Thanks in advance.

EDIT:
Adding more info.

I’m using asterisk 1.2.13 (debian: apt-get install asterisk)

queue.conf

[MyQueue]
music=default
retry=0
strategy=ringall
timeout=15
wrapuptime=0
maxlen = 0
leavewhenempty = strict
joinempty = no
member = Local/12345 ;If I'm not worng this is a static agent (if 12345 is online queue must be called him, if not, queue has no agents online)
;member => Agent/1001 ;If i'm not wrong this is a dynamic agent (must register itself using password in any extension

sip.conf

[12345]
allow=all
mailbox=12345
type=friend
secret=11111
nat=yes
host=dynamic
reinvite=no
canreinvite=no
qualify=yes
dtmfmode=rfc2833
context=default

extension.conf

[default]
exten=> 2020,1,Answer
exten=> 2020,2,Ringing
exten=> 2020,3,Wait(2)
exten => 2020,n,Queue(MyQueue|tT|||100)
exten => 2020,n,Congestion
exten => 2020,n,Hangup

member = Local/12345 ;If I’m not worng this is a static agent (if 12345 is online queue must be called him, if not, queue has no agents online)
;member => Agent/1001 ;If i’m not wrong this is a dynamic agent (must register itself using password in any extension

I’ve tryed with member LOCAL and member AGENT, If there is any agent conected, there is no problem, but I want to do something when no agent is online.

This should work for join on 1.4. leave is confusing on that version. Actually join may be confusing as well; you have to consider agent defined/not defined, agent logged in/not logged in, and agent paused/not paused. In the end we could’t use these because of the way it handled paused, so I forget the exact rules.

1.6 has more fine grained control, so your options are deprecated. There is also a known bug with at least one operating in the wrong sense.

What we really need is the version of Asterisk, and the result of queue show (it might indicate the option hasn’t taken, e.g. spelling error, or it might indicate that the agent does exist.

I have updated first post with my config.

I forget to add this error i’m getting when agent is not online and I try to call to the system: NOTICE[17312] chan_local.c: No such extension/context 12345@default creating local channel

When I dial 2020: Call is transfer to queue if MEMBER 12345 is online all is working well.

If any other call is made it will wait in queue.

The problem is when MEMBER 12345 is NOT AVAILABLE (softphone not online), when anyone call 2020 is waiting forever.

Thanks again.

There are no device nodes associated with local channels. The availability of a local channel is only evaluated when one actually tries to make the call. I think the propagation of states is restricted even across an actual local channel instance.

(A local channel need never end up on a device. A local channel could end up on a voice message, could end up calling many numbers in parallel, and could end up trying many numbers, one after another.)

You have to do one of:

  • use Agent channels, and log them off;
  • directly use a real channel, which will have a device status;
  • dynamically remove the member from the queue, when they are not available.

I’m using softphones, real channel is a physicall device like cisco PAP?

[quote]

  • use Agent channels, and log them off;
  • dynamically remove the member from the queue, when they are not available.[/quote]

there is any way to auto register agents on connect?

I found: exten=> 2001,1,AgentCallbackLogin(||${CALLERIDNUM}@agents)
to register an agent calling 2001 and doing some steps

What I want is to register member, agent, anything with a softphone automatically when it logins (start computer) allowing them to awnser queue calls.

When no agent/member is online I want to hangup the call, or send to voicemail whatever but with all my tests I always keep en queue.

I have updated to asterisk 1.4!!!

Thanks for your help david55

I used “real channel” loosely. I meant something like SIP/nam-in-sip.conf.

Callback logins are deprecated in favour of using local channels, although I doubt that many people will abandon them.

I think you would have to use AMI to automate anything on a register or qualify failure.

[quote=“david55”]I used “real channel” loosely. I meant something like SIP/nam-in-sip.conf.
[/quote]

I’m using on queue.conf:

member = Local/12345

12345 is a sip extension registered on sip.conf

[quote=“david55”]
Callback logins are deprecated in favour of using local channels, although I doubt that many people will abandon them.

I think you would have to use AMI to automate anything on a register or qualify failure.[/quote]

What is AMI?

Local is a pseudo channel which allows you to address an extension as though it were a channel. It’s resolved to a real channel (or application) each time it is referenced. No device status is tracked for Local channels.

AMI is Asterisk Management Interface, the CTI interface for Asterisk.

Finally I resolve the problem with queue.conf:

changing: member = Local/12345

to: member = SIP/12345

Now if user 12345 is online MyQueue accept callers, if there is not online MyQueue is not accesible and is hangup.

Thanks for your help david55

Thanks for your help david55