<h1>Project "FreeSWITCH Source" received a push.</h1>
<h2>branch: master updated</h2>
<pre>
via: 45ec088753031fc60b1b1abeb25536b7ac042374 (commit)
via: 33848eb01c327b04ad3c34bb5165bb1e01891863 (commit)
from: 53aeb1c1a71e6546950721d9f79f4a6131eb3071 (commit)
</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Leon de Rooij
comments:
Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
</pre></div>
<div class="highlight"><pre>committer: Mathieu Parent
comments:
Skinny: handle Enbloc messages
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_skinny/skinny_protocol.h b/src/mod/endpoints/mod_skinny/skinny_protocol.h</span>
<span style="color: #000080; font-weight: bold">index 20e7d7f..1a26558 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_skinny/skinny_protocol.h</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_skinny/skinny_protocol.h</span>
<span style="color: #800080; font-weight: bold">@@ -68,6 +68,13 @@ struct PACKED keypad_button_message {</span>
uint32_t call_id;
};
<span style="color: #00A000">+/* EnblocCallMessage */</span>
<span style="color: #00A000">+#define ENBLOC_CALL_MESSAGE 0x0004</span>
<span style="color: #00A000">+struct PACKED enbloc_call_message {</span>
<span style="color: #00A000">+ char called_party[24];</span>
<span style="color: #00A000">+ uint32_t line_instance;</span>
<span style="color: #00A000">+};</span>
<span style="color: #00A000">+</span>
/* StimulusMessage */
#define STIMULUS_MESSAGE 0x0005
struct PACKED stimulus_message {
<span style="color: #800080; font-weight: bold">@@ -562,6 +569,7 @@ union skinny_data {</span>
struct register_message reg;
struct port_message port;
struct keypad_button_message keypad_button;
<span style="color: #00A000">+ struct enbloc_call_message enbloc_call;</span>
struct stimulus_message stimulus;
struct off_hook_message off_hook;
struct on_hook_message on_hook;
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c</span>
<span style="color: #000080; font-weight: bold">index 5874be4..e7c761d 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_skinny/skinny_server.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_skinny/skinny_server.c</span>
<span style="color: #800080; font-weight: bold">@@ -1171,6 +1171,29 @@ switch_status_t skinny_handle_keypad_button_message(listener_t *listener, skinny</span>
        return SWITCH_STATUS_SUCCESS;
}
<span style="color: #00A000">+switch_status_t skinny_handle_enbloc_call_message(listener_t *listener, skinny_message_t *request)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        uint32_t line_instance = 1;</span>
<span style="color: #00A000">+        switch_core_session_t *session = NULL;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        skinny_check_data_length(request, sizeof(request->data.enbloc_call.called_party));</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if(skinny_check_data_length_soft(request, sizeof(request->data.enbloc_call))) {</span>
<span style="color: #00A000">+                if (request->data.enbloc_call.line_instance > 0) {</span>
<span style="color: #00A000">+                        line_instance = request->data.enbloc_call.line_instance;</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        session = skinny_profile_find_session(listener->profile, listener, &line_instance, 0);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        if(session) {</span>
<span style="color: #00A000">+                skinny_session_process_dest(session, listener, line_instance, request->data.enbloc_call.called_party, '\0', 0);</span>
<span style="color: #00A000">+                switch_core_session_rwunlock(session);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
switch_status_t skinny_handle_stimulus_message(listener_t *listener, skinny_message_t *request)
{
        switch_status_t status = SWITCH_STATUS_SUCCESS;
<span style="color: #800080; font-weight: bold">@@ -2004,6 +2027,8 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re</span>
                        return skinny_handle_port_message(listener, request);
                case KEYPAD_BUTTON_MESSAGE:
                        return skinny_handle_keypad_button_message(listener, request);
<span style="color: #00A000">+                case ENBLOC_CALL_MESSAGE:</span>
<span style="color: #00A000">+                        return skinny_handle_enbloc_call_message(listener, request);</span>
                case STIMULUS_MESSAGE:
                        return skinny_handle_stimulus_message(listener, request);
                case OFF_HOOK_MESSAGE:
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.c b/src/mod/endpoints/mod_skinny/skinny_tables.c</span>
<span style="color: #000080; font-weight: bold">index 053b350..466a705 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_skinny/skinny_tables.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_skinny/skinny_tables.c</span>
<span style="color: #800080; font-weight: bold">@@ -39,6 +39,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {</span>
{"RegisterMessage", REGISTER_MESSAGE},
{"PortMessage", PORT_MESSAGE},
{"KeypadButtonMessage", KEYPAD_BUTTON_MESSAGE},
<span style="color: #00A000">+ {"EnblocCallMessage", ENBLOC_CALL_MESSAGE},</span>
{"StimulusMessage", STIMULUS_MESSAGE},
{"OffHookMessage", OFF_HOOK_MESSAGE},
{"OnHookMessage", ON_HOOK_MESSAGE},
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.h b/src/mod/endpoints/mod_skinny/skinny_tables.h</span>
<span style="color: #000080; font-weight: bold">index c119e1f..bc92f9f 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_skinny/skinny_tables.h</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_skinny/skinny_tables.h</span>
<span style="color: #800080; font-weight: bold">@@ -87,7 +87,7 @@ uint32_t func(const char *str)\</span>
}
<span style="color: #A00000">-extern struct skinny_table SKINNY_MESSAGE_TYPES[66];</span>
<span style="color: #00A000">+extern struct skinny_table SKINNY_MESSAGE_TYPES[67];</span>
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)
</pre></div>
========================================================================<pre>
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(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>