Need help with SmsConnector Weird Behavior

Hello,

I recently installed the SMS connector on my FreePBX system but have encountered some strange behavior. Additionally, we developed code for a new carrier, Inteliquent, and have submitted it to GitHub - simontelephonics/smsconnector: SMS Connector module for FreePBX 16 and 17 @billsimon

Here’s the setup and the issue:

  • I have two extensions: 7100 and 7110.
  • Both extensions are configured with Sangoma phones, and SMS functionality is enabled.
  • Each extension has been assigned a phone number through the SMS connector.
  • In the SMS connector, I enabled “SIP SMS enabled” for both extensions.

While extension 7100 works as expected, extension 7110 is returning a 401 Unauthorized error. For context, extension 7110 was previously 7101, which I wiped and recreated to start fresh.

In the SMS connector, I can see the following: Messages Context: smsconnector-messages

Summary:

Sangoma Enable SMS**: Enabled for both extensions.
SMS Connector Setup**: Enabled for both extensions.
Transport Protocol**: Using TLS on a registered domain.

Logs:

Here’s the error I’m seeing for extension 7110:

HTTP request header sent.
Correlation Id: Http[12E624E68]

Received HTTP response header.
Correlation Id: Http[12E624E68]
HTTP/1.1 401 Unauthorized
x-powered-by: Sangoma
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 53
ETag: W/"35-xxxxxxxxxxxxxxxxxxxxxxxxI"
Date: Wed, 08 Jan 2025 23:50:11 GMT
Connection: keep-alive

--- http response ---
code: 401
content-type: application/json;charset=utf-8
content-length: 53
body: {"status":false,"message":"SMS not enabled for user"}

On the working extension (7100), the logs show a 200 OK response:

Received HTTP response header.
Correlation Id: Http[1060F0E68]
HTTP/1.1 200 OK
x-powered-by: Sangoma
Access-Control-Allow-Origin: *
Content-Type: application/json; charset=utf-8
Content-Length: 456
ETag: W/"1c8-xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Date: Thu, 09 Jan 2025 00:13:36 GMT
Connection: keep-alive

Extension 7100:

~> 2025-01-09T00:13:36.491Z (1736381616491238)
ali::network::http::basic_request::write_header
Sending HTTP request header.
Correlation Id: Http[1060F0E68]
POST /api/v1/mobile/sms/fetch HTTP/1.1
Accept-Language: en-CA
User-Agent: Sangoma Talk/1.0.16 (build 2142260; iOS 18.1.1; arm64-neon)
Accept: */*
Content-Type: application/json
Content-Length: 1200
Accept-Encoding: gzip, deflate
Host: connect.sangoma.com

Extension 7110:

~> 2025-01-08T23:50:10.817Z (1736380210817388)
ali::network::http::basic_request::write_header
Sending HTTP request header.
Correlation Id: Http[12E624E68]
POST /api/v1/mobile/sms/send HTTP/1.1
Accept-Language: en-US
User-Agent: Sangoma Talk/1.0.16 (build 2142260; iOS 18.2; arm64-neon)
Accept: */*
Content-Type: application/json
Content-Length: 1157
Accept-Encoding: gzip, deflate
Host: connect.sangoma.com

It seems that SMS is not being properly enabled for extension 7110, despite having similar settings as extension 7100.

Has anyone encountered this issue before? or is there another step I might be missing? Any advice or troubleshooting tips would be greatly appreciated!

PBX Version:
17.0.19.21
PBX Distro:
12.7.8-2408-1.sng12
Asterisk Version:
21.5.0

Thank you in advance for your help.

Is sms enabled for the user

These are the settings where the phone is enabled



Hi mike.s, you don’t need to set “SIP SMS enabled” = yes when you are using SMS Connector with the Sangoma softphones or UCP. It’s only if you want to (try to) use it with messaging-capable SIP phones. And that feature has only been tested with a small number of SIP clients.

Anyway, it’s well tested with UCP, Sangoma Talk (mobile), Sangoma Desktop, and Clearly Anywhere. The issue you’re facing looks like a config issue with the softphone/user manager, and not related to the SMS Connector module.

By the way, you noted that you submitted a new provider integration but I didn’t see it in the PRs on github.

HI @billsimon

yea we did not submit the PR yet because of this issue we wanted to make sure we submit it working as expected. and that we did not introduce an error. also we wanted to tie it in to the read receipt we doing that tomorrow. but you can see it on

i have reviewed the user management and the Chan_pjsip over 10 times i can’t seem to find a diff in any of the extensions. if you have any ideas i am all ears because we ran out of them lol.

also both phone 7100 and 7110 are registered and working as expected when it comes to voice calls.

thank you for your reply

I wanted to provide an update on how I resolved the issue. After some troubleshooting, I ran the “Run Domain Action” to update the certificate, followed by the “Run CloudConnect Agent Action” to update the agent. Once those updates were completed, I sent a new invite, and everything started working as expected.

It turns out the connector wasn’t the issue, so thank you, @billsimon, for pointing me in the right direction. I appreciate your insight!

We’ll be submitting the PR tomorrow now that everything is functioning correctly. My apologies for the initial confusion—I didn’t realize we had been working from a fork. Once we finish implementing the read receipt functionality, we’ll submit the PR to your Git for review.

Thanks again for the support! :blush:

1 Like

Hey @billsimon

Pr submitted GitHub - simontelephonics/smsconnector: SMS Connector module for FreePBX 16 and 17

It’s working for us we tried to do the read receipt hopping we will get 2 ticks on the sangoma talk but did not show up. let us know if we missed something

Thank you !

Ok an update.

The issue looks like a BUG when you have a virtual extension with the same email as the pjsip extension that is getting provisioned by sangoma it gave that error. once we removed the email from the virtual extension we did not get that error anymore !

Spoke to Support and Freepbx and they are able to reproduce they confirmed they will escalate this.