Generic SIP Voice, Twilio Hosted SMS

mkswanson

Premier Customer
Joined
Sep 23, 2021
Messages
9
Reaction score
1
We have a generic SIP trunk that we have been using for voice for several years.

We have also had the same DIDs' SMS hosted at Twilio for years.

i.e. +19201234567 voice calls are delivered to SIPCo and then to 3CX, but an SMS sent to +19201234567 is delivered to Twilio and then wherever we tell Twilio to route it.

This has worked for years. We now want to look to bring SMS messaging for *some* DIDs into 3CX. SIPCo does not support SMS in a way that makes sense for us, so we do not want to have SMS on these DIDs hosted by SIPCo. SMS needs to continue to be hosted by Twilio.

I thought we could make this work by enabling SMS on the SIPCo SIP trunk and then using this config to use Twilio:

Provider URL: https://api.twilio.com/2010-04-01/Accounts/[ACCOUNTSID]/SMS/Messages -OR-
Provider URL: https://api.twilio.com/2010-04-01/Accounts/[ACCOUNTSID]/Messages.json

For the API key, I've tried the Account SID, the token, an API key, the API secret, AccountSID:Token, APIKey:Secret, and a few other variations. The logs show failed authentication, so I obviously don't have it quite right. I've also tried encoding the user/pass a few ways without success.

Any suggestions?
 
Is the Twilio account configured on 3CX? You could have twilio do the SMS through 3CX.
 
Is the Twilio account configured on 3CX? You could have twilio do the SMS through 3CX.

Twilio is configured, but it is a different SIP trunk than where the DIDs are off of.

Our main SIP carrier provides the PSTN connectivity for almost all of our DIDs, however Twilio hosts the SMS/MMS features for those calls.

i.e. if you make a voice call to 218-123-4567, it will go to from PSTN > Sinch/Inteliquent > SIP Connection to 3CX. If you send an SMS text message, it will go from your cell provider > Twilio > Connection to 3CX (which is broken).

I know it isn't a "normal" situation with PSTN connectivity being provided by a different carrier than SMS, but it isn't rare, either.

I would think that I can configure the SMS settings for the Generic SIP trunk (Sinch/Inteliquent) using the correct settings for Twilio, but I haven't figured out what the correct settings are.

I did update the settings for the Twilio SIP trunk, and that works correctly, but since 3CX isn't expecting incoming information for 218-123-4567 on the Twilio SIP connection, it throws an error. 3CX seems to only be willing to accept communication for 218-123-4567 on the Sinch SIP connection (for voice and SMS).
 
No, you would need to configure a Twilio trunk to handle the SMS. You would not do that from your other provider.
 
It seems there may be some miscommunication. There is a Twilio trunk configured, as well as another provider’s trunk.

Voice and SMS are handled by different providers on separate trunks for the same DIDs, which appears to be causing issues with 3CX.

If I had the correct manual configuration for Twilio using a generic SIP trunk, I believe we could resolve the issue.

Put another way:

I don't want to use the built-in Twilio trunk. I want to use a generic provider and point it at Twilio. What configuration would I use for voice, and especially for SMS?
 
I don't want to use the built-in Twilio trunk. I want to use a generic provider and point it at Twilio. What configuration would I use for voice, and especially for SMS?
You cannot. If you want SMS from Twilio you need to use the Twilio template. The API behind each template is different so the Generic template SMS settings will not work with Twilio.
 
You cannot. If you want SMS from Twilio you need to use the Twilio template. The API behind each template is different so the Generic template SMS settings will not work with Twilio.

Thank you. So, since the Twilio trunk receives the SMS message as expected, but 3CX discards it as a result of the DID being linked to a different trunk, what is the solution?
 
I am not sure how your numbers are configured in Twilio for hosted SMS. If you cannot assign a webhook to the numbers then it might not work.
 

Forum statistics

Threads
112,064
Messages
590,575
Members
165,019
Latest member
rsaldin@advancedbrainspin