Skinny: incomplete support for DialedPhoneBookMessage
This commit is contained in:
parent
5d2a13ade4
commit
4a494ff930
|
@ -234,6 +234,15 @@ struct PACKED extended_data_message {
|
|||
#define DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE 0x0042
|
||||
/* See struct PACKED extended_data_message */
|
||||
|
||||
/* DialedPhoneBookMessage */
|
||||
#define DIALED_PHONE_BOOK_MESSAGE 0x0048
|
||||
struct PACKED dialed_phone_book_message {
|
||||
uint32_t number_index; /* must be shifted 4 bits right */
|
||||
uint32_t line_instance;
|
||||
uint32_t unknown;
|
||||
char phone_number[256];
|
||||
};
|
||||
|
||||
/* RegisterAckMessage */
|
||||
#define REGISTER_ACK_MESSAGE 0x0081
|
||||
struct PACKED register_ack_message {
|
||||
|
@ -573,6 +582,15 @@ struct PACKED service_url_stat_res_message {
|
|||
#define USER_TO_DEVICE_DATA_VERSION1_MESSAGE 0x013F
|
||||
/* See struct PACKED extended_data_message */
|
||||
|
||||
/* DialedPhoneBookAckMessage */
|
||||
#define DIALED_PHONE_BOOK_ACK_MESSAGE 0x0152
|
||||
struct PACKED dialed_phone_book_ack_message {
|
||||
uint32_t number_index; /* must be shifted 4 bits right */
|
||||
uint32_t line_instance;
|
||||
uint32_t unknown;
|
||||
uint32_t unknown2;
|
||||
};
|
||||
|
||||
/* XMLAlarmMessage */
|
||||
#define XML_ALARM_MESSAGE 0x015A
|
||||
|
||||
|
@ -614,6 +632,7 @@ union skinny_data {
|
|||
struct feature_stat_req_message feature_req;
|
||||
/* see field "extended_data" for DEVICE_TO_USER_DATA_VERSION1_MESSAGE */
|
||||
/* see field "extended_data" for DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE */
|
||||
struct dialed_phone_book_message dialed_phone_book;
|
||||
struct register_ack_message reg_ack;
|
||||
struct start_tone_message start_tone;
|
||||
struct stop_tone_message stop_tone;
|
||||
|
@ -651,6 +670,7 @@ union skinny_data {
|
|||
struct display_pri_notify_message display_pri_notify;
|
||||
struct service_url_stat_res_message service_url_res;
|
||||
/* see field "extended_data" for USER_TO_DEVICE_DATA_VERSION1_MESSAGE */
|
||||
struct dialed_phone_book_ack_message dialed_phone_book_ack;
|
||||
|
||||
struct data_message data;
|
||||
struct extended_data_message extended_data;
|
||||
|
|
|
@ -2012,6 +2012,22 @@ switch_status_t skinny_handle_extended_data_message(listener_t *listener, skinny
|
|||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
switch_status_t skinny_handle_dialed_phone_book_message(listener_t *listener, skinny_message_t *request)
|
||||
{
|
||||
skinny_message_t *message;
|
||||
|
||||
skinny_check_data_length(request, sizeof(request->data.dialed_phone_book));
|
||||
|
||||
message = switch_core_alloc(listener->pool, 12+sizeof(message->data.dialed_phone_book_ack));
|
||||
message->type = DIALED_PHONE_BOOK_ACK_MESSAGE;
|
||||
message->length = 4 + sizeof(message->data.dialed_phone_book_ack);
|
||||
message->data.dialed_phone_book_ack.number_index = request->data.dialed_phone_book.number_index;
|
||||
message->data.dialed_phone_book_ack.line_instance = request->data.dialed_phone_book.line_instance;
|
||||
message->data.dialed_phone_book_ack.unknown = request->data.dialed_phone_book.unknown;
|
||||
message->data.dialed_phone_book_ack.unknown2 = 0;
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
switch_status_t skinny_handle_xml_alarm(listener_t *listener, skinny_message_t *request)
|
||||
{
|
||||
|
@ -2106,6 +2122,8 @@ switch_status_t skinny_handle_request(listener_t *listener, skinny_message_t *re
|
|||
return skinny_handle_extended_data_message(listener, request);
|
||||
case DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE:
|
||||
return skinny_handle_extended_data_message(listener, request);
|
||||
case DIALED_PHONE_BOOK_MESSAGE:
|
||||
return skinny_handle_dialed_phone_book_message(listener, request);
|
||||
case XML_ALARM_MESSAGE:
|
||||
return skinny_handle_xml_alarm(listener, request);
|
||||
default:
|
||||
|
|
|
@ -65,6 +65,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
|
|||
{FEATURE_STAT_REQ_MESSAGE, "FeatureStatReqMessage"},
|
||||
{DEVICE_TO_USER_DATA_VERSION1_MESSAGE, "DeviceToUserDataVersion1Message"},
|
||||
{DEVICE_TO_USER_DATA_RESPONSE_VERSION1_MESSAGE, "DeviceToUserDataResponseVersion1Message"},
|
||||
{DIALED_PHONE_BOOK_MESSAGE, "DialedPhoneBookMessage"},
|
||||
{REGISTER_ACK_MESSAGE, "RegisterAckMessage"},
|
||||
{START_TONE_MESSAGE, "StartToneMessage"},
|
||||
{STOP_TONE_MESSAGE, "StopToneMessage"},
|
||||
|
@ -102,6 +103,7 @@ struct skinny_table SKINNY_MESSAGE_TYPES[] = {
|
|||
{DISPLAY_PRI_NOTIFY_MESSAGE, "DisplayPriNotifyMessage"},
|
||||
{SERVICE_URL_STAT_RES_MESSAGE, "ServiceUrlStatMessage"},
|
||||
{USER_TO_DEVICE_DATA_VERSION1_MESSAGE, "UserToDeviceDataVersion1Message"},
|
||||
{DIALED_PHONE_BOOK_ACK_MESSAGE, "DialedPhoneBookAckMessage"},
|
||||
{XML_ALARM_MESSAGE, "XMLAlarmMessage"},
|
||||
{0, NULL}
|
||||
};
|
||||
|
|
|
@ -87,7 +87,7 @@ uint32_t func(const char *str)\
|
|||
}
|
||||
|
||||
|
||||
extern struct skinny_table SKINNY_MESSAGE_TYPES[69];
|
||||
extern struct skinny_table SKINNY_MESSAGE_TYPES[71];
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue