[Freeswitch-trunk] [GIT]FreeSWITCH branch master updated. git2svn-syncpoint-master-1675-g33848eb

git at svn.freeswitch.org git at svn.freeswitch.org
Tue Feb 1 10:56:36 MSK 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FreeSWITCH".

The branch, master has been updated
       via  33848eb01c327b04ad3c34bb5165bb1e01891863 (commit)
      from  2d6161e889fdaf8b03608fefdd7ef480a56ddf8b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 33848eb01c327b04ad3c34bb5165bb1e01891863
Author: Mathieu Parent <mathieu at tourthieu.sathieu.net>
Date:   Tue Feb 1 08:54:53 2011 +0100

    Skinny: handle Enbloc messages

diff --git a/src/mod/endpoints/mod_skinny/skinny_protocol.h b/src/mod/endpoints/mod_skinny/skinny_protocol.h
index 20e7d7f..1a26558 100644
--- a/src/mod/endpoints/mod_skinny/skinny_protocol.h
+++ b/src/mod/endpoints/mod_skinny/skinny_protocol.h
@@ -68,6 +68,13 @@ struct PACKED keypad_button_message {
     uint32_t call_id;
 };
 
+/* EnblocCallMessage */
+#define ENBLOC_CALL_MESSAGE 0x0004
+struct PACKED enbloc_call_message {
+    char called_party[24];
+    uint32_t line_instance;
+};
+
 /* StimulusMessage */
 #define STIMULUS_MESSAGE 0x0005
 struct PACKED stimulus_message {
@@ -562,6 +569,7 @@ union skinny_data {
     struct register_message reg;
     struct port_message port;
     struct keypad_button_message keypad_button;
+    struct enbloc_call_message enbloc_call;
     struct stimulus_message stimulus;
     struct off_hook_message off_hook;
     struct on_hook_message on_hook;
diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c
index 5874be4..e7c761d 100644
--- a/src/mod/endpoints/mod_skinny/skinny_server.c
+++ b/src/mod/endpoints/mod_skinny/skinny_server.c
@@ -1171,6 +1171,29 @@ switch_status_t skinny_handle_keypad_button_message(listener_t *listener, skinny
 	return SWITCH_STATUS_SUCCESS;
 }
 
+switch_status_t skinny_handle_enbloc_call_message(listener_t *listener, skinny_message_t *request)
+{
+	uint32_t line_instance = 1;
+	switch_core_session_t *session = NULL;
+
+	skinny_check_data_length(request, sizeof(request->data.enbloc_call.called_party));
+
+	if(skinny_check_data_length_soft(request, sizeof(request->data.enbloc_call))) {
+		if (request->data.enbloc_call.line_instance > 0) {
+			line_instance = request->data.enbloc_call.line_instance;
+		}
+	}
+
+	session = skinny_profile_find_session(listener->profile, listener, &line_instance, 0);
+
+	if(session) {
+		skinny_session_process_dest(session, listener, line_instance, request->data.enbloc_call.called_party, '\0', 0);
+		switch_core_session_rwunlock(session);
+	}
+
+	return SWITCH_STATUS_SUCCESS;
+}
+
 switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_message_t *request)
 {
 	switch_status_t status = SWITCH_STATUS_SUCCESS;
@@ -2004,6 +2027,8 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
 			return skinny_handle_port_message(listener, request);
 		case KEYPAD_BUTTON_MESSAGE:
 			return skinny_handle_keypad_button_message(listener, request);
+		case ENBLOC_CALL_MESSAGE:
+			return skinny_handle_enbloc_call_message(listener, request);
 		case STIMULUS_MESSAGE:
 			return skinny_handle_stimulus_message(listener, request);
 		case OFF_HOOK_MESSAGE:
diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.c b/src/mod/endpoints/mod_skinny/skinny_tables.c
index 053b350..466a705 100644
--- a/src/mod/endpoints/mod_skinny/skinny_tables.c
+++ b/src/mod/endpoints/mod_skinny/skinny_tables.c
@@ -39,6 +39,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
     {"RegisterMessage", REGISTER_MESSAGE},
     {"PortMessage", PORT_MESSAGE},
     {"KeypadButtonMessage", KEYPAD_BUTTON_MESSAGE},
+    {"EnblocCallMessage", ENBLOC_CALL_MESSAGE},
     {"StimulusMessage", STIMULUS_MESSAGE},
     {"OffHookMessage", OFF_HOOK_MESSAGE},
     {"OnHookMessage", ON_HOOK_MESSAGE},
diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.h b/src/mod/endpoints/mod_skinny/skinny_tables.h
index c119e1f..bc92f9f 100644
--- a/src/mod/endpoints/mod_skinny/skinny_tables.h
+++ b/src/mod/endpoints/mod_skinny/skinny_tables.h
@@ -87,7 +87,7 @@ uint32_t func(const char *str)\
     }
 
 
-extern struct skinny_table SKINNY_MESSAGE_TYPES[66];
+extern struct skinny_table SKINNY_MESSAGE_TYPES[67];
 const char *skinny_message_type2str(uint32_t id);
 uint32_t skinny_str2message_type(const char *str);
 #define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)

-----------------------------------------------------------------------

Summary of changes:
 src/mod/endpoints/mod_skinny/skinny_protocol.h |    8 +++++++
 src/mod/endpoints/mod_skinny/skinny_server.c   |   25 ++++++++++++++++++++++++
 src/mod/endpoints/mod_skinny/skinny_tables.c   |    1 +
 src/mod/endpoints/mod_skinny/skinny_tables.h   |    2 +-
 4 files changed, 35 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
FreeSWITCH



More information about the Freeswitch-trunk mailing list