Instead of attempting to pass through AST_EVENT_DEVICE_STATE, use DEVICE_STATE_CHANGE

instead.  DEVICE_STATE is a state change on one server, and DEVICE_STATE_CHANGE is
the "real" state of that device across all servers sharing state.  This would have
only been a problem with distributed device state.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@131643 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2008-07-17 14:46:29 +00:00
parent 1517710d7e
commit 7613e369b2

View File

@@ -2488,7 +2488,8 @@ static int load_module(void)
/* Dialplan Functions */
ast_custom_function_register(&agent_function);
agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE, agent_devicestate_cb, NULL, AST_EVENT_IE_END);
agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE,
agent_devicestate_cb, NULL, AST_EVENT_IE_END);
return AST_MODULE_LOAD_SUCCESS;
}