SOLVED Inbound SMS Telnyx

Status
Not open for further replies.

meshtask

New Member
Jul 17, 2019
17
2
3
Hi
Recently I installed FusionPBX Version 5.0.6 and then installed SMS from
I have configured Telnyx V1 API and with it outbound SMS works perfectly.
For inbound SMS I have used correct Web Hook URL at Telnyx (https://mydomain/app/sms/hook/sms_hook_telnyx.php).
I have allowed Telnyx IP for SMS in FusionPBX ACL correctly and FusionPBX Letsencrypt Web SSL also applied correctly and is working.
I am able to see incoming API call for Incoming SMS from Telnyx Whitelisted IP in NGINX logs (/var/log/nginx/access.log).
I have linked the incoming SMS DID to correct extension in SMS App and that extension has same 10 digit USA DID CallerID.
Yet I don't see incoming SMS under the SMS App MDRS. I only see outgoing SMS saved there.

Anyone here knows what might the issue be for incoming SMS?
 

Jiz

Member
Mar 29, 2021
49
1
8
41
Hi
Recently I installed FusionPBX Version 5.0.6 and then installed SMS from
I have configured Telnyx V1 API and with it outbound SMS works perfectly.
For inbound SMS I have used correct Web Hook URL at Telnyx (https://mydomain/app/sms/hook/sms_hook_telnyx.php).
I have allowed Telnyx IP for SMS in FusionPBX ACL correctly and FusionPBX Letsencrypt Web SSL also applied correctly and is working.
I am able to see incoming API call for Incoming SMS from Telnyx Whitelisted IP in NGINX logs (/var/log/nginx/access.log).
I have linked the incoming SMS DID to correct extension in SMS App and that extension has same 10 digit USA DID CallerID.
Yet I don't see incoming SMS under the SMS App MDRS. I only see outgoing SMS saved there.

Anyone here knows what might the issue be for incoming SMS?
I have the same problem, Did you sorted it out ?
 

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
I'm also running into this issue. I have outbound working fine through Telnyx, but no inbound. Like @meshtask , I can see the API call for the inbound SMS via /var/log/nginx/access.log:

192.76.120.139 - - [18/Feb/2023:10:51:58 -0600] "POST /app/sms/hook/sms_hook_telnyx.php HTTP/1.1" 200 31 "-" "Python/3.7 aiohttp/3.8.1"

But no inbound text arrives. Any idea on how to fix this?
 

tfernandez

Member
Oct 31, 2019
35
10
8
31
I'm also running into this issue. I have outbound working fine through Telnyx, but no inbound. Like @meshtask , I can see the API call for the inbound SMS via /var/log/nginx/access.log:

192.76.120.139 - - [18/Feb/2023:10:51:58 -0600] "POST /app/sms/hook/sms_hook_telnyx.php HTTP/1.1" 200 31 "-" "Python/3.7 aiohttp/3.8.1"

But no inbound text arrives. Any idea on how to fix this?
Hi,

I did a bit of troubleshooting yesterday and it seems this commit broke the app by removing the root.php file which had some necessary functions and classes.

For now, you can restore the root.php file and add the 'include "../root.php" to the sms_hook_common.php file.
 
  • Like
Reactions: meshtask

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
Hi,

I did a bit of troubleshooting yesterday and it seems this commit broke the app by removing the root.php file which had some necessary functions and classes.

For now, you can restore the root.php file and add the 'include "../root.php" to the sms_hook_common.php file.

That fixed it, you're the man! Thank you!

@tfernandez - Question for you. I am receiving inbound SMS now via email, and can see the inbound SMS via the SMS > MDRS section. But I am not receiving the inbound SMS on my extension connected to my GSWave app. Any idea on what the cause of that could be?
 
Last edited:

tfernandez

Member
Oct 31, 2019
35
10
8
31
@Kenny Riley Glad that worked. I was troubleshooting that part yesterday but ran out of time.

There is a lua script that needs to get executed. Take a look at the sms_hook_common.php file. There is a commented out line on line 41.

PHP:
//luarun /var/www/html/app/sms/sms.lua TO FROM 'BODY'

I believe you can uncomment that to have php execute the script whenever a new message is received. You'll also want that to run periodically in the background. That script works by checking if the receiving extension is registered with the server. If it is not, then it will wait until it is registered. Hence why you may want to run that every so often in the background.

If you fix it, please do share :)
 
Last edited:

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
@tfernandez if I recall, on top of following the install directions on the Github page, I had to edit the chatplan (Advanced > XML Editor> chatplan > default.xml) as follows to recognize 10-digit numbers for outbound SMS.

<context name="public"> <extension name="demo"> <condition field="to" expression="^\+?1?(\d{10})$"> <action application="lua" data="app.lua sms outbound"/> </condition> </extension> </context>

Still no luck in getting inbound SMS to show on my GSWave app with testing.
 

Kenny Riley

Active Member
Nov 1, 2017
243
39
28
36
@Kenny Riley Thanks for the info!

just to confirm, do you see the messages you send populating in the database? Do you see them in ?

I am testing with Telnyx now. I was able to get inbound to go to GSWave and I'd be happy to troubleshoot with you.

I can confirm, the messages I am sending are populating in the database and visible at https://my.domain.com/app/sms/sms_mdr.php but nothing is coming through to my GSWave app of the extension number these texts are being sent to.

Going to send you a DM as I would love some input to get this resolved! :)
 

meshtask

New Member
Jul 17, 2019
17
2
3
Hi,

I did a bit of troubleshooting yesterday and it seems this commit broke the app by removing the root.php file which had some necessary functions and classes.

For now, you can restore the root.php file and add the 'include "../root.php" to the sms_hook_common.php file.
Thanks you for a positive response. This absolutely solved Inbound SMS Issue on Telnyx.
 
  • Like
Reactions: tfernandez
Status
Not open for further replies.