[asterisk-bugs] [Asterisk 0018018]: Hints for non-existent devices are in an Idle state

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Sep 21 14:34:58 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18018 
====================================================================== 
Reported By:                ebroad
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18018
Category:                   Channels/chan_sip/Subscriptions
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Asterisk Version:           SVN 
JIRA:                       SWP-2283 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 287310 
Request Review:              
====================================================================== 
Date Submitted:             2010-09-20 09:37 CDT
Last Modified:              2010-09-21 14:34 CDT
====================================================================== 
Summary:                    Hints for non-existent devices are in an Idle state
Description: 
bhn-pbx01*CLI> core show hint 900
900 at broadhn-internal    : SIP/foo             State:Idle           
Watchers  0
1 hint matching extension 900


foo is not a valid SIP device:

bhn-pbx01*CLI> sip show peer foo
Peer foo not found.

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

---------------------------------------------------------------------- 
 (0127228) ebroad (manager) - 2010-09-21 14:34
 https://issues.asterisk.org/view.php?id=18018#c127228 
---------------------------------------------------------------------- 
Picking through the code yielded this:

sip_devicestate returns AST_DEVICE_UNKNOWN for peer's it can't find, while
semantically correct, ast_devstate_to_extenstate() maps AST_DEVICE_UNKNOWN
to AST_EXTENSION_NOT_INUSE which is VeryBad(tm). The attached patch returns
AST_DEVICE_UNAVAILABLE which is inline with the comment in
sip_devicestate(). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-21 14:34 ebroad         Note Added: 0127228                          
======================================================================




More information about the asterisk-bugs mailing list