SMS Replies via Twilio Webhook

Mautic 3.3.3, ec2 server, ubuntu 20.4, apache

Does anyone know if you need to turn something on in order to RECEIVE sms replies via twilio?

I followed the instructions here: SMS Text Messages | Mautic
for setting up the webhook in Twilio and I have verified that Twilio receives the reply and attempts to send it to https://myurl.online/sms/twilio/callback. However, it always results in a 500 server error.

Twilio plugin is turned on (so I can send SMS no problem).

Any ideas?

Thanks!

We will be able to help you better if you give us more details about the 500 error, like the logs

Thanks, @nsomaru

I just replied to a text message with a return text message (which didn’t go through to mautic), and I can see this in the UI error log for the same time my text was sent (the one in mautic, not the server).

[2021-07-28 21:32:58] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedFunctionException: "Attempted to call function "mb_strcut" from namespace "libphonenumber"." at /var/www/html/vendor/giggsey/libphonenumber-for-php/src/Matcher.php line 72 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException(code: 0): Attempted to call function \"mb_strcut\" from namespace \"libphonenumber\". at /var/www/html/vendor/giggsey/libphonenumber-for-php/src/Matcher.php:72)"} []

Looking like you’re missing the php mbstring package. Depending on your OS and deployment, a google search should direct you on how to install it.

For Ubuntu 20.04 and php 7.4 it should be: sudo apt-get install php7.4-mbstring

@nsomaru Thank you. That was exactly it, though I’m running php7.3, so adjusted your code accordingly and then verified it was enabled with php -i | grep mbstring