mirror of https://github.com/asterisk/asterisk
Previously, when AST_CONTROL_RINGING was received by a DAHDI device, it would set its channel state to AST_STATE_RINGING. However, an analysis of the codebase and other channel drivers reveals RINGING corresponds to physical power ringing, whereas AST_STATE_RING should be used for audible ringback on the channel. This also ensures the correct device state is returned by the channel state to device state conversion. Since there seems to be confusion in various places regarding AST_STATE_RING vs. AST_STATE_RINGING, some documentation has been added or corrected to clarify the actual purposes of these two channel states, and the associated device state mapping. An edge case that prompted this fix, but isn't explicitly addressed here, is that of an incoming call to an FXO port. The channel state will be "Ring", which maps to a device state of "In Use", not "Ringing" as would be more intuitive. However, this is semantic, since technically, Asterisk is treating this the same as any other incoming call, and so "Ring" is the semantic state (put another way, Asterisk isn't ringing anything, like in the cases where channels are in the "Ringing" state). Since FXO ports don't currently support Call Waiting, a suitable workaround for the above would be to ignore the device state and instead check the channel state (e.g. IMPORT(DAHDI/1-1,CHANNEL(state))) since it will be Ring if the FXO port is idle (but a call is ringing on it) and Up if the FXO port is actually in use. (In both cases, the device state would misleadingly be "In Use".) Resolves: #1029pull/1038/head
parent
653f3c4737
commit
5ed7f4d152
Loading…
Reference in new issue