Changes between Version 24 and Version 25 of UserGuidelines/Messaging


Ignore:
Timestamp:
12/17/10 09:29:28 (11 years ago)
Author:
Fran Boon
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Messaging

    v24 v25  
    6767 * http://host.domain.com/eden/msg/tropo?tropo-engine=json
    6868
    69 Don't forget to add select "Add a new phone number," in order to reserve a phone number for incoming voice and messaging (in this case, messaging).  This new number is the number that should be entered in, e.g. [http://eden.sahanafoundation.org/wiki/UserGuidelinesMobile ODK Collect] (in versions with SMS support).
     69Don't forget to add select "Add a new phone number," in order to reserve a phone number for incoming voice and messaging (in this case, messaging).  This new number is the number that should be entered in, e.g. [UserGuidelinesMobile ODK Collect] (in versions with SMS support).
    7070
    71 For regular, non-multi-part messages, the incoming message is parsed by the parserdooth() function which uses difflib to allow users to mis-spell the keywords.  In the case of multi-part messages, the tropo() function calls "concatSMS(lastMessage, fromaddress)" method to see if this is the last message in a sequence.  At present, the "sequence" is highly proprietary, and integrated into the "modified jaxdroid" branch of ODK Collect mentioned [http://eden.sahanafoundation.org/wiki/UserGuidelinesMobile here].  The sequence information is combined with a 5-digit unique identifier for that particular form submission.  That sequence information and unique identifier are prepended to the each part of the multi-part SMS transmission by the modified ODK Collect branch's SMS form submission code.  It will look something like this:
    72  * (1/3)(12345)<?xml version='1.0' ?><pr_person>...
    73  * (2/3)(12345)last_name>...
    74  * (3/3)(12345)-08</date_of_birth></pr_person>
    75 
    76 The unique identifier -- here, 12345 -- is actually significantly more random than that.  The reason the tropo() controller method calls concatSMS() with each new part of a multi-part message is that the messages may arrive out of order.  However, when the concatSMS() method detects that all message parts of that XForms submission have been received, it will stitch those messages together (while removing the prepend, obvious), and submit them to parserdooth() as before.
     71The incoming message can include mis-spelt keywords (since they are parsed by the {{{parserdooth()}}} function which uses difflib).
    7772=== How does it work? ===
    7873Compose a new message. The autocomplete will find either Persons or Groups.