[asterisk-bugs] [Asterisk 0014359]: The status of a local channel in state_interface of a queue is wrong the first time is added and lost after a reload

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Feb 2 14:24:27 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=14359 
====================================================================== 
Reported By:                francesco_r
Assigned To:                putnopvut
====================================================================== 
Project:                    Asterisk
Issue ID:                   14359
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0.5 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-01-29 04:20 CST
Last Modified:              2009-02-02 14:24 CST
====================================================================== 
Summary:                    The status of a local channel in state_interface of
a queue is wrong the first time is added and lost after a reload
Description: 
I use the new feature of stateinterface parameter to monitor the status of
a real device when used with local channel as member. So for example if i
add to queues.conf a static member:
member=Local/2503 at from-internal/n,0,,SIP/2503
whit queue show i have:
Local/2503 at from-internal/n (Not in use) has taken no calls yet

But this is wrong because this member is not registered and unavailable.
Infact if i convert the member to SIP/2503 the status become correctly:
SIP/2503 (Unavailable) has taken no calls yet

Other problem: if 2503 use the phone with queue show i have correctly:
Local/2503 at from-internal/n (In use) has taken no calls yet
But if in this exact moment i do a reload the status become newly:
Local/2503 at from-internal/n (Not in use) has taken no calls yet

====================================================================== 

---------------------------------------------------------------------- 
 (0099258) putnopvut (administrator) - 2009-02-02 14:24
 http://bugs.digium.com/view.php?id=14359#c99258 
---------------------------------------------------------------------- 
In your setup, do the peer entries for SIP/101 and SIP/503 have qualify=yes
set on them? That seems to be a key here. Everything else actually makes
sense to me.

At startup, I can see that app_queue.so is loaded before chan_sip.so. When
app_queue.so is loaded, it attempts to see what the device states of its
members are, but it cannot since the channel driver is not loaded yet. As a
result, all three queue members are in the "invalid" state.

Soon after chan_sip.so loads, I can see that Asterisk sends an OPTIONS
packet to SIP/509, which SIP/509 responds to. Thus, there is a NOTICE
message in the log showing that SIP/509 is reachable, followed shortly
after by its change to "not in use" instead of "invalid."

When you reload, chan_sip.so is already loaded when app_queue attempts to
re-check device state of its members. This time, chan_sip tells app_queue
that SIP/101 and SIP/503 are both "not in use" because they're not being
used and they have not failed a qualify check. If you turn on qualify for
SIP/101 and SIP/503, I suspect that both would become "unavailable" after
the next qualify attempt. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-02 14:24 putnopvut      Note Added: 0099258                          
======================================================================




More information about the asterisk-bugs mailing list