Queue leastrecent

Hello @all
I use asterisk 1.8
I configure a queue and I want to use leastrecent as strategy.
I don’t use agents.conf file and I add member dinamically with QueueAddMember command.
With this strategy if the member doens’t answer, the incoming call continue to ring to this station even if there are other member available.
I want to use leastrecent as strategy to identify the member that has to ring as first, but I want that the call goes to other member if the station doens’t answer.
is it possible?
thank you

Should work. The default is it will ring the first one for 15 seconds, wait 5, then ring the second. If it is not doing this, provide a log with sufficient verbosity to see what it is doing.

It doesn’t work.
Here the queue.conf

[general]
persistentmembers = yes
autofill = yes
monitor-type = MixMonitor
shared_lastcall=yes

[500]
musicclass = default
announce-frequency=25
announce-position = yes
periodic-announce-frequency=0
queue-callswaiting=/var/www/html/asterisk/agi-bin/call_center/messaggi/coda2-2
queue-thankyou=/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback
queue-thereare=/var/www/html/asterisk/agi-bin/call_center/messaggi/coda1-2
queue-youarenext=/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo
retry=1
strategy=leastrecent
timeout=5
periodic-announce=
announce-holdtime=no
context=callback_800900147
eventmemberstatus=no
eventwhencalled=no
joinempty=yes
leavewhenempty=no
maxlen=0
monitor-format=
wrapuptime=40
weight=10
servicelevel=180
setinterfacevar=no
ringinuse = no

Here the CLI log:

XIVRDEVELV*CLI> sip show peers

