3

CiviCRM 5.15.1, WordPress 5.2.2

My org has been successfully sending bulk SMS via Civi/Twilio for a couple weeks, however we are having problems setting up inbound capability.

The Long Number we lease from Twilio is configured as shown below, with a callback URL as follows: https://www.mydomain.org/?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.civicrm.sms.twilio

Twilio config screenshot

The problem is when an SMS recipient replies to a text sent from Civi, Twilio reports error 12200 - Schema validation warning ("provided XML does not conform to the Twilio Markup XML schema"). I understand it's not a fatal error, but I can't find the reply when I look under the senders' Activities. (Anywhere else in Civi I should look?)

Per @balleyne (WordPress Twilio Inbound SMS Callback URL failing when request method is POST), I changed POST to GET and re-tested but got a fatal error instead of balleyne's partial success.

Like balleyne and @CDS-Delano (in a comment to this post: Inbound SMS from Twilio not showing up in CiviCRM (getting 404 error on HTTP POST)), Twilio's debugger console shows that what it gets back from the inbound attempt is html instead of the expected xml (or TwiML?).

Following Chris Burgess's advice in that post, I checked the server and PHP error logs with our hosting provider but saw no red flags around the time the reply SMS was sent.

How have others fixed or at least troubleshot this issue, especially any non-coders (like me) out there?

3
  • We are at the same point / error. Failed when testing with GET. Any progress on your end? Mar 3, 2020 at 20:04
  • Yes, though I couldn't tell you if there was something I did that fixed the issue. Basically, weeks to months later (can't remember), I re-checked Activities in Civi looking for something else, and all inbound SMS we had received from the beginning were listed there. We still get the same alerts in Twilio, but now we just ignore them, b/c the texts are coming through into Civi just fine. In Civi's SMS settings, API Type = http, API Url = api.twilio.com, and our API parameters look like this: "From=+1##########" followed by "mo=1"
    – John Mark
    Mar 4, 2020 at 0:49
  • Also, in our Twilio webhook settings we are using HTTP POST, to here: ourdomain.org/…
    – John Mark
    Mar 5, 2020 at 16:18

1 Answer 1

1

So I also get the Schema validation warning but the inbound SMS is received. Interesting to note that it did not associate with the right contact as the phone number is on multiple contact records. Tried a second time and it appears it selects the highest ID in civicrm_phone table.

Best to go to Search > Find Activities and do the following search to see inbound SMS activity:

Activity Type ID In Inbound SMS ...AND...
Activity Status In Completed 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.