Commit a3472a346deae2225ea34276c99d1e677e114e24
1 parent
d46698ccca
Exists in
master
modem msisdn on matrix
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
lib/partner-mkios.js
... | ... | @@ -61,6 +61,7 @@ modem.on('open', function() { |
61 | 61 | modem.on('imsi', function(imsi) { |
62 | 62 | logger.verbose('IMSI: ' + imsi); |
63 | 63 | matrix.modem.imsi = imsi; |
64 | + matrix.modem.msisdn = chips && chips.by_imsi && chips.by_imsi[imsi] && chips.by_imsi[imsi].msisdn ? chips.by_imsi[imsi].msisdn : config.partner.msisdn; | |
64 | 65 | }) |
65 | 66 | |
66 | 67 | |
... | ... | @@ -328,9 +329,8 @@ function report(data) { |
328 | 329 | data.message = 'CHIP-IMSI: ' + matrix.modem.imsi + '; ' + data.message; |
329 | 330 | } |
330 | 331 | |
331 | - const msisdn = chips && chips.by_imsi && chips.by_imsi[imsi] && chips.by_imsi[imsi].msisdn ? chips.by_imsi[imsi].msisdn : config.partner.msisdn; | |
332 | - if (msisdn) { | |
333 | - data.message = 'CHIP-MSISDN: ' + msisdn + '; ' + data.message; | |
332 | + if (matrix.modem.msisdn) { | |
333 | + data.message = 'CHIP-MSISDN: ' + matrix.modem.msisdn + '; ' + data.message; | |
334 | 334 | } |
335 | 335 | } |
336 | 336 | pullgw.report(data); |