Ticket #13 (closed task: fixed)
Text (SMS) message parser with configurable template
| Reported by: | francois | Owned by: | francois |
|---|---|---|---|
| Priority: | blocker | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description
The goal of this task is to create a method whereby the Kannel/SMS request input plug-in can parse incoming messages based on a message structure template which could be used to specify message formats, channels to use, etc.
This template will be configurable via the Kannel/SMS request input config file.
This functionality is required for #5 (with added flexibility) and #9.
Details
For instance, a structure template such as the following:
[%c:]%m
would be parsed as follows:
- If the plug-in sees a : (colon) character in the message, everything before it is interpreted as the channel to be used (e.g. MMS)
- Whatever follows after the : will be used as the actual request data
- If no : is present, simply use the entire message as the request data (this is how the system currently uses SMS messages)
So, if using the above template, a message such as MMS:Cat would cause the system to search for the Cat article and transmit it using the MMS channel. A message such as Cat would cause the system to search for the Cat article, and transmit it using the default (pre-configured) channel(s).