diff --git a/conf/autoload_configs/conference.conf.xml b/conf/autoload_configs/conference.conf.xml
index 6c6efde96f..b6d4a340a9 100644
--- a/conf/autoload_configs/conference.conf.xml
+++ b/conf/autoload_configs/conference.conf.xml
@@ -52,7 +52,7 @@
-
+
diff --git a/conf/directory/default/1000.xml b/conf/directory/default/1000.xml
index d230325c4c..408b3b3582 100644
--- a/conf/directory/default/1000.xml
+++ b/conf/directory/default/1000.xml
@@ -1,5 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c
index e579355d28..e649455d74 100644
--- a/src/mod/endpoints/mod_sofia/sofia_presence.c
+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c
@@ -186,7 +186,7 @@ char *sofia_presence_translate_rpid(char *in, char *ext)
void sofia_presence_mwi_event_handler(switch_event_t *event)
{
- char *account, *dup_account, *yn, *host, *user;
+ char *account, *registered_account, *dup_account, *yn, *host, *user;
char *sql;
sofia_profile_t *profile = NULL;
switch_stream_handle_t stream = { 0 };
@@ -195,7 +195,9 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
switch_assert(event != NULL);
- if (!(account = switch_event_get_header(event, "mwi-message-account"))) {
+ registered_account = switch_event_get_header(event, "registered-message-account");
+
+ if(!(account = switch_event_get_header(event, "mwi-message-account"))) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Message-Account'\n");
return;
}
@@ -204,8 +206,11 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Messages-Waiting'\n");
return;
}
-
- dup_account = strdup(account);
+ if (!switch_strlen_zero(registered_account)) {
+ dup_account = strdup(registered_account);
+ } else {
+ dup_account = strdup(account);
+ }
switch_assert(dup_account != NULL);
sofia_glue_get_user_host(dup_account, &user, &host);
@@ -220,10 +225,13 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
if (!strncasecmp(hp->name, "mwi-", 4)) {
char *tmp = NULL;
char *value = hp->value;
+
if (!strcasecmp(hp->name, "mwi-message-account") && strncasecmp(hp->value, "sip:", 4)) {
tmp = switch_mprintf("sip:%s", hp->value);
value = tmp;
}
+
+
stream.write_function(&stream, "%s: %s\r\n", hp->name + 4, value);
switch_safe_free(tmp);
}
diff --git a/src/mod/formats/mod_local_stream/mod_local_stream.c b/src/mod/formats/mod_local_stream/mod_local_stream.c
index 9275d9cb7a..2e9eeedaa0 100644
--- a/src/mod/formats/mod_local_stream/mod_local_stream.c
+++ b/src/mod/formats/mod_local_stream/mod_local_stream.c
@@ -202,7 +202,7 @@ static void *SWITCH_THREAD_FUNC read_stream_thread(switch_thread_t *thread, void
switch_mutex_lock(source->mutex);
for (cp = source->context_list; cp; cp = cp->next) {
switch_mutex_lock(cp->audio_mutex);
- if (switch_buffer_inuse(cp->audio_buffer) > source->samples * 128) {
+ if (switch_buffer_inuse(cp->audio_buffer) > source->samples * 768) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Leaking stream handle! [%s() %s:%d]\n", cp->func, cp->file, cp->line);
switch_buffer_zero(cp->audio_buffer);
} else {