summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_iax2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 9e6d4c6a5..8c2cf5444 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -14553,6 +14553,10 @@ static int load_module(void)
iax_set_output(iax_debug_output);
iax_set_error(iax_error_output);
jb_setoutput(jb_error_output, jb_warning_output, NULL);
+
+ if ((timer = ast_timer_open())) {
+ ast_timer_set_rate(timer, trunkfreq);
+ }
if (set_config(config, 0) == -1) {
if (timer) {
@@ -14580,10 +14584,6 @@ static int load_module(void)
ast_manager_register_xml("IAXnetstats", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_netstats);
ast_manager_register_xml("IAXregistry", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_iax2_show_registry);
- if ((timer = ast_timer_open())) {
- ast_timer_set_rate(timer, trunkfreq);
- }
-
if (ast_channel_register(&iax2_tech)) {
ast_log(LOG_ERROR, "Unable to register channel class %s\n", "IAX2");
__unload_module();