Review Board 1.7.16

Fix Distributed Device State broken at sites using res_xmpp or res_jabber where Secuity Advisory AST-2012-015 is inplace.

Review Request #2452 - Created April 14, 2013 and submitted

Alec Davis
1.8 to trunk
The site that doesn't update it's devicestates from the remotesite is the site with ASR-2012-015 inplace.

This fixes the scenario where one site doesn't send the IE cachable=1 in the XMPP/Jabber message, to a newer system that expects to see it.

If the IE 'cachable' isn't present we need to default to AST_DEVSTATE_CACHABLE.
 Assigning the cachable variable directly from ast_event_get_ie_uint is wrong, if the IE 'cachable' isn't found ast_event_get_ie_uint() will return 0, 0 = AST_DEVSTATE_NOT_CACHABLE

We need to read the 'cachable' IE into a string first, allowing us to check that it exists, if it doesn't exist then default to cachable=AST_DEVSTATE_CACHABLE.
 If the 'cachable' IE does exist, then convert to a uint, validate value and go with it.

Caused by:
Yes, change device state, at either site, and it's reflected in the other. One site is prior to ASTERISK-21075.

Tested both sites at r385594, and states correct at both sites.
Description From Last Updated Status
This should be retreived as a uint. opticron April 15, 2013, 8:54 a.m. Open
I don't see a reason to change the ordering here. opticron April 15, 2013, 8:54 a.m. Open
Idem. opticron April 15, 2013, 8:54 a.m. Open
Review request changed
Updated (April 20, 2013, 11:12 a.m.)
  • changed from pending to submitted
Committed in revision 386185 runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to