Module: sip-router
Branch: 4.0
Commit: 00c4469624392cb252d65ecf0e53dd64cfb9bb87
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=00c4469…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com>
Date: Fri Mar 15 15:04:07 2013 +0000
modules/outbound: Warn during mod_init() if STUN is not built or enabled
- STUN is required for outbound with UDP. Don't want to stop Kamailio starting
when the outbound module is loaded and STUN is not available - but a warning
seems appropriate.
(cherry picked from commit 85b26219f9e4c3c8c7c990a4897d40645b4ad6e7)
---
modules/outbound/ob_mod.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/modules/outbound/ob_mod.c b/modules/outbound/ob_mod.c
index 7cf0c74..fb110d8 100644
--- a/modules/outbound/ob_mod.c
+++ b/modules/outbound/ob_mod.c
@@ -98,6 +98,15 @@ static int mod_init(void)
"random bytes\n", ob_key.len);
}
+#ifndef USE_STUN
+ LM_WARN("STUN support not built-in. UDP keep-alive not supported.\n");
+#else
+ if (stun_allow_stun != 1)
+ {
+ LM_WARN("STUN disabled. UDP keep-alive not supported.\n");
+ }
+#endif
+
return 0;
}