]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: more on device types
authorMathieu Parent <math.parent@gmail.com>
Wed, 28 Jul 2010 20:17:54 +0000 (22:17 +0200)
committerMathieu Parent <math.parent@gmail.com>
Wed, 28 Jul 2010 20:17:54 +0000 (22:17 +0200)
- print device type name when doing skinny status profile internal device ...
- add 7962 and 7965
- use base10 number

src/mod/endpoints/mod_skinny/mod_skinny.c
src/mod/endpoints/mod_skinny/skinny_tables.c
src/mod/endpoints/mod_skinny/skinny_tables.h

index e506f142af59c4c7bbe7e1eb24c176f0ff8316d5..d231d822d4765be4a39b91702b814f6214ccfdb6 100644 (file)
@@ -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);
index ac16b6509fb96a320e9a1ea78303f084e535f9ee..d9f0aad0ef04734aa77f6152a89117477877e478 100644 (file)
@@ -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")
index 09c2b229c8b3798dae0462c97600cbbae9374b9d..0b2c5442427a316ed5bdd6d38d1fcdf629efab7f 100644 (file)
@@ -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)