mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
chan_dahdi: Fix wrong channel state when RINGING recieved.
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: #1029
This commit is contained in:
committed by
asterisk-org-access-app[bot]
parent
653f3c4737
commit
5ed7f4d152
@@ -37,8 +37,8 @@ enum ast_channel_state {
|
||||
AST_STATE_RESERVED, /*!< Channel is down, but reserved */
|
||||
AST_STATE_OFFHOOK, /*!< Channel is off hook */
|
||||
AST_STATE_DIALING, /*!< Digits (or equivalent) have been dialed */
|
||||
AST_STATE_RING, /*!< Line is ringing */
|
||||
AST_STATE_RINGING, /*!< Remote end is ringing */
|
||||
AST_STATE_RING, /*!< Remote end is ringing (e.g. listening to audible ringback tone). Also often used for initial state for a new channel. */
|
||||
AST_STATE_RINGING, /*!< Line is ringing */
|
||||
AST_STATE_UP, /*!< Line is up */
|
||||
AST_STATE_BUSY, /*!< Line is busy */
|
||||
AST_STATE_DIALING_OFFHOOK, /*!< Digits (or equivalent) have been dialed while offhook */
|
||||
|
Reference in New Issue
Block a user