2

I'm really enjoying CiviCRM (recently upgraded to 4.7.13) and was excited about its SMS capabilities. So far, I have been successful in using CiviSMS with Twilio to schedule/send bulk messages.

But, I cannot yet receive inbound SMS responses in CiviCRM with Twilio. For example, if someone responds to one of our messages, it does not show up as an Activity in CiviCRM.

I followed the instructions for setting up Twilio for inbound SMS, but no inbound SMS arrived in CiviCRM.

Here's my configuration of Twilio in CiviCRM:

enter image description here

In my Twilio logs, you can see my configuration as well as the report on how the HTTP POST is running into a 404 error. Here is the detailed error log from Twilio

I've done a number of things to try and fix this--I disabled security plugins, played around with case of the API info entered in CiviCRM.. and now I've started to look at the htaccess files and permissions. But this kind of tinkering is out of my league, so am stopping before I do any damage.

So, I could use any advice y'all could provide.

Thanks! Chris

3

The callback path shown in your Twilio debug is

/civicrm/sms/callback?provider=org.civicrm.sms.twilio

For WordPress, this needs to be

/?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.civicrm.sms.twilio

The former is suitable for Drupal CMS, but won't work in WordPress CMS. WordPress paths for CiviCRM callbacks are generally /?page=CiviCRM&q=civicrm/callback/here

Per wiki: Setting up a SMS Provider for CiviSMS, the callback URL to use for Twilio/WordPress seems to be:

https://www.example.org/?page=CiviCRM&q=civicrm%2Fsms%2Fcallback&provider=org.civicrm.sms.twilio

Try adjusting the settings for callback over on Twilio and see if that fixes it?

  • Thanks, Chris. You've helped me go in the right direction, but of course I'm still having problems. I'm getting another error: Warning: 12200 Schema validation warning. Message: Cvc-elt.1: Cannot find the declaration of element 'html’. Here is the full error report: cellpoems.org/TwilioErrorLog.pdf In Twilio’s debugging tool, it says: Schema validation warning The provided XML does not conform to the Twilio Markup XML schema. Please refer to the specific error and correct the problem. – CDS-Delano Jan 19 '17 at 9:21
  • I'd look at permissions etc - looks like Twilio is seeing a WordPress themed page rather than the expected XML result when it requests your callback URL. AFAICT, not enough information in the debug output. Check the HTTP response code in webserver logs, it may provide a clue (500 versus 401 might suggest application error or lack of permissions, etc). From there, I might capture the variables submitted in a request, and the URL Twilio hit, then generate a matching request using curl or PHP and replay that request to debug further. – Chris Burgess Jan 20 '17 at 5:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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