queue device state changes and handle them serially in a background thread
[asterisk/asterisk.git] / asterisk.c
index 249931e..b2ce56e 100755 (executable)
@@ -65,6 +65,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include "asterisk/version.h"
 #include "asterisk/build.h"
 #include "asterisk/linkedlists.h"
+#include "asterisk/devicestate.h"
 
 #include "defaults.h"
 
@@ -2095,6 +2096,10 @@ int main(int argc, char *argv[])
                printf(term_quit());
                exit(1);
        }
+       if (ast_device_state_engine_init()) {
+               printf(term_quit());
+               exit(1);
+       }
        ast_rtp_init();
        if (ast_image_init()) {
                printf(term_quit());