Adding random uuid to message id if not assigned. It makes sure that the DLR's are mapped properly for smpp clients.

This commit is contained in:
Qasim Ayyaz Khan
2018-03-09 11:27:57 +00:00
parent 8f34bded65
commit 20c3b87ea7
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ const topLogPrefix = 'larvitsmpp: lib/session.js: ',
utils = require('./utils'), utils = require('./utils'),
async = require('async'), async = require('async'),
defs = require('./defs'), defs = require('./defs'),
uuid = require('uuid/v1'),
log = require('winston'); log = require('winston');
/** /**
@@ -32,7 +33,7 @@ function smsResp(status, cb) {
} }
if (sms.smsId === undefined) { if (sms.smsId === undefined) {
sms.smsId = ''; sms.smsId = uuid();
} }
// Accept a generic positive status // Accept a generic positive status
+1
View File
@@ -13,6 +13,7 @@
"iconv-lite": "^0.4.18", "iconv-lite": "^0.4.18",
"moment": "^2.18.1", "moment": "^2.18.1",
"utils-merge": "^1.0.0", "utils-merge": "^1.0.0",
"uuid": "^3.2.1",
"winston": "^2.3.1" "winston": "^2.3.1"
}, },
"description": "Simplified SMPP implementation", "description": "Simplified SMPP implementation",