Commit 37d0dbf8ab6b30b8e375ef7a1c6bab0888638536

Authored by Adhidarma Hadiwinoto
1 parent 1d6334a9bf
Exists in master

Tangkap CMS ERROR

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

lib/serialport-parsers.js
... ... @@ -171,6 +171,9 @@ parserReadline.on('data', (data) => {
171 171 } else if (isResultCodeIs(data, 'CMGS')) {
172 172 logger.verbose('Got CMGS report', { data: data.toString() });
173 173 if (typeof smsSentCallback === 'function') smsSentCallback(data.toString());
  174 + } else if (isResultCodeIs(data, 'CMS ERROR')) {
  175 + logger.verbose('Got CMS ERROR report', { data: data.toString() });
  176 + if (typeof smsSentCallback === 'function') smsSentCallback(data.toString());
174 177 }
175 178 });
176 179