[Freeswitch-svn] [commit] r7166 - in freeswitch/trunk: conf/autoload_configs conf/directory/default src/mod/endpoints/mod_sofia src/mod/formats/mod_local_stream

Freeswitch SVN anthm at freeswitch.org
Thu Jan 10 19:55:02 EST 2008


Author: anthm
Date: Thu Jan 10 19:55:02 2008
New Revision: 7166

Modified:
   freeswitch/trunk/conf/autoload_configs/conference.conf.xml
   freeswitch/trunk/conf/directory/default/1000.xml
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
   freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c

Log:
update size of unacceptable buffer space on local_stream

Modified: freeswitch/trunk/conf/autoload_configs/conference.conf.xml
==============================================================================
--- freeswitch/trunk/conf/autoload_configs/conference.conf.xml	(original)
+++ freeswitch/trunk/conf/autoload_configs/conference.conf.xml	Thu Jan 10 19:55:02 2008
@@ -52,7 +52,7 @@
       <!-- If TTS is enabled all audio-file params beginning with -->
       <!-- 'say:' will be considered text to say with TTS -->
       <!-- Set a default path here so you can use relative paths in the other sound params-->
-      <param name="sound-prefix" value="${base_dir}/en/us/callie"/>
+      <param name="sound-prefix" value="$${base_dir}/sounds/en/us/callie"/>
       <!-- File to play to acknowledge succees -->
       <!--<param name="ack-sound" value="beep.wav"/>-->
       <!-- File to play to acknowledge failure -->

Modified: freeswitch/trunk/conf/directory/default/1000.xml
==============================================================================
--- freeswitch/trunk/conf/directory/default/1000.xml	(original)
+++ freeswitch/trunk/conf/directory/default/1000.xml	Thu Jan 10 19:55:02 2008
@@ -1,5 +1,17 @@
 <include>
   <user id="1000" mailbox="1000">
+    <mailboxes>
+      <mailbox id="1001"/>
+      <mailbox id="1002"/>
+      <mailbox id="1003"/>
+      <mailbox id="1004"/>
+      <mailbox id="1005"/>
+      <mailbox id="1006"/>
+      <mailbox id="1007"/>
+      <mailbox id="1008"/>
+      <mailbox id="1009"/>
+      <mailbox id="1010"/>
+    </mailboxes>
     <params>
       <param name="password" value="1234"/>
       <param name="vm-password" value="1000"/>

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Thu Jan 10 19:55:02 2008
@@ -186,7 +186,7 @@
 
 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 @@
 	
 	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 @@
 		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 @@
 		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);
 		}

Modified: freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c
==============================================================================
--- freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	(original)
+++ freeswitch/trunk/src/mod/formats/mod_local_stream/mod_local_stream.c	Thu Jan 10 19:55:02 2008
@@ -202,7 +202,7 @@
 						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 {



More information about the Freeswitch-svn mailing list