Summary:ASTERISK-10020: If a local channel is a member of a queue, the queue will consider it invalid until at least one call has been made to it
Reporter:Jim Van Meggelen (jimvanm)Labels:
Date Opened:2007-08-04 11:46:27Date Closed:2007-08-06 09:30:11
Versions:Frequency of
Description:I have a queue set up where the members are Local channels.
When I restart asterisk, and perform 'queue show' from the console, the agents show up as (invalid). Calls to the queue fail as the queue does not consider any of the agents reachable.
When I make a call from somewhere else in the dialplan directly to that local channel, it works fine.
Furthermore, from that point on when 'queue show' is invoked, the agents now show as (Not in use).
From then on, calls to the queue proceed normally (until the next asterisk restart).


Reloading app_queue does not affect this. Only a complete restart of asterisk. I could not find a way to reload the local channel, so I don't know if it's the local channel that is actually the issue here.

The concern of course is that since these agents never log in (we are just sending calls out of our autoattendant to cell phones), they would not know that they are no longer considered reachable by the queue. The res

DEBUG looks like this when it fails:
[Aug  4 09:19:41] DEBUG[1860]: pbx.c:1809 pbx_extension_helper: Launching 'Queue'
   -- Executing [5017@executive_sets:2] Queue("SIP/6001-b7c01ec0", "service") in new stack
[Aug  4 09:19:41] DEBUG[1811]: chan_sip.c:15488 sip_devicestate: Checking device state for peer 6001
[Aug  4 09:19:41] DEBUG[1811]: devicestate.c:287 do_state_change: Changing state for SIP/6001 - state 1 (Not in use)
[Aug  4 09:19:41] DEBUG[1860]: app_queue.c:3361 queue_exec: NO QUEUE_PRIO variable found. Using default.
[Aug  4 09:19:41] DEBUG[1860]: app_queue.c:3384 queue_exec: queue: service, options: (null), url: (null), announce: (null), expires: 0, priority: 0
[Aug  4 09:19:41] WARNING[1860]: app_queue.c:3536 queue_exec: Unable to join queue 'service'
[Aug  4 09:19:41] DEBUG[1860]: pbx.c:1809 pbx_extension_helper: Launching 'Hangup'

DEBUG looks like this when it succeeds:
[Aug  4 09:21:54] DEBUG[1890]: pbx.c:1809 pbx_extension_helper: Launching 'Queue'
   -- Executing [5017@executive_sets:2] Queue("SIP/6001-b7c054c8", "service") in new stack
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:3361 queue_exec: NO QUEUE_PRIO variable found. Using default.
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:3384 queue_exec: queue: service, options: (null), url: (null), announce: (null), expires: 0, priority: 0
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:1227 join_queue: Queue 'service' Join, Channel 'SIP/6001-b7c054c8', Position '1'
[Aug  4 09:21:54] DEBUG[1890]: channel.c:2727 ast_prod: Prodding channel 'SIP/6001-b7c054c8'
[Aug  4 09:21:54] DEBUG[1890]: chan_sip.c:6499 transmit_response_with_sdp: Setting framing from config on incoming call
[Aug  4 09:21:54] DEBUG[1890]: chan_sip.c:6263 add_sdp: ** Our capability: 0x4 (ulaw) Video flag: True
[Aug  4 09:21:54] DEBUG[1890]: chan_sip.c:6264 add_sdp: ** Our prefcodec: 0x0 (nothing)
[Aug  4 09:21:54] DEBUG[1890]: chan_sip.c:6395 add_sdp: -- Done with adding codecs to SDP
[Aug  4 09:21:54] DEBUG[1890]: channel.c:2522 ast_internal_timing_enabled: Internal timing is disabled (option_internal_timing=0 chan->timingfd=26)
[Aug  4 09:21:54] DEBUG[1890]: chan_sip.c:6440 add_sdp: Done building SDP. Settling with this capability: 0x4 (ulaw)
   -- Started music on hold, class 'default', on SIP/6001-b7c054c8
[Aug  4 09:21:54] DEBUG[1890]: channel.c:2064 ast_settimeout: Scheduling timer at 160 sample intervals
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:2105 is_our_turn: It's our turn (SIP/6001-b7c054c8).
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:2372 try_calling: SIP/6001-b7c054c8 is trying to call a queue member.
[Aug  4 09:21:54] DEBUG[1890]: app_queue.c:1737 ring_one: (Parallel) Trying 'Local/jim@service_agents' with metric 0

Comments:By: Joshua C. Colp (jcolp) 2007-08-06 09:30:11

This is a module load order issue. Basically app_queue is loading before chan_local, and since it is unable to query the status of the extensions it considers them invalid. You need to adjust modules.conf to ensure chan_local.so is loaded before app_queue.so - it should then work fine and dandy as you want.