UPDATE Dec 2018
#3 above. Node connection to Aware
Am using Bandwidth for SMS messaging.
SENDING: w.r.t SMS, I don't much care about actual delivery receipt info, so I have my alert level set to "error" when sending. If a msg isn't delivered, I'll get a JSON msg at my Node.js server. Am not processing this yet except to reply with a 200 - OK
INCOMING SMS: When someone sends a msg to one of the Users' phone #s setup in bandwidth, that ReceiveSMS application calls my Node.js server and is processed. An incoming packet looks like this:
{ messageId: 'm-echiany4pxxsa',
from: '+18132940000',
eventType: 'sms',
text: 'Yes i got it',
time: '2018-12-19T04:21:44Z',
to: '+19163470000',
state: 'received',
messageUri:
'https://api.catapult.inetwork.com/v1/users/u-a6gzr3i6avrrq/messages/m-echiajzny4pxxsa',
applicationId: 'a-je3pu3kw2zsrafifey',
direction: 'in' }
I'm using info from there to make this URL call to Aware:
https://mysite.com/R3/logonOp.aw?domain=AA&userName=SMS&password=aaa&testingMode=true&firstCommand=startProcessWithInit,SMS,main,MessageLog&fromNumber=813-294-0000&toNumber=9163470000&body=Yes%20i%20got%20it&status=stage1&direction=inbound
which logs in to Aware, creates the SMS incoming record MessageLog, where a Rule:
IF MessageLOG IS NEW THEN "do stuff"
processes it and links it to the senders account.
It also looks up the recipient (the user) and forwards a SMS msg to a phone if desired.