Skinny: handle new XMLAlarmMessage

This add support for new SCCP Firmware 9.1

(part of FS-2912)
This commit is contained in:
Mathieu Parent 2010-12-15 21:29:52 +01:00
parent a95af70323
commit 715d250e17
4 changed files with 6 additions and 2 deletions

View File

@ -547,6 +547,9 @@ struct PACKED service_url_stat_res_message {
#define USER_TO_DEVICE_DATA_VERSION1_MESSAGE 0x013F
/* See struct PACKED extended_data_message */
/* XMLAlarmMessage */
#define XML_ALARM_MESSAGE 0x015A
/*****************************************************************************/
/* SKINNY MESSAGE */
/*****************************************************************************/

View File

@ -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,
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,
"Device should send a register message first.\n");
return SWITCH_STATUS_FALSE;

View File

@ -99,6 +99,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
{"DisplayPriNotifyMessage", DISPLAY_PRI_NOTIFY_MESSAGE},
{"ServiceUrlStatMessage", SERVICE_URL_STAT_RES_MESSAGE},
{"UserToDeviceDataVersion1Message", USER_TO_DEVICE_DATA_VERSION1_MESSAGE},
{"XMLAlarmMessage", XML_ALARM_MESSAGE},
{NULL, 0}
};
SKINNY_DECLARE_ID2STR(skinny_message_type2str, SKINNY_MESSAGE_TYPES, "UnknownMessage")

View File

@ -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);
uint32_t skinny_str2message_type(const char *str);
#define SKINNY_PUSH_MESSAGE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_MESSAGE_TYPES)