some docs

This commit is contained in:
Daniel Brahneborg 2019-08-12 20:25:03 +02:00
parent 07e1c76246
commit b4d27098ec

View file

@ -2,6 +2,33 @@
const express = require('express') const express = require('express')
const router = express.Router() const router = express.Router()
// The following endpoints are supported.
//
// /before_receive
// /route
// /before_route (only for PROTOCOL=ROUTE connectors)
// /before_send
// /after_send
// /before_dlr (gets dlrinfo)
// /after_dlr
// The req.body contains the following fields.
//
// ccarg - from PLUGIN=pluginname:ccarg of the current connector
// qe - message or delivery report, with field names in uppercase
// result - for after_send and after_dlr
// dlrinfo - custom options for incoming delivery reports
// route - as returned by the previously called plugin
// Output is a list of key=value entries, one per line.
// The key can be as follows.
//
// result - for before_receive, where non-zero means the message will be rejected
// route - the name of the outgoing connector, used for /route
// qe.OPTION_NAME - new value for a message option called "OPTION_NAME"
// dlrinfo.OPTION_NAME - for before_dlr, to return HLR lookup results:
// - OPTION_NAME can be mnc, mcc, msc, and imsi
router.post('/before_receive', (req, res) => { router.post('/before_receive', (req, res) => {
console.log('in before_receive') //, body:', req.body) console.log('in before_receive') //, body:', req.body)
const qe = req.body.qe const qe = req.body.qe