mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-08 19:08:14 +00:00
Since chan_sip is callback devicestate driven do not pass in actual states, pass in unknown so we get asked. Additionally do not pass in an actual device state value in ast_setstate since the channel may be callback driven.
(closes issue #13525) Reported by: pj git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4170,7 +4170,12 @@ int ast_setstate(struct ast_channel *chan, enum ast_channel_state state)
|
||||
}
|
||||
|
||||
chan->_state = state;
|
||||
ast_devstate_changed_literal(ast_state_chan2dev(state), name);
|
||||
|
||||
/* We have to pass AST_DEVICE_UNKNOWN here because it is entirely possible that the channel driver
|
||||
* for this channel is using the callback method for device state. If we pass in an actual state here
|
||||
* we override what they are saying the state is and things go amuck. */
|
||||
ast_devstate_changed_literal(AST_DEVICE_UNKNOWN, name);
|
||||
|
||||
/* setstate used to conditionally report Newchannel; this is no more */
|
||||
manager_event(EVENT_FLAG_CALL,
|
||||
"Newstate",
|
||||
|
||||
Reference in New Issue
Block a user