Skip to content

Commit bdadfcc

Browse files
committed
Update Phone
1 parent 386d49c commit bdadfcc

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • src/Analyser/Header/Useragent/Device

src/Analyser/Header/Useragent/Device/Phone.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ const Constants = require('../../../../constants');
55
class Phone {
66
static detectPhone(ua) {
77
Phone.detectNttTeless.call(this, ua);
8+
Phone.detectSnom.call(this, ua);
89
}
910

10-
/* Casio */
11+
/* NTT Teless */
1112
static detectNttTeless(ua) {
1213
if (/Product=NTT\/Teless/iu.test(ua)) {
1314
this.data.device.manufacturer = 'NTT';
@@ -17,6 +18,18 @@ class Phone {
1718
this.data.device.subtype = Constants.deviceSubType.DESKTOP;
1819
}
1920
}
21+
22+
/* SNOM */
23+
static detectSnom(ua) {
24+
let match;
25+
if ((match = /snom(.+)-SIP/iu.exec(ua))) {
26+
this.data.device.manufacturer = 'SNOM';
27+
this.data.device.model = match[1] + ' IP Telephone';
28+
this.data.device.identified |= Constants.id.MATCH_UA;
29+
this.data.device.type = Constants.deviceType.MOBILE;
30+
this.data.device.subtype = Constants.deviceSubType.DESKTOP;
31+
}
32+
}
2033
}
2134

2235
module.exports = Phone;

0 commit comments

Comments
 (0)