-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
When using the smsbox.send, I don't see that the charset nor coding properties are used.
How do I send Arabic text. In kannel url I used to set coding=2 url parameter, and charset=UTF-16BE, and text = hex
I changed the sendSMS function like this to add charset and coding
the text I sent as a buffer with hex encoding.
smsbox.prototype.sendSMS = function(conf) {
var def = {
id: true,
time: Math.floor((new Date).getTime() / 1000),
sender: undefined,
receiver: undefined,
msgdata: undefined,
charset: undefined, //added these two lines
coding: undefined
};
for (var property in def)
if (!conf.hasOwnProperty(property))
conf[property] = def[property];
if (!conf.receiver || !conf.msgdata) return null;
this.write("sms", {
sender: conf.sender,
receiver: conf.receiver,
msgdata: conf.msg || conf.text || conf.msgdata,
time: conf.time,
id: conf.id || true,
sms_type: status.sms.mt_reply,
coding: conf.coding, //added these two lines
charset: conf.charset
});
return true;
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels