diff --git a/src/switch_rtp.c b/src/switch_rtp.c index e7df3fd6ca..58931c109f 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -600,12 +600,16 @@ SWITCH_DECLARE(void) switch_rtp_init(switch_memory_pool_t *pool) zrtp_log_set_log_engine(zrtp_logger); zrtp_log_set_level(4); - if (zrtp_status_ok != zrtp_init(&zrtp_config, &zrtp_global)) { - abort(); + if (zrtp_status_ok == zrtp_init(&zrtp_config, &zrtp_global)) { + + memcpy(zid, zid_string, 12); + switch_scheduler_add_task(switch_epoch_time_now(NULL) + 900, zrtp_cache_save_callback, "zrtp_cache_save", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL); + } else { + switch_core_set_variable("zrtp_enabled", NULL); + zrtp_on = 0; + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "ZRTP init failed!\n"); } - memcpy(zid, zid_string, 12); - switch_scheduler_add_task(switch_epoch_time_now(NULL) + 900, zrtp_cache_save_callback, "zrtp_cache_save", "core", 0, NULL, SSHF_NONE | SSHF_NO_DEL); } #endif srtp_init();