[Freeswitch-svn] [commit] r8491 - freeswitch/trunk/src/mod/applications/mod_esf

Freeswitch SVN anthm at freeswitch.org
Tue May 20 13:25:17 EDT 2008


Author: anthm
Date: Tue May 20 13:25:17 2008
New Revision: 8491

Modified:
   freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c

Log:
solution for MODAPP-94

Modified: freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c	Tue May 20 13:25:17 2008
@@ -76,6 +76,8 @@
 	switch_port_t mcast_port = 34567;
 	switch_port_t mcast_control_port = 6061;
 	char *mcast_port_str = "34567";
+	const char *esf_broadcast_ip = NULL;
+
 
 	if (!switch_strlen_zero((char *) data)) {
 		mydata = switch_core_session_strdup(session, data);
@@ -165,13 +167,18 @@
             }
         }
 
-		switch_find_local_ip(guess_ip, sizeof(guess_ip), AF_INET);
-		if (!(rtp_port = switch_rtp_request_port(guess_ip))) {
+		if (!(esf_broadcast_ip = switch_channel_get_variable(channel, "esf_broadcast_ip"))) {
+			switch_find_local_ip(guess_ip, sizeof(guess_ip), AF_INET);
+			esf_broadcast_ip = guess_ip;
+		}
+
+
+		if (!(rtp_port = switch_rtp_request_port(esf_broadcast_ip))) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "RTP Port Error\n");
 			goto fail;
 		}
 
-		rtp_session = switch_rtp_new(guess_ip,
+		rtp_session = switch_rtp_new(esf_broadcast_ip,
 									 rtp_port,
 									 mcast_ip,
 									 mcast_port,



More information about the Freeswitch-svn mailing list