XIVRDEVELV*CLI> 
[Name/username              Host                                    Dyn Forcerport ACL Port     Status     
101/101                    10.10.10.31                              D                 5060     OK (75 ms) 
102/102                    10.10.10.31                              D                 5060     OK (74 ms) 
103/103                    10.10.10.31                              D                 5060     OK (74 ms) 
104/104                    10.10.10.31                              D                 5060     OK (75 ms) 



XIVRDEVELV*CLI> queue show 500
[500 has 0 calls (max unlimited) in 'leastrecent' strategy (7s holdtime, 0s talktime), W:10, C:1, A:11, SL:100.0% within 180s
   Members: 
      sip/104 (dynamic) (Not in use) has taken no calls yet
      sip/103 (dynamic) (Not in use) has taken no calls yet
      sip/102 (dynamic) (Not in use) has taken no calls yet
      sip/101 (dynamic) (Not in use) has taken no calls yet
   No Callers


 == Using SIP RTP CoS mark 5
    -- Executing [323@default:1] Answer("SIP/192.168.99.158-0000670e", "") in new stack
    -- Executing [323@default:2] Queue("SIP/192.168.99.158-0000670e", "500") in new stack
    -- Started music on hold, class 'default', on SIP/192.168.99.158-0000670e
  == Using SIP RTP CoS mark 5
    -- SIP/101-0000670f is ringing
    -- Nobody picked up in 5000 ms
    -- Stopped music on hold on SIP/192.168.99.158-0000670e
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
    -- Told SIP/192.168.99.158-0000670e in 500 their queue position (which was 1)
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
    -- Started music on hold, class 'default', on SIP/192.168.99.158-0000670e
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006710 is ringing
    -- SIP/101-00006710 is ringing
    -- Nobody picked up in 5000 ms
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006711 is ringing
    -- SIP/101-00006711 is ringing
    -- Nobody picked up in 5000 ms
    -- Stopped music on hold on SIP/192.168.99.158-0000670e
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
    -- Told SIP/192.168.99.158-0000670e in 500 their queue position (which was 1)
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
    -- Started music on hold, class 'default', on SIP/192.168.99.158-0000670e
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006712 is ringing
    -- SIP/101-00006712 is ringing
    -- Nobody picked up in 5000 ms
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006713 is ringing
    -- SIP/101-00006713 is ringing
    -- Nobody picked up in 5000 ms
    -- Stopped music on hold on SIP/192.168.99.158-0000670e
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
    -- Told SIP/192.168.99.158-0000670e in 500 their queue position (which was 1)
    -- <SIP/192.168.99.158-0000670e> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
    -- Started music on hold, class 'default', on SIP/192.168.99.158-0000670e
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006714 is ringing
    -- Nobody picked up in 5000 ms
  == Using SIP RTP CoS mark 5
    -- SIP/101-00006715 is ringing
    -- SIP/101-00006715 is ringing
    -- Nobody picked up in 5000 ms
    -- Stopped music on hold on SIP/192.168.99.158-0000670e
  == Spawn extension (default, 323, 2) exited non-zero on 'SIP/192.168.99.158-0000670e'

You can see that the incoming call to the queue insist to ext sip/101 and it’s not routed to other queue member even if they are free.

Thank you very much for your help

I slightly mis-described the strategy. It is to ring each one in turn for 15 seconds until you have a complete circuit, then to wait 5 seconds and finally to re-evaluate the available agents and start over. In your case, replace 15 by 5, and 5 by 1.

You do have quite a long wrapuptime, during which the member would not be called, but you also seem to have a status of never called for all the members.

I would suggest enabling the queue logging channel (typically turn on the full log), ideally enabling millisecond log time stamps, and then setting:

core set debug 4 app_queue

(That might be app_queue.c.)

Incidentally, for anything where time may be an issue, you need to use the log file, and not screen scrape the CLI, as only the log file has complete timestamps.

Hi david55
here the log file as needed.
The incoming call is located in this row:

[2014-09-12 11:35:37.744] VERBOSE[4424] pbx.c:     -- Executing [323@default:1] Answer("SIP/192.168.99.158-00006743", "") in new stack

you can see that asterisk try only to ext sip/102

log file:

[2014-09-12 11:35:37.739] VERBOSE[1420] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:35:37.744] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2014-09-12 11:35:37.744] VERBOSE[4424] pbx.c:     -- Executing [323@default:1] Answer("SIP/192.168.99.158-00006743", "") in new stack
[2014-09-12 11:35:37.745] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2014-09-12 11:35:37.933] VERBOSE[4424] pbx.c:     -- Executing [323@default:2] Queue("SIP/192.168.99.158-00006743", "500") in new stack
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: NO QUEUE_PRIO variable found. Using default.
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: queue: 500, options: (null), url: (null), announce: (null), expires: 0, priority: 0
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: Queue '500' Join, Channel 'SIP/192.168.99.158-00006743', Position '1'
[2014-09-12 11:35:37.933] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:35:37.933] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:35:37.934] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:35:37.937] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:35:38.139] VERBOSE[4424] app_queue.c:     -- SIP/102-00006744 is ringing
[2014-09-12 11:35:38.140] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:35:53.721] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:35:53.722] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:35:53.723] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:35:53.723] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:35:53.800] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:35:58.984] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:35:58.984] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:35:58.984] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:35:58.985] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:36:07.802] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:36:07.803] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:36:13.903] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:36:13.903] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:36:13.903] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:36:13.903] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:36:13.906] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:36:14.065] VERBOSE[4424] app_queue.c:     -- SIP/102-00006745 is ringing
[2014-09-12 11:36:14.066] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:36:14.075] VERBOSE[4424] app_queue.c:     -- SIP/102-00006745 is ringing
[2014-09-12 11:36:29.680] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:36:29.680] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:36:29.681] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:36:29.681] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:36:29.773] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:36:34.899] VERBOSE[1420] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:36:34.901] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2014-09-12 11:36:34.904] VERBOSE[4427] pbx.c:     -- Executing [334@default:1] AGI("SIP/192.168.99.158-00006746", "/var/www/html/asterisk/agi-bin/gestione_calore_334/script/servizio_334.php,1410514594.26438,271") in new stack
[2014-09-12 11:36:34.911] VERBOSE[4427] res_agi.c:     -- Launched AGI Script /var/www/html/asterisk/agi-bin/gestione_calore_334/script/servizio_334.php
[2014-09-12 11:36:34.937] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:36:34.937] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:36:34.938] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:36:34.939] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:36:34.971] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2014-09-12 11:36:35.173] VERBOSE[4427] res_agi.c:     -- AGI Script Executing Application: (WAIT) Options: (1)
[2014-09-12 11:36:36.206] VERBOSE[4427] res_agi.c:  /var/www/html/asterisk/agi-bin/gestione_calore_334/script/servizio_334.php,1410514594.26438,271: Servizio Gestione Calore - INGRESSO CHIAMATA
[2014-09-12 11:36:36.207] VERBOSE[4427] res_agi.c:  /var/www/html/asterisk/agi-bin/gestione_calore_334/script/servizio_334.php,1410514594.26438,271: Servizio Gestione Calore - SERVIZIO APERTO
[2014-09-12 11:36:36.207] VERBOSE[4427] res_agi.c:     -- AGI Script Executing Application: (DIAL) Options: (SIP/974@192.168.101.170:5060,60,r)
[2014-09-12 11:36:36.208] VERBOSE[4427] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:36:36.209] VERBOSE[4427] app_dial.c:     -- Called SIP/974@192.168.101.170:5060
[2014-09-12 11:36:36.385] VERBOSE[4427] app_dial.c:     -- SIP/192.168.101.170:5060-00006747 is ringing
[2014-09-12 11:36:36.385] VERBOSE[4427] app_dial.c:     -- SIP/192.168.101.170:5060-00006747 is making progress passing it to SIP/192.168.99.158-00006746
[2014-09-12 11:36:36.385] DEBUG[1432] app_queue.c: Device 'SIP/192.168.101.170:5060' changed to state '6' (Ringing) but we don't care because they're not a member of any queue.
[2014-09-12 11:36:38.315] DEBUG[1432] app_queue.c: Device 'SIP/192.168.101.170:5060' changed to state '0' (Unknown) but we don't care because they're not a member of any queue.
[2014-09-12 11:36:38.317] VERBOSE[4427] res_agi.c:     -- <SIP/192.168.99.158-00006746>AGI Script /var/www/html/asterisk/agi-bin/gestione_calore_334/script/servizio_334.php completed, returning 4
[2014-09-12 11:36:38.319] VERBOSE[4427] pbx.c:   == Spawn extension (default, 334, 1) exited non-zero on 'SIP/192.168.99.158-00006746'
[2014-09-12 11:36:38.327] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '2' (In use) but we don't care because they're not a member of any queue.
[2014-09-12 11:36:43.757] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:36:43.758] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:36:49.858] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:36:49.858] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:36:49.858] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:36:49.858] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:36:49.859] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:36:50.000] VERBOSE[4424] app_queue.c:     -- SIP/102-00006748 is ringing
[2014-09-12 11:36:50.000] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:36:50.034] VERBOSE[4424] app_queue.c:     -- SIP/102-00006748 is ringing
[2014-09-12 11:37:05.640] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:37:05.640] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:37:05.641] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:05.641] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:05.736] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:10.899] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:37:10.899] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:37:10.899] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:37:10.900] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:37:19.718] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:37:19.718] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:37:25.817] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:37:25.817] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:37:25.817] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:37:25.817] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:37:25.820] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:37:26.106] VERBOSE[4424] app_queue.c:     -- SIP/102-00006749 is ringing
[2014-09-12 11:37:26.107] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:37:41.600] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:37:41.600] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:37:41.601] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:41.601] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:41.699] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:37:46.862] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:37:46.862] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:37:46.862] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:37:46.863] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:37:55.683] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:37:55.684] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:38:01.782] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:38:01.782] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:38:01.782] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:38:01.783] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:38:01.784] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:38:01.940] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674a is ringing
[2014-09-12 11:38:01.941] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:38:01.952] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674a is ringing
[2014-09-12 11:38:17.571] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:38:17.572] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:38:17.572] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:17.573] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:17.670] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:22.832] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:38:22.832] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:38:22.832] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:38:22.833] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:38:31.653] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:38:31.654] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:38:37.753] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:38:37.753] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:38:37.753] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:38:37.753] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:38:37.756] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:38:37.894] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674b is ringing
[2014-09-12 11:38:37.894] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:38:37.938] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674b is ringing
[2014-09-12 11:38:53.528] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:38:53.529] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:38:53.530] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:53.530] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:53.622] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:38:58.790] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:38:58.790] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:38:58.790] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:38:58.791] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:39:07.607] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:39:07.608] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:39:13.708] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:39:13.708] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:39:13.708] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:39:13.708] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:39:13.711] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:39:13.914] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674c is ringing
[2014-09-12 11:39:13.914] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:39:29.493] VERBOSE[4424] app_queue.c:     -- Nobody picked up in 15000 ms
[2014-09-12 11:39:29.493] DEBUG[4424] app_queue.c: Queue 500 has no realtime members defined. No need for update
[2014-09-12 11:39:29.494] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:29.494] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:29.580] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:34.746] DEBUG[4424] app_queue.c: There are 4 available members.
[2014-09-12 11:39:34.746] DEBUG[4424] app_queue.c: It's our turn (SIP/192.168.99.158-00006743).
[2014-09-12 11:39:34.746] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:39:34.747] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/sei_il_primo.slin' (language 'en')
[2014-09-12 11:39:43.567] VERBOSE[4424] app_queue.c:     -- Told SIP/192.168.99.158-00006743 in 500 their queue position (which was 1)
[2014-09-12 11:39:43.568] VERBOSE[4424] file.c:     -- <SIP/192.168.99.158-00006743> Playing '/var/www/html/asterisk/agi-bin/call_center/messaggi/msg_callback.slin' (language 'en')
[2014-09-12 11:39:49.668] VERBOSE[4424] res_musiconhold.c:     -- Started music on hold, class 'default', on SIP/192.168.99.158-00006743
[2014-09-12 11:39:49.668] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743 is trying to call a queue member.
[2014-09-12 11:39:49.668] DEBUG[4424] app_queue.c: Trying 'sip/102' with metric 0
[2014-09-12 11:39:49.668] VERBOSE[4424] netsock2.c:   == Using SIP RTP CoS mark 5
[2014-09-12 11:39:49.671] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:39:49.834] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674d is ringing
[2014-09-12 11:39:49.836] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '6' (Ringing)
[2014-09-12 11:39:49.847] VERBOSE[4424] app_queue.c:     -- SIP/102-0000674d is ringing
[2014-09-12 11:39:53.201] VERBOSE[4424] res_musiconhold.c:     -- Stopped music on hold on SIP/192.168.99.158-00006743
[2014-09-12 11:39:53.201] DEBUG[4424] app_queue.c: SIP/192.168.99.158-00006743: Nobody answered.
[2014-09-12 11:39:53.201] DEBUG[4424] app_queue.c: Queue '500' Leave, Channel 'SIP/192.168.99.158-00006743'
[2014-09-12 11:39:53.201] VERBOSE[4424] pbx.c:   == Spawn extension (default, 323, 2) exited non-zero on 'SIP/192.168.99.158-00006743'
[2014-09-12 11:39:53.206] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:53.206] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:53.212] DEBUG[1432] app_queue.c: Device 'SIP/192.168.99.158' changed to state '0' (Unknown) but we don't care because they're not a member of any queue.
[2014-09-12 11:39:53.305] DEBUG[1432] app_queue.c: Device 'SIP/102' changed to state '1' (Not in use)
[2014-09-12 11:39:56.897] VERBOSE[4388] asterisk.c:     -- Remote UNIX connection disconnected
[2014-09-12 11:41:05.891] VERBOSE[1390] asterisk.c:     -- Remote UNIX connection
[2014-09-12 11:41:20.969] VERBOSE[4469] asterisk.c:     -- Remote UNIX connection disconnected
[2014-09-12 11:41:22.613] VERBOSE[1390] asterisk.c:     -- Remote UNIX connection
[2014-09-12 11:41:24.994] VERBOSE[4495] asterisk.c:     -- Remote UNIX connection disconnected

thank you in advance

OK. Looking closer at the code, it does look like it only tries the best candidate on each cycle. As the member didn’t answer, they remain the LRU candidate. I guess that is consistent with the idea that agents should not leave calls to ring out.

You will need to make the member auto-pause, if they are failing to answer. They will then have to unpause when they are ready to answer again. Better is that they should manually pause if they are not prepared to take calls, as that will avoid the caller waiting for an agent who is never going to answer.

Putting the phone on hold may also work, but its taking me too long to go through the code to confirm that.

Thank you david55
Do you think that an update from version 1.8 to version 11 could change this hardcoded scenario?