Last night, I finished work on the SMS text message handling in the Auto Responder.
Twilio makes a web service request using my web server using a PHP script that I created for this purpose. It was simple to configure my Twilio account to use my server and script. My script then opens a socket connection to my Auto Responder service and formats the SMS message data into my own XML format. The Auto responder converts the SMS data into an internal message format and then does all of it’s message processing the same way it does things for email messages.
Once I have a response picked, I send the response text as-is back to the socket connection and my script them wraps it in the XML that Twilio expects as a response. Twilio then responds to the text almost immediately.
I have not tested overall throughput but my single message testing shows a response time that is as low as 13 seconds. That’s is more than good enough for the puzzle race.
I am still improving the message processing to handle more complex messages with more complex expression parsing of the configuration file but that isn’t required for me to see the SMS text messaging code working as expected.