mod_skinny: add stub for media resource notification message sent by VG224

This commit is contained in:
Nathan Neulinger 2014-06-18 11:54:49 -05:00
parent 840f7e69dd
commit 296c489143
4 changed files with 24 additions and 1 deletions

View File

@ -250,6 +250,15 @@ struct PACKED headset_status_message {
uint32_t mode; /* 1=HeadsetOn; 2=HeadsetOff */
};
/* MediaResourceNotification */
#define MEDIA_RESOURCE_MESSAGE 0x002C
struct PACKED media_resource_message {
uint32_t device_type;
uint32_t streams_in_service;
uint32_t max_streams_per_conf;
uint32_t streams_out_of_service;
};
/* RegisterAvailableLinesMessage */
#define REGISTER_AVAILABLE_LINES_MESSAGE 0x002D
struct PACKED register_available_lines_message {
@ -866,6 +875,7 @@ union skinny_data {
/* no data for UNREGISTER_MESSAGE */
/* no data for SOFT_KEY_TEMPLATE_REQ_MESSAGE */
struct headset_status_message headset_status;
struct media_resource_message media_resource;
struct register_available_lines_message reg_lines;
/* see field "data" for DEVICE_TO_USER_DATA_MESSAGE */
/* see field "data" for DEVICE_TO_USER_DATA_RESPONSE_MESSAGE */

View File

@ -2140,6 +2140,16 @@ switch_status_t skinny_headset_status_message(listener_t *listener, skinny_messa
return SWITCH_STATUS_SUCCESS;
}
switch_status_t skinny_handle_media_resource_message(listener_t *listener, skinny_message_t *request)
{
skinny_check_data_length(request, sizeof(request->data.media_resource));
skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Handle Media Resource Notification\n");
/* Do nothing */
return SWITCH_STATUS_SUCCESS;
}
switch_status_t skinny_handle_register_available_lines_message(listener_t *listener, skinny_message_t *request)
{
skinny_check_data_length(request, sizeof(request->data.reg_lines));
@ -2471,6 +2481,8 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
return skinny_handle_unregister(listener, request);
case SOFT_KEY_TEMPLATE_REQ_MESSAGE:
return skinny_handle_soft_key_template_request(listener, request);
case MEDIA_RESOURCE_MESSAGE:
return skinny_handle_media_resource_message(listener, request);
case HEADSET_STATUS_MESSAGE:
return skinny_headset_status_message(listener, request);
case REGISTER_AVAILABLE_LINES_MESSAGE:

View File

@ -57,6 +57,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
{SOFT_KEY_EVENT_MESSAGE, "SoftKeyEventMessage"},
{UNREGISTER_MESSAGE, "UnregisterMessage"},
{SOFT_KEY_TEMPLATE_REQ_MESSAGE, "SoftKeyTemplateReqMessage"},
{MEDIA_RESOURCE_MESSAGE, "MediaResourceNotificationMessage"},
{HEADSET_STATUS_MESSAGE, "HeadsetStatusMessage"},
{REGISTER_AVAILABLE_LINES_MESSAGE, "RegisterAvailableLinesMessage"},
{DEVICE_TO_USER_DATA_MESSAGE, "DeviceToUserDataMessage"},

View File

@ -87,7 +87,7 @@ if (my_matches) {\
}
extern struct skinny_table SKINNY_MESSAGE_TYPES[75];
extern struct skinny_table SKINNY_MESSAGE_TYPES[76];
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)