Changes between Version 22 and Version 23 of UserGuidelines/Messaging


Ignore:
Timestamp:
12/17/10 01:24:09 (11 years ago)
Author:
mmatthews
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuidelines/Messaging

    v22 v23  
    6969Don'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. ODK Collect (in versions with SMS support).
    7070
    71 The incoming message is parsed by the parserdooth() function which uses difflib to allow users to mis-spell the keywords.
     71For 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>
    7275
     76The 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.
    7377=== How does it work? ===
    7478Compose a new message. The autocomplete will find either Persons or Groups.