提交 715d250e authored 作者: Mathieu Parent's avatar Mathieu Parent

Skinny: handle new XMLAlarmMessage

This add support for new SCCP Firmware 9.1

(part of FS-2912)
上级 a95af703
...@@ -547,6 +547,9 @@ struct PACKED service_url_stat_res_message { ...@@ -547,6 +547,9 @@ struct PACKED service_url_stat_res_message {
#define USER_TO_DEVICE_DATA_VERSION1_MESSAGE 0x013F #define USER_TO_DEVICE_DATA_VERSION1_MESSAGE 0x013F
/* See struct PACKED extended_data_message */ /* See struct PACKED extended_data_message */
/* XMLAlarmMessage */
#define XML_ALARM_MESSAGE 0x015A
/*****************************************************************************/ /*****************************************************************************/
/* SKINNY MESSAGE */ /* SKINNY MESSAGE */
/*****************************************************************************/ /*****************************************************************************/
......
...@@ -1970,7 +1970,7 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re ...@@ -1970,7 +1970,7 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
"Received %s (type=%x,length=%d) from %s:%d.\n", skinny_message_type2str(request->type), request->type, request->length, "Received %s (type=%x,length=%d) from %s:%d.\n", skinny_message_type2str(request->type), request->type, request->length,
listener->device_name, listener->device_instance); listener->device_name, listener->device_instance);
} }
if(zstr(listener->device_name) && request->type != REGISTER_MESSAGE && request->type != ALARM_MESSAGE) { if(zstr(listener->device_name) && request->type != REGISTER_MESSAGE && request->type != ALARM_MESSAGE && request->type != XML_ALARM_MESSAGE) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Device should send a register message first.\n"); "Device should send a register message first.\n");
return SWITCH_STATUS_FALSE; return SWITCH_STATUS_FALSE;
......
...@@ -99,6 +99,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = { ...@@ -99,6 +99,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
{"DisplayPriNotifyMessage", DISPLAY_PRI_NOTIFY_MESSAGE}, {"DisplayPriNotifyMessage", DISPLAY_PRI_NOTIFY_MESSAGE},
{"ServiceUrlStatMessage", SERVICE_URL_STAT_RES_MESSAGE}, {"ServiceUrlStatMessage", SERVICE_URL_STAT_RES_MESSAGE},
{"UserToDeviceDataVersion1Message", USER_TO_DEVICE_DATA_VERSION1_MESSAGE}, {"UserToDeviceDataVersion1Message", USER_TO_DEVICE_DATA_VERSION1_MESSAGE},
{"XMLAlarmMessage", XML_ALARM_MESSAGE},
{NULL, 0} {NULL, 0}
}; };
SKINNY_DECLARE_ID2STR(skinny_message_type2str, SKINNY_MESSAGE_TYPES, "UnknownMessage") SKINNY_DECLARE_ID2STR(skinny_message_type2str, SKINNY_MESSAGE_TYPES, "UnknownMessage")
......
...@@ -87,7 +87,7 @@ uint32_t func(const char *str)\ ...@@ -87,7 +87,7 @@ uint32_t func(const char *str)\
} }
extern struct skinny_table SKINNY_MESSAGE_TYPES[65]; extern struct skinny_table SKINNY_MESSAGE_TYPES[66];
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)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论