TIPS Text to speech -Incredible PBX 2027 D

LitleBill

Active Member
Joined
May 10, 2023
Messages
146
Reaction score
26
Greetings,

I am new to PBX, therefore please apologize my ramblings.

I just started with IncrediblePBX 2027 D and really appreciate how much work went into creating this installation script.

It is a great learning experience just getting things the way I want them to be.

For example Lenny was not working out of the box, but I found some guide and sound files and after setting up a Virtual extension Lenny is working. Althought I can't seem to find where the recordings go.
I forced recording for all.

Now, I am trying to figure out why Weather and News are not working.

I see in Asterisk logs that WeatherAPI is pulling the forecast text just fine, but when I dial 947, I get the prompt for Zip code and then it gets quiet. and hangs up.

When I dial 951 News , I get thevoice announcements but then it just hangs up. I see asterisk logs are pulling a news story just fine.

So there must be something wrong with text to speech.

Anyone has the same issue?

I have Debian and gtts is installed, but no TTS engines are listed in Asterisk
 
Extensions 53669 for Lenny, 951 for News, and 947 for Weather by ZIP Code should have worked from any extension after installing Incredible PBX 2027-D. If none of them work, it sounds like something is wrong with your Internet connection. Was this installed on a local machine or in the Cloud? Does pbxstatus show a PUBLIC IP address?
 
Thank you for your kind reply,

It is installed on a Local machine, I just set it up so it is behind firewall and behind NAT. I assume it will not be a public IP
I did see Suricata is blocking some requests to 208...


Bash:
    bash: pbxstatus: command not found
 
Last edited:
Maybe I should include some logs from Reports- Asterisk logs:

I see that Suricata is blocking Dynamic DNS query to "from-nv.com"

ERROR[55485][C-00000039] netsock2.c: getaddrinfo("lenny.from-nv.com", "(null)", ...): Name or service not known
 
This is when dialing 951 for News

