From aef982dd09664e70cf77d1d8df51eead3bbd7d14 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 5 May 2014 21:26:34 +0000 Subject: [PATCH 1/5] Work around Mac's broken sed sed on Mac is apparently incredibly broken and incapable of adding newlines. `printf 'x' | sed 's/x/\n/'` results in 'n' on Mac rather than a newline. GNU sed even in --posix mode does not agree with this behavior. None the less, we can work around it here. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index e1ba8b502e..39e8063276 100644 --- a/configure.ac +++ b/configure.ac @@ -602,7 +602,7 @@ PLATFORM_CORE_LDFLAGS= PLATFORM_CORE_LIBS= path_remove () { - echo "$1" | sed 's/:/\n/g' | grep -Fxv "$2" | tr '\n' ':' | sed 's/:$/\n/' + echo "$1" | tr ':' '\n' | grep -Fxv "$2" | tr '\n' ':' | sed 's/:$//' } path_push_unique () { x="$(eval echo \$$1)" From 0a56e643b13cfb1cb5546a3ff0ae962f93ce8602 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Mon, 5 May 2014 21:38:52 +0000 Subject: [PATCH 2/5] Avoid training :'s in paths When the path was empty, path_push_unique would cause a training colon to be added. This was a known issue that didn't cause any harm, but while we're here, we'll clean this up. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 39e8063276..10087e3b0b 100644 --- a/configure.ac +++ b/configure.ac @@ -607,7 +607,11 @@ path_remove () { path_push_unique () { x="$(eval echo \$$1)" x="$(path_remove "$x" "$2")" - eval export $1="$2:$x" + if test -z "$x"; then + eval export $1="$2" + else + eval export $1="$2:$x" + fi } # tweak platform specific flags From 0a2ba8869a63d83d6cb9224dc174b4b46e99a5ee Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 6 May 2014 04:10:19 +0500 Subject: [PATCH 3/5] sofia is treating all notify sending as if they were natted rather than when nat is detected. This causes issues on some polycoms that use strange ports in their contact for getting notifies that do not match the port the calls come from --- src/mod/endpoints/mod_sofia/sofia_presence.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index bf5c0197dd..1cd8556d4c 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -2253,10 +2253,6 @@ static void _send_presence_notify(sofia_profile_t *profile, if (dst->route_uri) { route_uri = sofia_glue_strip_uri(dst->route_uri); - } else { - if (remote_ip && remote_port) { - route_uri = switch_mprintf("sip:user@%s:%s;transport=%s", remote_ip, remote_port, tp); - } } if (expires) { From 3ff3f327eef8ef184c4f500709c64665acd44545 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 5 May 2014 19:18:58 -0400 Subject: [PATCH 4/5] FS-6484: guess at fixing seg from mod_managed, this function should never be called without a channel, but if it does, throw an error instead --- src/switch_cpp.cpp | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 7e78f73804..f0bb64f53b 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -1348,19 +1348,24 @@ SWITCH_DECLARE(void) bridge(CoreSession &session_a, CoreSession &session_b) SWITCH_DECLARE_NONSTD(switch_status_t) hanguphook(switch_core_session_t *session_hungup) { - switch_channel_t *channel = switch_core_session_get_channel(session_hungup); - CoreSession *coresession = NULL; - switch_channel_state_t state = switch_channel_get_state(channel); + if (session_hungup) { + switch_channel_t *channel = switch_core_session_get_channel(session_hungup); + CoreSession *coresession = NULL; + switch_channel_state_t state = switch_channel_get_state(channel); - if ((coresession = (CoreSession *) switch_channel_get_private(channel, "CoreSession"))) { - if (coresession->hook_state != state) { - coresession->cause = switch_channel_get_cause(channel); - coresession->hook_state = state; - coresession->check_hangup_hook(); + if ((coresession = (CoreSession *) switch_channel_get_private(channel, "CoreSession"))) { + if (coresession->hook_state != state) { + coresession->cause = switch_channel_get_cause(channel); + coresession->hook_state = state; + coresession->check_hangup_hook(); + } } - } - return SWITCH_STATUS_SUCCESS; + return SWITCH_STATUS_SUCCESS; + } else { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "hangup hook called with null session, something is horribly wrong\n"); + return SWITCH_STATUS_FALSE; + } } From f809d406eb14a6ad79527d77b0395750036649f9 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Mon, 5 May 2014 19:22:52 -0400 Subject: [PATCH 5/5] add quickie targets for fr sounds --- Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index 3fa74e029d..d71e061e79 100644 --- a/Makefile.am +++ b/Makefile.am @@ -61,6 +61,8 @@ sounds: sounds-en-us-callie-8000 sounds-install: sounds-en-us-callie-8000-install sounds-ru: sounds-ru-RU-elena-8000 sounds-ru-install: sounds-ru-RU-elena-8000-install +sounds-fr: sounds-fr-ca-june-8000 +sounds-fr-install: sounds-fr-ca-june-8000-install moh: sounds-music-8000 moh-install: sounds-music-8000-install @@ -68,6 +70,8 @@ hd-sounds: sounds sounds-en-us-callie-16000 hd-sounds-install: sounds-install sounds-en-us-callie-16000-install hd-sounds-ru: sounds-ru sounds-ru-RU-elena-16000 hd-sounds-ru-install: sounds-ru-install sounds-ru-RU-elena-16000-install +hd-sounds-fr: sounds-fr-ca-june-16000 +hd-sounds-fr-install: sounds-fr-ca-june-16000-install hd-moh: moh sounds-music-16000 hd-moh-install: moh-install sounds-music-16000-install @@ -75,6 +79,8 @@ uhd-sounds: hd-sounds sounds-en-us-callie-32000 uhd-sounds-install: hd-sounds-install sounds-en-us-callie-32000-install uhd-sounds-ru: hd-sounds-ru sounds-ru-RU-elena-32000 uhd-sounds-ru-install: hd-sounds-ru-install sounds-ru-RU-elena-32000-install +uhd-sounds-fr: sounds-fr-ca-june-32000 +uhd-sounds-fr-install: sounds-fr-ca-june-32000-install uhd-moh: hd-moh sounds-music-32000 uhd-moh-install: hd-moh-install sounds-music-32000-install @@ -82,6 +88,8 @@ cd-sounds: uhd-sounds sounds-en-us-callie-48000 cd-sounds-install: uhd-sounds-install sounds-en-us-callie-48000-install cd-sounds-ru: uhd-sounds-ru sounds-ru-RU-elena-48000 cd-sounds-ru-install: uhd-sounds-ru-install sounds-ru-RU-elena-48000-install +cd-sounds-fr: sounds-fr-ca-june-48000 +cd-sounds-fr-install: sounds-fr-ca-june-48000-install cd-moh: uhd-moh sounds-music-48000 cd-moh-install: uhd-moh-install sounds-music-48000-install