From a252b74f4d56868d4b271977bd8ec76d78782cc6 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 20 May 2008 17:28:21 +0000 Subject: [PATCH] solution for MODAPP-94 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8492 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/applications/mod_esf/mod_esf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_esf/mod_esf.c b/src/mod/applications/mod_esf/mod_esf.c index a3b7291257..cd7bd9ac04 100644 --- a/src/mod/applications/mod_esf/mod_esf.c +++ b/src/mod/applications/mod_esf/mod_esf.c @@ -76,7 +76,7 @@ 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; + const char *esf_broadcast_ip = NULL, *var; if (!switch_strlen_zero((char *) data)) { @@ -85,6 +85,10 @@ SWITCH_STANDARD_APP(bcast_function) argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))); + if ((var = switch_channel_get_variable(channel, "esf_multicast_ip"))) { + mcast_ip = switch_core_session_strdup(session, var); + } + if (!switch_strlen_zero(argv[0])) { mcast_ip = argv[0]; } @@ -167,7 +171,9 @@ SWITCH_STANDARD_APP(bcast_function) } } - if (!(esf_broadcast_ip = switch_channel_get_variable(channel, "esf_broadcast_ip"))) { + if ((var = switch_channel_get_variable(channel, "esf_broadcast_ip"))) { + esf_broadcast_ip = switch_core_session_strdup(session, var); + } else { switch_find_local_ip(guess_ip, sizeof(guess_ip), AF_INET); esf_broadcast_ip = guess_ip; }