Reputation: 953
So here's our desired sequence of events:
The problem is that we can't figure out how to keep track of WHICH transaction a particular SMS is linked to.
Our ideas so far:
Can anyone give us any pointers on how we could go about this?
Upvotes: 4
Views: 278
Reputation: 11702
Use a group (pool) of Twilio numbers to send the messages.
Once a message is sent using a number, get that number out of the group, keep it associated with the user (and the phone number of the user) from where you expect the response (don't use it to send another SMS until you get the response from the user).
When you get the response also check from where it comes, if all OK put the number back in the group.
If the user does not respond in due time, free your Twilio number an put it back in the group.
Upvotes: 3