[Home]

Summary:ASTERISK-24038: device state: Report ONHOLD device state if channel driver defers device state calculation to core
Reporter:Matt Jordan (mjordan)Labels:
Date Opened:2014-07-13 17:29:09Date Closed:2014-07-24 10:22:41
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/PBX
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:In Asterisk 12 and later, it is possible for a device state to have a state of 'ONHOLD'. This is currently calculated independently in certain channel drivers, notably {{chan_sip}} and {{chan_pjsip}}. In the case of {{chan_sip}}, it has had the ability to track whether or not a call is on hold for quite some time; {{chan_pjsip}} takes a similar approach and calculates whether or not a device should be considered "on hold" by looking at all channels associated with the device in question.

Interestingly, we now have the ability to report a {{AST_DEVICE_ONHOLD}} state for all channels that defer their device state to the core. This is due to channel hold state actually now being tracked on the channel itself (in Asterisk 12+). If the device state core goes out to get a channel associated with the device, this should be able to check the channel hold state in its calculation.

This would have the benefit of bringing all other channel drivers in line with the capabilities in {{chan_sip}} and {{chan_pjsip}}. Note that the logic in those drivers is still technically needed, as they compute their device states by aggregating all channels associated with a peer/endpoint - something that most channel drivers do not do.

Comments: