Im creating an web app that uses twilio and I seem to have a problem.
The system consist of 3 actors:
Whenever a client creates a new "job" via a form, all of the job details will be sent in a text to many different servers. When any one of the servers reply to that text message, we need to be able to associate his reply with the particular "job" he replied to. The problem is I can't figure out how to do this without buying a number for each job and just associating each number with a job. If possible i would only like to use one number, since buying thousands of number is completely wasteful and impossible.
When you send an SMS message to your Twilio phone number, Twilio will send a webhook, an HTTP request with all the details about the message, to a URL you associate with that number. You can reply to the message by responding to the webhook with TwiML (Twilio Markup Language).
Twilio two-way SMS and MMS messages allow you to carry on a conversation by both sending and receiving text and multimedia messages. This can enable a contact center agent to engage in an SMS-based chat with a customer, or let customers re-schedule appointments via text and receive automated responses.
Twilio Phone Numbers and Hosted SMS numbersAny SMS-enabled Twilio phone number or Hosted SMS number on your account can be used to send SMS messages. To use a phone number for sending messages, input your phone number in the From parameter of your API request using E. 164 formatting.
Cookies are the best way to handle a conversation, but because you cannot tell which text message the server replies to, it can be tricky. If you send the server 2 jobs, and they choose to reply to the first job, you have no way of knowing this.
I think you have two sensible ways of doing this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With