diff --git a/src/mod/endpoints/mod_skinny/skinny_protocol.h b/src/mod/endpoints/mod_skinny/skinny_protocol.h index 4ea82ec057..3b0309a5ac 100644 --- a/src/mod/endpoints/mod_skinny/skinny_protocol.h +++ b/src/mod/endpoints/mod_skinny/skinny_protocol.h @@ -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 */ diff --git a/src/mod/endpoints/mod_skinny/skinny_server.c b/src/mod/endpoints/mod_skinny/skinny_server.c index e58cccdc9f..5b771c23ff 100644 --- a/src/mod/endpoints/mod_skinny/skinny_server.c +++ b/src/mod/endpoints/mod_skinny/skinny_server.c @@ -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: diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.c b/src/mod/endpoints/mod_skinny/skinny_tables.c index 9c053d6b58..b4917bf475 100644 --- a/src/mod/endpoints/mod_skinny/skinny_tables.c +++ b/src/mod/endpoints/mod_skinny/skinny_tables.c @@ -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"}, diff --git a/src/mod/endpoints/mod_skinny/skinny_tables.h b/src/mod/endpoints/mod_skinny/skinny_tables.h index 4fea984756..f766cbe13d 100644 --- a/src/mod/endpoints/mod_skinny/skinny_tables.h +++ b/src/mod/endpoints/mod_skinny/skinny_tables.h @@ -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)