Merge branch 'master' of ssh://git.freeswitch.org/freeswitch
This commit is contained in:
commit
45ec088753
|
@ -68,6 +68,13 @@ struct PACKED keypad_button_message {
|
||||||
uint32_t call_id;
|
uint32_t call_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* EnblocCallMessage */
|
||||||
|
#define ENBLOC_CALL_MESSAGE 0x0004
|
||||||
|
struct PACKED enbloc_call_message {
|
||||||
|
char called_party[24];
|
||||||
|
uint32_t line_instance;
|
||||||
|
};
|
||||||
|
|
||||||
/* StimulusMessage */
|
/* StimulusMessage */
|
||||||
#define STIMULUS_MESSAGE 0x0005
|
#define STIMULUS_MESSAGE 0x0005
|
||||||
struct PACKED stimulus_message {
|
struct PACKED stimulus_message {
|
||||||
|
@ -562,6 +569,7 @@ union skinny_data {
|
||||||
struct register_message reg;
|
struct register_message reg;
|
||||||
struct port_message port;
|
struct port_message port;
|
||||||
struct keypad_button_message keypad_button;
|
struct keypad_button_message keypad_button;
|
||||||
|
struct enbloc_call_message enbloc_call;
|
||||||
struct stimulus_message stimulus;
|
struct stimulus_message stimulus;
|
||||||
struct off_hook_message off_hook;
|
struct off_hook_message off_hook;
|
||||||
struct on_hook_message on_hook;
|
struct on_hook_message on_hook;
|
||||||
|
|
|
@ -1171,6 +1171,29 @@ switch_status_t skinny_handle_keypad_button_message(listener_t *listener, skinny
|
||||||
return SWITCH_STATUS_SUCCESS;
|
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 skinny_handle_stimulus_message(listener_t *listener, skinny_message_t *request)
|
||||||
{
|
{
|
||||||
switch_status_t status = SWITCH_STATUS_SUCCESS;
|
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);
|
return skinny_handle_port_message(listener, request);
|
||||||
case KEYPAD_BUTTON_MESSAGE:
|
case KEYPAD_BUTTON_MESSAGE:
|
||||||
return skinny_handle_keypad_button_message(listener, request);
|
return skinny_handle_keypad_button_message(listener, request);
|
||||||
|
case ENBLOC_CALL_MESSAGE:
|
||||||
|
return skinny_handle_enbloc_call_message(listener, request);
|
||||||
case STIMULUS_MESSAGE:
|
case STIMULUS_MESSAGE:
|
||||||
return skinny_handle_stimulus_message(listener, request);
|
return skinny_handle_stimulus_message(listener, request);
|
||||||
case OFF_HOOK_MESSAGE:
|
case OFF_HOOK_MESSAGE:
|
||||||
|
|
|
@ -39,6 +39,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
|
||||||
{"RegisterMessage", REGISTER_MESSAGE},
|
{"RegisterMessage", REGISTER_MESSAGE},
|
||||||
{"PortMessage", PORT_MESSAGE},
|
{"PortMessage", PORT_MESSAGE},
|
||||||
{"KeypadButtonMessage", KEYPAD_BUTTON_MESSAGE},
|
{"KeypadButtonMessage", KEYPAD_BUTTON_MESSAGE},
|
||||||
|
{"EnblocCallMessage", ENBLOC_CALL_MESSAGE},
|
||||||
{"StimulusMessage", STIMULUS_MESSAGE},
|
{"StimulusMessage", STIMULUS_MESSAGE},
|
||||||
{"OffHookMessage", OFF_HOOK_MESSAGE},
|
{"OffHookMessage", OFF_HOOK_MESSAGE},
|
||||||
{"OnHookMessage", ON_HOOK_MESSAGE},
|
{"OnHookMessage", ON_HOOK_MESSAGE},
|
||||||
|
|
|
@ -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);
|
const char *skinny_message_type2str(uint32_t id);
|
||||||
uint32_t skinny_str2message_type(const char *str);
|
uint32_t skinny_str2message_type(const char *str);
|
||||||
#define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)
|
#define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)
|
||||||
|
|
Loading…
Reference in New Issue