Permalink
Browse files

add readme

  • Loading branch information...
kaven276 committed Jun 4, 2012
1 parent 4b0c271 commit 510c5c4ec8b8d871cc6cb469f004733c8e90cb17
Showing with 40 additions and 4 deletions.
  1. +40 −4 Readme.md
View
@@ -1,11 +1,47 @@
using node to implement the telecommunication industry's SGIP/SMPP protocol for sms send/receiver proxy
==============
+Function Scope
+-------
-How oracle send request to this NodeJS SMS proxy module.
-====
+* By now, we support SGIP only, SMPP will be supported in the future.
+* For SGIP, only nodeSP is really supported, other SGIP node types like SMG,SMSC is just fake server for test work by now
- The node_sms module SP will convert a SMG for SP as a local API call, you can use
+SMS send by SP features
+-----------
+
+1. support sending multiple target numbers in one Submit message
+2. support message larger than 70 ucs2 chars (without SP content split work)
+3. support message larger than 127 ucs2 chars (using SP side content split work utilizing TP_udhi field)
+4. when SMSC/SMG have the n-minute delay for long content(>70 ucs2 chars), SP can automatically utilize ScheduleTime field to set it to 1s in future, and then reduced the delay in 1 second.
+5. can receive report
+
+
+Examples:
+-------
+
+ You can read the test part in every code file, like "lib/nodes/nodeSP.js".
+
+ var sp = new SP('202.99.87.201', 8801, 'dialbook', 'dialbooktest', 8801, '', 'dialbook', 'dialbooktest');
+ var msg = new Submit('8615620001781', 8, 'some ucs2 encoded test or just a Buffer object', {'ReportFlag':1});
+
+ // event mode
+ sp.send(msg);
+ sp.on('resp', function(msgResp, msgSend){
+ console.log('send message success for :');
+ console.log(msgResp);
+ console.log(sp.ackQueue.length);
+ });
+
+ // callback mode
+ sp.send(msg,function(res, req){
+ // console.log('pair are', req, res, 'end');
+ });
+
+ // accept SMG request, like report, deliver, ...
+ sp.on('request', function(req){
+ console.log('\nReport:');
+ console.log(req);
+ });
- SP.send(new Submit([tele number ...], content), function(err, sendMsg, respMsg) );

0 comments on commit 510c5c4

Please sign in to comment.