Merged revisions 163579 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r163579 | file | 2008-12-12 12:55:15 -0400 (Fri, 12 Dec 2008) | 4 lines
  
  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/branches/1.6.1@163581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2008-12-12 16:57:04 +00:00
parent 85ad905561
commit 79d555f70c
2 changed files with 10 additions and 5 deletions

View File

@@ -4153,7 +4153,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",