[asterisk-bugs] [Asterisk 0018018]: [patch] Hints for non-existent devices are in an Idle state
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Apr 6 12:33:34 CDT 2011
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: 2011-04-06 12:33 CDT
======================================================================
Summary: [patch] 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.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
related to 0016035 [patch] Status of dahdi/zap channels in...
related to 0018860 [patch] Odd Behavior when dialed sip ch...
======================================================================
----------------------------------------------------------------------
(0133461) ebroad (manager) - 2011-04-06 12:33
https://issues.asterisk.org/view.php?id=18018#c133461
----------------------------------------------------------------------
Scratch that, this patch no longer works on trunk. I believe you are
correct in that ast_devstate_aggregate_add() and
ast_devstate_aggregate_result() in concert with
ast_devstate_to_extenstate() are broken in more ways than one. In
ast_devstate_aggregate_add(), AST_DEVICE_INVALID sets free and busy to 0,
leaving us with unknown and unavailable set to 1. In
ast_devstate_aggregate_result(), the first condition hit is all_unknown,
which returns an aggregate result of AST_DEVICE_UNKNOWN, which maps to
AST_EXTENSION_NOT_INUSE in ast_devstate_to_extenstate(). Essentially
ast_devstate_aggregate_result() should handle AST_DEVICE_INVALID, something
to the effect of:
if (all_unknown && all_unavail)
return AST_DEVICE_INVALID;
Additionally, in ast_devstate_aggregate_add(), AST_DEVICE_UNKNOWN should
set all_unavail to 0 and we still need to let sip_devicestate() in chan_sip
fall through to AST_DEVICE_INVALID for non-existent devices.
elazar
Issue History
Date Modified Username Field Change
======================================================================
2011-04-06 12:33 ebroad Note Added: 0133461
======================================================================
More information about the asterisk-bugs
mailing list