Bash:
1732[2023-05-10 12:15:30] VERBOSE[57759][C-0000003a] file.c: <SIP/703-00000032> Playing '/var/lib/asterisk/agi-bin/pleaseholdyahoo.slin' (language 'en')
1733[2023-05-10 12:15:34] VERBOSE[57759][C-0000003a] pbx.c: Executing [951@from-internal:6] AGI("SIP/703-00000032", "nv-news-yahoo.php,8") in new stack
1734[2023-05-10 12:15:34] VERBOSE[57759][C-0000003a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/nv-news-yahoo.php
1735[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] res_agi.c: <SIP/703-00000032>AGI Script nv-news-yahoo.php completed, returning 0
1736[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [951@from-internal:7] NoOp("SIP/703-00000032", "News: This Top Stories news update brought to you by Yahoo and Nerd Viddles. From Associated Press: Ex-Raider Henry Ruggs pleads guilty to driving drunk causing fatal 156-mph crash. From The Telegraph: Governor rejects $1.2m reparation pay-out for black Californians. From INSIDER: Disney's governing board picked a DeSantis ally as new administrator. He'll make a $400 000 salary to oversee the governor's agenda for the district. From Reuters: Kremlin calls Polish decision to rename Kaliningrad 'hostile act'. From The Hill: Christie slams Trump’s ‘ridiculous’ response to E. Jean Carroll verdict. From Popular Mechanics: A Scientist Says He's Solved the Bermuda Triangle Just Like That. From Associated Press: Topless protester briefly disrupts VW annual meeting. Have a nice day. Goodbye.") in new stack
1737[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [951@from-internal:8] AGI("SIP/703-00000032", "gtts.php,"This Top Stories news update brought to you by Yahoo and Nerd Viddles. From Associated Press: Ex-Raider Henry Ruggs pleads guilty to driving drunk causing fatal 156-mph crash. From The Telegraph: Governor rejects $1.2m reparation pay-out for black Californians. From INSIDER: Disney's governing board picked a DeSantis ally as new administrator. He'll make a $400 000 salary to oversee the governor's agenda for the district. From Reuters: Kremlin calls Polish decision to rename Kaliningrad 'hostile act'. From The Hill: Christie slams Trump’s ‘ridiculous’ response to E. Jean Carroll verdict. From Popular Mechanics: A Scientist Says He's Solved the Bermuda Triangle Just Like That. From Associated Press: Topless protester briefly disrupts VW annual meeting. Have a nice day. Goodbye.","en"") in new stack
1738[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/gtts.php
1739[2023-05-10 12:15:35] WARNING[57759][C-0000003a] file.c: File /tmp/text does not exist in any format
1740[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] res_agi.c: <SIP/703-00000032>AGI Script gtts.php completed, returning -1
1741[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [951@from-internal:9] Hangup("SIP/703-00000032", "") in new stack
1742[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Spawn extension (from-internal, 951, 9) exited non-zero on 'SIP/703-00000032'
1743[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [h@from-internal:1] Macro("SIP/703-00000032", "hangupcall") in new stack
1744[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("SIP/703-00000032", "1?theend") in new stack
1745[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx_builtins.c: Goto (macro-hangupcall,s,3)
1746[2023-05-10 12:15:35] VERBOSE[57759][C-0000003a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("SIP/703-00000032", "0?Set(CDR(recordingfile)=)") in new stack
 
If pbxstatus isn't found, you've got a bad install. I'd start over.
 
I think it is working now.
Yes, pbxstatus shows the correct public IP
 
I m wondering if I see correctly in the asterisk log that gtts has issues finding the text

Bash:
2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/gtts.php
1775[2023-05-10 13:29:28] WARNING[82580][C-0000003b] f[COLOR=rgb(235, 107, 86)]ile.c: File /tmp/text does not exist in any format[/COLOR]
1776[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] res_agi.c: <SIP/703-00000033>AGI Script gtts.php completed, returning -1
1777[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] pbx.c: Executing [947@from-internal:12] Hangup("SIP/703-00000033", "") in new stack
1778[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] pbx.c: Spawn extension (from-internal, 947, 12) exited non-zero on 'SIP/703-00000033'
 
I m wondering if I see correctly in the asterisk log that gtts has issues finding the text

Bash:
2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/gtts.php
1775[2023-05-10 13:29:28] WARNING[82580][C-0000003b] f[COLOR=rgb(235, 107, 86)]ile.c: File /tmp/text does not exist in any format[/COLOR]
1776[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] res_agi.c: <SIP/703-00000033>AGI Script gtts.php completed, returning -1
1777[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] pbx.c: Executing [947@from-internal:12] Hangup("SIP/703-00000033", "") in new stack
1778[2023-05-10 13:29:28] VERBOSE[82580][C-0000003b] pbx.c: Spawn extension (from-internal, 947, 12) exited non-zero on 'SIP/703-00000033'
Assuming you have Internet connectivity, that's because no results were returned for the ZIP code you entered.
 
Thank you for your reply,

I see in Asterisk log that after entering ZIP the results were returned from the WEATHER API.
I can't see any relevant network being blocked


Bash:
15558[2023-05-15 17:31:03] VERBOSE[16862][C-00000002] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/nv-weather-zip.php
15559[2023-05-15 17:31:09] VERBOSE[16862][C-00000002] res_agi.c: <SIP/704-00000001>AGI Script nv-weather-zip.php completed, returning 0
15560[2023-05-15 17:31:09] VERBOSE[16862][C-00000002] pbx.c: Executing [947@from-internal:10] NoOp("SIP/704-00000001", "Weather: This National Weather Service update for WASHINGTON brought to you by Nerd Vittles. Current local conditions: Mostly Cloudy. Current temperature: 70 degrees Fahrenheit. 21 degrees Centigrade. Humidity: 42 per cent. Wind Speed: From the South West at 9 miles per hour. Barometric Pressure: 30.10 inches (1019.4 millibars). Visibility: 10 miles. Here is the latest forecast: Tonight: Mostly clear with a low around 59. Southwest wend around 6 miles per hour. Tuesday: A chance of showers after 1 p.m. Mostly cloudy with a high near 78. Southwest wend 7 to 10 miles per hour. Chance of precipitation is 50 per cent. Tuesday Night: Showers likely mainly before 2 a.m. Mostly cloudy with a low around 58. West wend 6 to 8 miles per hour. Chance of precipitation is 60 per cent. New precipitation amounts between a tenth and quarter of an inch possible. Wednesday: A chance of showers before 8 a.m. Sunny with a high near 72. North wend 11 to 14 miles per hour with gusts as high as 20 miles per hour. Chance of precipitation is 30 per cent. Wednesday Night: Mostly clear with a low around 47. Northeast wend 6 to 8 miles per hour. Have a nice day. Goodbye.") in new stack
15561[2023-05-15 17:31:09] VERBOSE[16862][C-00000002] pbx.c: Executing [947@from-internal:11] AGI("SIP/704-00000001", "gtts.php,"This National Weather Service update for WASHINGTON brought to you by Nerd Vittles. Current local conditions: Mostly Cloudy. Current temperature: 70 degrees Fahrenheit. 21 degrees Centigrade. Humidity: 42 per cent. Wind Speed: From the South West at 9 miles per hour. Barometric Pressure: 30.10 inches (1019.4 millibars). Visibility: 10 miles. Here is the latest forecast: Tonight: Mostly clear with a low around 59. Southwest wend around 6 miles per hour. Tuesday: A chance of showers after 1 p.m. Mostly cloudy with a high near 78. Southwest wend 7 to 10 miles per hour. Chance of precipitation is 50 per cent. Tuesday Night: Showers likely mainly before 2 a.m. Mostly cloudy with a low around 58. West wend 6 to 8 miles per hour. Chance of precipitation is 60 per cent. New precipitation amounts between a tenth and quarter of an inch possible. Wednesday: A chance of showers before 8 a.m. Sunny with a high near 72. North wend 11 to 14 miles per hour with gusts as high as 20 miles per hour. Chance of precipitation is 30 per cent. Wednesday Night: Mostly clear with a low around 47. Northeast wend 6 to 8 miles per hour. Have a nice day. Goodbye.","en"") in new stack
15562[2023-05-15 17:31:09] VERBOSE[16862][C-00000002] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/gtts.php
15563[2023-05-15 17:31:10] WARNING[16862][C-00000002] file.c: File /tmp/text does not exist in any format
15564[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] res_agi.c: <SIP/704-00000001>AGI Script gtts.php completed, returning -1
15565[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Executing [947@from-internal:12] Hangup("SIP/704-00000001", "") in new stack
15566[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Spawn extension (from-internal, 947, 12) exited non-zero on 'SIP/704-00000001'
15567[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Executing [h@from-internal:1] Macro("SIP/704-00000001", "hangupcall") in new stack
15568[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("SIP/704-00000001", "1?theend") in new stack
15569[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx_builtins.c: Goto (macro-hangupcall,s,3)
15570[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("SIP/704-00000001", "0?Set(CDR(recordingfile)=)") in new stack
15571[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Executing [s@macro-hangupcall:4] Hangup("SIP/704-00000001", "") in new stack
15572[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'SIP/704-00000001' in macro 'hangupcall'
15573[2023-05-15 17:31:10] VERBOSE[16862][C-00000002] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/704-00000001'
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top