--- chan_h323.c.orig Thu Dec 1 21:57:04 2005 +++ chan_h323.c Sun Jan 8 18:18:37 2006 @@ -2008,6 +2199,11 @@ char *cat; char *utype; + /* fire up the H.323 Endpoint */ + if (!h323_end_point_exist()) { + h323_end_point_create(); + } + cfg = ast_config_load(config); /* We *must* have a config file otherwise stop immediately */ @@ -2016,10 +2212,10 @@ return 1; } - /* fire up the H.323 Endpoint */ - if (!h323_end_point_exist()) { - h323_end_point_create(); - } h323debug = 0; memset(&bindaddr, 0, sizeof(bindaddr)); memset(&global_options, 0, sizeof(global_options)); @@ -2327,10 +2572,12 @@ if (!io) { ast_log(LOG_WARNING, "Unable to create I/O context\n"); } - res = reload_config(); - if (res) { - return 0; - } else { + reload_config(); + { /* Make sure we can register our channel type */ if (ast_channel_register(&oh323_tech)) { ast_log(LOG_ERROR, "Unable to register channel class %s\n", type); @@ -2362,7 +2611,11 @@ progress, set_dtmf_payload, hangup_connection, set_local_capabilities); + /* And start the monitor for the first time */ + restart_monitor(); /* start the h.323 listener */ if (h323_start_listener(h323_signalling_port, bindaddr)) { ast_log(LOG_ERROR, "Unable to create H323 listener.\n"); @@ -2376,7 +2629,7 @@ } } - /* And start the monitor for the first time */ - restart_monitor(); } return res; }