You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per SMPP specification the submit_sm_resp command cannot have body if the status is not a zero. It's not respected by library and so you end up with:
../node_modules/smpp/lib/defs.js:70
value.copy(buffer, offset);
^
TypeError: Cannot call method 'copy' of undefined
at Object.types.cstring.write (../node_modules/smpp/lib/defs.js:70:10)
at PDU.toBuffer (../node_modules/smpp/lib/pdu.js:136:20)
at Session.send (../node_modules/smpp/lib/smpp.js:73:24)
at Session.onPdu (../main.js:152:23)
at Session.emit (events.js:95:17)
at Session._extractPDUs (../node_modules/smpp/lib/smpp.js:52:8)
at Socket.<anonymous> (../node_modules/smpp/lib/smpp.js:29:8)
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:748:14)
at Socket.emit (events.js:92:17)
I'm not sure yet what would be the best solution, but as a workaround i had to add a check to toBuffer method and skip encoding.
We probably should add some kind of flag to commands that not allow the body when status is not a zero and add support for it to toBuffer method.
The text was updated successfully, but these errors were encountered:
As per SMPP specification, "When a response PDU carries a non-NULL command_status field,
it is indicating some form of error or rejection of the original request PDU. In such circumstances,
a PDU body should not be included in the PDU and the command_length of the PDU should therefore
be set to 16."
Hi there,
As per SMPP specification the
submit_sm_resp
command cannot have body if the status is not a zero. It's not respected by library and so you end up with:I'm not sure yet what would be the best solution, but as a workaround i had to add a check to
toBuffer
method and skip encoding.We probably should add some kind of flag to commands that not allow the body when status is not a zero and add support for it to
toBuffer
method.The text was updated successfully, but these errors were encountered: