From 28cea12b64bbbe0e6e148ef1a88f20525735c78e Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 May 2008 17:25:17 +0000 Subject: [PATCH] solution for MODAPP-94 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8491 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_esf/mod_esf.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mod/applications/mod_esf/mod_esf.c b/src/mod/applications/mod_esf/mod_esf.c index 430f7e6ab5..a3b7291257 100644 --- a/src/mod/applications/mod_esf/mod_esf.c +++ b/src/mod/applications/mod_esf/mod_esf.c @@ -76,6 +76,8 @@ SWITCH_STANDARD_APP(bcast_function) 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_STANDARD_APP(bcast_function) } } - 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,