[RFT] Kannel Keyword Handling

"Alex Judd" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <004701c35609$1cac1580$171716ac@AJVAIO>
OTA provisioning SMS formatI'm now getting to the point where the keyword handling within Kannel is not as intelligent as we need it to be and I'm looking to build in (or around) some better functionality. Thought it would be good to air my thoughts before going ahead.

1. Current behaviour

The first key word (ie. the first word before a space) is read from the inbound SMS message and is compared against either a keyword, or an array of aliases for the keyword. Aliases are separated with a ; and keywords are finished with a space

2. New behaviour

The ability to specify second and x subsequent keywords that are matched on a pattern basis with the inbound text message and the ability to specify a wildcard match for each keyword that is matched. For example

Single Keyword Matching

EXACT - matches all first words regardless of case with the word 'EXACT'
EXA*    - matches all first words regardless of case with words starting with 'EXA'

Multiple Keyword Matching

SECOND WORD - matches both words regardless of case with the words 'SECOND' and 'WORD'
SEC* WORD        - matches the first word regardless of case with words starting with 'SEC' and the second word exactly with 'WORD'
SEC* WOR*         - matches the first word regardless of case with words starting with 'SEC' and second words starting with 'WOR'

Aliases are handled in the same way.

Basically this involves some fairly heavy rewrites to Kannel's behaviour but my thoughts are it would be better to keep this in Kannel, than to move the second + x word matching to separate code.

Thoughts from everyone?

Regards

Alex
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.