Closed karapetyan closed 8 years ago
Did you take a look at the examples and source?
https://github.com/englercj/node-esl/blob/master/lib/esl/Connection.js#L647
we use this:
Dialer.prototype.sendSipMessage = function( connection, id, cb) {
var event = new Event('custom', 'SMS::SEND_MESSAGE');
event.addHeader('proto', 'ws');
event.addHeader('dest_proto', 'sip');
var from = "internal/"+id+"@3waytalk.com";
event.addHeader('from', from);
event.addHeader('from_full', from);
event.addHeader('to', id+"@internal");
event.addHeader('sip_profile', "internal");
event.addHeader('type', 'text/plain');
event.addHeader('Content-Type', 'text/plain');
event.addBody( "Very big body");
connection.sendEvent(event, cb);
};
and with "sofia profile internal siptrace on" we can't see that anything was send how to check this?
Things to try:
problem solved, it was our bug
here is some simplified example on lua:
freeswitch.consoleLog("info", "chat console\n") local event = freeswitch.Event("CUSTOM", "SMS::SEND_MESSAGE"); event:addHeader("proto","ws"); event:addHeader("dest_proto", "sip"); event:addHeader("from","2183@internal"); event:addHeader("to","internal/2183@3waytalk.com"); event:addHeader("type","text/html"); event:addBody("ping"); freeswitch.consoleLog("info", event:serialize()); event:fire();
how to make same on node-esl ?