pbx: Update device and presence state when changing a hint extension.
authorJoshua Colp <jcolp@digium.com>
Wed, 16 Sep 2015 13:22:35 +0000 (10:22 -0300)
committerJoshua Colp <jcolp@digium.com>
Sat, 19 Sep 2015 13:20:51 +0000 (08:20 -0500)
commit42a897c4c39c221593c75c6083f7a8ca3409bda9
treeb8b73f8eb9c9d802c56af13200ba4af39b005a1a
parente47396721f9c73b16ac7c7632dcd530f4e5b06c7
pbx: Update device and presence state when changing a hint extension.

When changing a hint extension without removing the hint first the
device state and presence state is not updated. This causes the state
of the hint to be that of the previous extension and not the current
one. This state is kept until a state change occurs as a result of
something (presence state change, device state change).

This change updates the hint with the current device and presence
state of the new extension when it is changed. Any state callbacks
which may have been added before the hint extension is changed are
also informed of the new device and presence state if either have
changed.

ASTERISK-25394 #close

Change-Id: If268f1110290e502c73dd289c9e7e7b27bc8432f
main/pbx.c