I made this change from DEVICE_STATE to DEVICE_STATE_CHANGE, but I had it backwards,
authorRussell Bryant <russell@russellbryant.com>
Thu, 24 Jul 2008 20:40:15 +0000 (20:40 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 24 Jul 2008 20:40:15 +0000 (20:40 +0000)
this is the right event to subscribe to ...

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133486 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_agent.c

index c86f826..150c1e9 100644 (file)
@@ -2488,7 +2488,7 @@ static int load_module(void)
        /* Dialplan Functions */
        ast_custom_function_register(&agent_function);
 
-       agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE_CHANGE,
+       agent_devicestate_sub = ast_event_subscribe(AST_EVENT_DEVICE_STATE,
                agent_devicestate_cb, NULL, AST_EVENT_IE_END);
 
        return AST_MODULE_LOAD_SUCCESS;