From 5ce19a8f9f5499d13cf7ad16a375209a88dfadcd Mon Sep 17 00:00:00 2001
From: netaskd <netaskd@gmail.com>
Date: Tue, 17 Apr 2018 16:47:47 +0300
Subject: [PATCH] add homer options to el configuration

---
 el/rtpengine.init      | 15 +++++++++++++++
 el/rtpengine.sysconfig |  4 ++++
 2 files changed, 19 insertions(+)

diff --git a/el/rtpengine.init b/el/rtpengine.init
index f9c95867b..07053c910 100644
--- a/el/rtpengine.init
+++ b/el/rtpengine.init
@@ -167,6 +167,21 @@ build_opts() {
         then
                 OPTS+=" --max-sessions=$MAX_SESSIONS"
         fi
+
+	if [[ -n "$HOMER_SERVER" ]]
+        then
+                OPTS+=" --homer=$HOMER_SERVER"
+        fi
+
+	if [[ -n "$HOMER_PROTO" ]]
+        then
+                OPTS+=" --homer-protocol=$HOMER_PROTO"
+        fi
+
+	if [[ -n "$HOMER_CAPTURE_ID" ]]
+        then
+                OPTS+=" --homer-id=$HOMER_CAPTURE_ID"
+        fi
 }
 
 start() {
diff --git a/el/rtpengine.sysconfig b/el/rtpengine.sysconfig
index 4c8cf1188..d1110c3e5 100644
--- a/el/rtpengine.sysconfig
+++ b/el/rtpengine.sysconfig
@@ -44,3 +44,7 @@ LISTEN_UDP=127.0.0.1:2222	# IP address and port combination for UDP
 #RE_USER=ngcp-rtpengine	# Run rtpengine as this specific user
 
 #RE_GROUP=ngcp-rtpengine # allow this group to control rtpengine in kernel mode
+
+#HOMER_SERVER=127.0.0.1:9060	# Address of Homer server for RTCP stats
+#HOMER_PROTO=udp		# Transport protocol for Homer (default udp)
+#HOMER_CAPTURE_ID=1234		# 'Capture ID' to use within the HEP protocol