caf_sms/proxy_sms

Proxy to use a SMS messaging service like nexmo.

Source:

Extends

Methods

send(to, body)

Source:

Sends a message. The return message id can be used to match requests/responses.

Parameters:
Name Type Description
to number

Receiver number.

body string

A message to send.

setConfig(config)

Source:

Sets the Nexmo configuration properties to use its APIs.

The type caf.smsConfig is:

  {api_key:string, api_secret:string, from:number}
Parameters:
Name Type Description
config caf.smsConfig

The Nexmo configuration properties.

setHandleReplyMethod(methodName)

Source:

Sets the name of the method in this CA that will process reply messages.

To ignore replies, just set it to null.

The type of the method should be function(messageId, body, cb)

where:

  • messageId: is an unique identifier to match the request.
  • body is the JSON-parsed response.
  • cb is just the usual callback to notify completion.
Parameters:
Name Type Description
methodName string | null

The name of this CA's method that process reply messages.