git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4807 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2007-03-30 16:41:12 +00:00
parent 33efc5eeb5
commit 5e23936fa6
5 changed files with 102 additions and 30 deletions
+2 -3
View File
@@ -154,10 +154,9 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
}
if (encoded_data_len % 2 == 0) {
if (encoded_data_len % 12 == 0) {
if (encoded_data_len == 2 || encoded_data_len % 12 == 0) {
return SWITCH_STATUS_BREAK;
//divisor = 12;
//plen = 10;
+14 -7
View File
@@ -1,13 +1,20 @@
BASE=../../../..
DING_DIR=$(BASE)/libs/libdingaling
DINGLA=$(DING_DIR)/libdingaling.la
LOCAL_CFLAGS = `$(BASE)/libs/apr/apr-1-config --cflags --cppflags --includes`
LOCAL_CFLAGS += `$(BASE)/libs/apr-util/apu-1-config --includes`
LOCAL_CFLAGS=-I$(DING_DIR)/src
LOCAL_LIBADD=$(DINGLA)
IKS_DIR=$(BASE)/libs/iksemel
IKS_LA=$(IKS_DIR)/src/libiksemel.la
DING_DIR=$(BASE)/libs/libdingaling
LOCAL_CFLAGS += -I$(DING_DIR)/src -I$(BASE)/libs/iksemel/include
LOCAL_OBJS=$(DING_DIR)/src/libdingaling.o $(IKS_LA)
include $(BASE)/build/modmake.rules
$(DINGLA): $(DING_DIR) $(DING_DIR)/.update
cd $(DING_DIR) && $(MAKE)
$(TOUCH_TARGET)
$(IKS_LA): $(IKS_DIR) $(IKS_DIR)/.update
@cd $(IKS_DIR) && $(MAKE)
@$(TOUCH_TARGET)
+23 -20
View File
@@ -2167,28 +2167,31 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
break;
case LDL_SIGNAL_SUBSCRIBE:
if ((sql = switch_mprintf("delete from subscriptions where sub_from='%q' and sub_to='%q';\n"
"insert into subscriptions values('%q','%q','%q','%q');\n", from, to, from, to, msg, subject))) {
execute_sql(profile->dbname, sql, profile->mutex);
switch_core_db_free(sql);
}
if (is_special(to)) {
ldl_handle_send_presence(profile->handle, to, from, NULL, NULL, "Click To Call");
}
#if 0
if (is_special(to)) {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", to);
//switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
switch_event_fire(&event);
if (profile->user_flags & LDL_FLAG_COMPONENT && ldl_jid_domcmp(from, to)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Attempt to add presence from/to our own domain [%s][%s]\n", from, to);
} else {
if ((sql = switch_mprintf("delete from subscriptions where sub_from='%q' and sub_to='%q';\n"
"insert into subscriptions values('%q','%q','%q','%q');\n", from, to, from, to, msg, subject))) {
execute_sql(profile->dbname, sql, profile->mutex);
switch_core_db_free(sql);
}
if (is_special(to)) {
ldl_handle_send_presence(profile->handle, to, from, NULL, NULL, "Click To Call");
}
#if 0
if (is_special(to)) {
if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_IN) == SWITCH_STATUS_SUCCESS) {
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", MDL_CHAT_PROTO);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->login);
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "from", "%s", to);
//switch_event_add_header(event, SWITCH_STACK_BOTTOM, "rpid", "unknown");
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "status", "Click To Call");
switch_event_fire(&event);
}
}
}
#endif
}
break;
case LDL_SIGNAL_ROSTER:
if (switch_event_create(&event, SWITCH_EVENT_ROSTER) == SWITCH_STATUS_SUCCESS) {