1
0
mirror of https://github.com/signalwire/freeswitch.git synced 2025-04-19 09:47:23 +00:00

Skinny: more on device types

- print device type name when doing skinny status profile internal device ...
- add 7962 and 7965
- use base10 number
This commit is contained in:
Mathieu Parent 2010-07-28 22:17:54 +02:00
parent b062eef12e
commit 59e197584c
3 changed files with 17 additions and 14 deletions
src/mod/endpoints/mod_skinny

@ -1291,7 +1291,8 @@ static int dump_device_callback(void *pArg, int argc, char **argv, char **column
stream->write_function(stream, "UserId \t%s\n", user_id);
stream->write_function(stream, "Instance \t%s\n", instance);
stream->write_function(stream, "IP \t%s\n", ip);
stream->write_function(stream, "DeviceType \t%s\n", type);
stream->write_function(stream, "DeviceTypeId \t%s\n", type);
stream->write_function(stream, "DeviceType \t%s\n", skinny_device_type2str(atoi(type)));
stream->write_function(stream, "MaxStreams \t%s\n", max_streams);
stream->write_function(stream, "Port \t%s\n", port);
stream->write_function(stream, "Codecs \t%s\n", codec_string);

@ -99,18 +99,20 @@ SKINNY_DECLARE_ID2STR(skinny_message_type2str, SKINNY_MESSAGE_TYPES, "UnknownMes
SKINNY_DECLARE_STR2ID(skinny_str2message_type, SKINNY_MESSAGE_TYPES, -1)
struct skinny_table SKINNY_DEVICE_TYPES[] = {
{"Cisco 30 SP+", 0x0001},
{"Cisco 12 SP+", 0x0002},
{"Cisco 12 SP", 0x0003},
{"Cisco 12", 0x0004},
{"Cisco 30 VIP", 0x0005},
{"Cisco IP Phone 7910", 0x0006},
{"Cisco IP Phone 7960", 0x0007},
{"Cisco IP Phone 7940", 0x0008},
{"Cisco IP Phone 7935", 0x0009},
{"Cisco ATA 186", 0x000c},
{"Cisco IP Phone 7961", 0x4275},
{"Cisco IP Phone 7936", 0x4276},
{"Cisco 30 SP+", 1},
{"Cisco 12 SP+", 2},
{"Cisco 12 SP", 3},
{"Cisco 12", 4},
{"Cisco 30 VIP", 5},
{"Cisco IP Phone 7910", 6},
{"Cisco IP Phone 7960", 7},
{"Cisco IP Phone 7940", 8},
{"Cisco IP Phone 7935", 9},
{"Cisco ATA 186", 12},
{"Cisco IP Phone CP-7962G", 404},
{"Cisco IP Phone CP-7965G", 436},
{"Cisco IP Phone CP-7961G", 30018},
{"Cisco IP Phone 7936", 30019},
{NULL, 0}
};
SKINNY_DECLARE_ID2STR(skinny_device_type2str, SKINNY_DEVICE_TYPES, "UnknownDeviceType")

@ -92,7 +92,7 @@ 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)
extern struct skinny_table SKINNY_DEVICE_TYPES[13];
extern struct skinny_table SKINNY_DEVICE_TYPES[15];
const char *skinny_device_type2str(uint32_t id);
uint32_t skinny_str2device_type(const char *str);
#define SKINNY_PUSH_DEVICE_TYPES SKINNY_DECLARE_PUSH_MATCH(SKINNY_DEVICE_TYPES)