SMS Connector on FreePBX 16 with Flowroute, SMS messages don't appear in UCP

Hi @billsimon (and others, of course :))

I have

  • Enabled messaging for one of our Flowroute DIDs
  • Added a FreePBX inbound route for that DID with my extension as destination
  • Installed SMS Connector 16.0.17.2 on an up-to-date FreePBX system, configured SMS Connector provider Flowroute (Connectivity > SMS Connector > Provider Settings > Flowroute) with API key and secret
  • Copied webhook provider URL for Flowroute provider and set callback URL (SMS/MMS) in Flowroute dashboard, for this DID
  • Added SMS Connector number for this DID, associated with my FreePBX user account/extension (Connectivity > SMS Connector > Add Number)
  • Enabled SMS for my account (Admin > User Management > Edit user > SMS Connector tab > SIP SMS enabled - Yes) and entered default DID for sending SIP SMS, even though I only care about receiving for now
  • Added these Flowroute API IPs to the firewall trusted (excluded from firewall) list (Connectivity > Firewall > Networks):
    52.88.246.140
    52.10.220.50
    54.190.46.191
    52.43.82.110

Even after a number of troubleshooting steps and opening a support ticket with Flowroute, I’ve had no success getting inbound SMS messages into Freepbx. The test messages do appear in the Flowroute dashboard (CDRS & STATS > Messaging Stats). Looking at the SMS Connector README, I thought it may be important to set the FreePBX Web Address, and set it to the (publicly-accessible) FQDN for the FreePBX system, for which we have a TLS certificate. This made no difference.
Flowroute support indicated that for inbound SMS tests, they would see messages like this in their logs when their servers tried to reach the call back URL (with our actual FreePBX FQDN, of course).

"levelname": "WARNING",

"message": "RequestError while attempting to send callback.",

"pathname": "/app/messaging/backend/callbacks.py",
"lineno": 566,

"name": "messaging.backend.callbacks",

"exc": "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)",
"e.__dict__": {

"_request": ""
},
"destination": "https://our.freepbx.fqdn/smsconn/provider.php?provider=flowroute",
"payload": {

This seems to suggest a problem with TLS certificate trust/verification. I asked if their SMS callback Python code uses the certifi module for certificate trust, but didn’t receive confirmation either way. We were using a ZeroSSL certificate, and it seems the root CA certificate for ZeroSSL is not included in the certifi root CA bundle. So I switched to a Lets Encrypt certificate. The ISRG X1 and ISRG X2 root CAs used by Let’s Encrypt are included in the certifi root CA bundle. Still, this made no difference. I also tried temporarily disabling the FreePBX firewall and sending another SMS test, but this also made no difference. I thought maybe the problem was that the list of Flowroute API server IPs I had added to the firewall trust list is insufficient. I also asked Flowroute support about this (are there other/additional IPs that should be allowed), but didn’t receive confirmation. They did suggest in a response that they didn’t think the problem is firewall related. In the final response before Flowroute Support closed out the ticket, they wrote,

The only other thing you can try is to setup a new Call back URL without the " https " and just use HTTP to see if it works.

So I tried setting the callback URL associated with the DID in question, to http://our.freepbx.fqdn/smsconn/provider.php?provider=flowroute. But this made no difference, so far as I could see. I didn’t check with Flowroute support.

Do you have any ideas/suggestions to resolve this and get inbound SMS (to FreePBX / SMS Connector) to work?

This process, experience, and little exploration has me wondering whether Flowroute is the most suitable for our needs. As best as I can tell, Flowroute offers none of the keyword automation (STOP, HELP) required for CTIA compliance on A2P 10DLC matters. We currently use Textable to handle messaging for a few DIDs. It appears Telnyx offers at least some of that functionality, and I’m wondering if they might be a good alternative to Flowroute…?

Thank you!

Temporarily open your firewall and run SSL Server Test (Powered by Qualys SSL Labs)

What grade do you get?

I have found this tool to be right on, every time.

Sounds like you got all the setup steps correct.

2 Likes

Qualys SSL Labs test passed (capped at B), but showed an incomplete (missing intermediate cert) certificate chain. After messing around with cert files and symlinks in /etc/httpd/pki, Qualys SSL Labs test no longer complains about an incomplete certificate chain, but still shows I have “chain issues” incorrect order and extra certs. When I expand certification paths in the test results, that looks correct, but I guess that’s the test showing the correct(ed) cert path for what the FreePBX server is sending. The problem was apparently primarily (incomplete) certificate chain, which for whatever reason didn’t seem to bother Chrome and other browsers. I finally got an inbound test SMS message in UCP (and on my Yealink desk phone)!
Thank you, @billsimon !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.