TUTORIAL Deploy Lenny & TTS Apps with iPBX 2026

jrglass

Guru
Joined
Oct 18, 2007
Messages
323
Reaction score
23
I got the system working but cannot reach many of the destinations.

THE NEWS

Running as user 'asterisk'
Running under group 'asterisk'
Connected to Asterisk 22.10.0 currently running on noreply (pid = 2073)

Code:
  == Using SIP RTP Audio TOS bits 184

  == Using SIP RTP Audio TOS bits 184 in TCLASS field.

  == Using SIP RTP Audio CoS mark 5

    -- Executing [951@from-internal:1] Answer("PJSIP/703-00000042", "") in new stack

       > 0x7fe768128be0 -- Strict RTP learning after remote address set to: 192.168.0.9:41298

    -- Executing [951@from-internal:2] Wait("PJSIP/703-00000042", "1") in new stack

       > 0x7fe768128be0 -- Strict RTP qualifying stream type: audio

       > 0x7fe768128be0 -- Strict RTP switching source address to 65.131.250.76:41298

    -- Executing [951@from-internal:3] Set("PJSIP/703-00000042", "TIMEOUT(digit)=7") in new stack

    -- Digit timeout set to 7.000

    -- Executing [951@from-internal:4] Set("PJSIP/703-00000042", "TIMEOUT(response)=10") in new stack

    -- Response timeout set to 10.000

    -- Executing [951@from-internal:5] Playback("PJSIP/703-00000042", "/var/lib/asterisk/agi-bin/pleaseholdyahoo") in new stack

    -- <PJSIP/703-00000042> Playing '/var/lib/asterisk/agi-bin/pleaseholdyahoo.slin' (language 'en')

       > 0x7fe768128be0 -- Strict RTP learning complete - Locking on source address 65.131.250.76:41298

    -- Executing [951@from-internal:6] AGI("PJSIP/703-00000042", "nv-news-yahoo.php,8") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/nv-news-yahoo.php

    -- <PJSIP/703-00000042>AGI Script nv-news-yahoo.php completed, returning 0

    -- Executing [951@from-internal:7] NoOp("PJSIP/703-00000042", "News: This Top Stories news update brought to you by Yahoo and Nerd Viddles.  From Reuters: US appeals court blocks Trump admin from enacting new plans to slash consumer watchdog staff. From Fox News: Body found in South Carolina ID’d as missing fitness trainer who told friend she was 'scared for her life'. From Fox News: Dem who sued to remove Trump's name from Kennedy Center now says venue becoming 'lifeless husk' in fresh fight. From Associated Press: Trump deepens the dustup with Italy's Meloni  who says his 'unprovoked attacks are senseless'. From Fox News: North Carolina furniture manufacturer allegedly kills business partner hours after losing contract dispute. From CNN: Senate’s likely next No. 2 warns Trump if Democrats take the majority: ‘It’s going to be a fight’ on key values. From Associated Press: Nigerian migrants returning from South Africa face the same economic issues they left behind. Have a nice day. Goodbye.") in new stack

    -- Executing [951@from-internal:8] AGI("PJSIP/703-00000042", "speechgen.php,"This Top Stories news update brought to you by Yahoo and Nerd Viddles.  From Reuters: US appeals court blocks Trump admin from enacting new plans to slash consumer watchdog staff. From Fox News: Body found in South Carolina ID’d as missing fitness trainer who told friend she was 'scared for her life'. From Fox News: Dem who sued to remove Trump's name from Kennedy Center now says venue becoming 'lifeless husk' in fresh fight. From Associated Press: Trump deepens the dustup with Italy's Meloni  who says his 'unprovoked attacks are senseless'. From Fox News: North Carolina furniture manufacturer allegedly kills business partner hours after losing contract dispute. From CNN: Senate’s likely next No. 2 warns Trump if Democrats take the majority: ‘It’s going to be a fight’ on key values. From Associated Press: Nigerian migrants returning from South Africa face the same economic issues they left behind. Have a nice day. Goodbye.","en"") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/speechgen.php

    -- <PJSIP/703-00000042>AGI Script speechgen.php completed, returning 0

    -- Executing [951@from-internal:9] Playback("PJSIP/703-00000042", "/tmp/spokentext") in new stack

[2026-06-21 17:46:08] WARNING[220617][C-00000038]: file.c:832 openstream_internal: File /tmp/spokentext does not exist in any format

[2026-06-21 17:46:08] WARNING[220617][C-00000038]: file.c:1342 ast_streamfile: Unable to open /tmp/spokentext (format (ulaw)): No such file or directory

[2026-06-21 17:46:08] WARNING[220617][C-00000038]: app_playback.c:523 playback_exec: Playback failed on PJSIP/703-00000042 for /tmp/spokentext

    -- Executing [951@from-internal:10] Hangup("PJSIP/703-00000042", "") in new stack

  == Spawn extension (from-internal, 951, 10) exited non-zero on 'PJSIP/703-00000042'

    -- Executing [h@from-internal:1] Gosub("PJSIP/703-00000042", "macro-hangupcall,s,1") in new stack

    -- Executing [s@macro-hangupcall:1] Set("PJSIP/703-00000042", "__MCVMSTATUS=") in new stack

    -- Executing [s@macro-hangupcall:2] Gosub("PJSIP/703-00000042", "app-missedcall-hangup,s,1()") in new stack

    -- Executing [s@app-missedcall-hangup:1] NoOp("PJSIP/703-00000042", "Dialed: s") in new stack

    -- Executing [s@app-missedcall-hangup:2] NoOp("PJSIP/703-00000042", "Caller: ") in new stack

    -- Executing [s@app-missedcall-hangup:3] GotoIf("PJSIP/703-00000042", "0?exit") in new stack

    -- Executing [s@app-missedcall-hangup:4] Set("PJSIP/703-00000042", "EXTENNUM=s") in new stack

    -- Executing [s@app-missedcall-hangup:5] Set("PJSIP/703-00000042", "FEXTENNUM=s") in new stack

    -- Executing [s@app-missedcall-hangup:6] GotoIf("PJSIP/703-00000042", "0?exit") in new stack

    -- Executing [s@app-missedcall-hangup:7] AGI("PJSIP/703-00000042", "missedcallnotify.php,s,,s,0,,PJSIP/703-00000042,,,,") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/missedcallnotify.php

    -- <PJSIP/703-00000042>AGI Script missedcallnotify.php completed, returning 0

    -- Executing [s@app-missedcall-hangup:8] Return("PJSIP/703-00000042", "") in new stack

    -- Executing [s@macro-hangupcall:3] GotoIf("PJSIP/703-00000042", "1?theend") in new stack

    -- Goto (macro-hangupcall,s,5)

    -- Executing [s@macro-hangupcall:5] ExecIf("PJSIP/703-00000042", "0?Set(CDR(recordingfile)=)") in new stack

    -- Executing [s@macro-hangupcall:6] Hangup("PJSIP/703-00000042", "") in new stack

  == Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'PJSIP/703-00000042'

I did not hear anything except "Please wait a minute while we retrieve the latest yahoo headlines" Similar problems other codes

TIA

Jeff
 
Last edited by a moderator:
You'll need to deploy a text-to-speech (TTS) engine for use with Incredible PBX 2026. A number of them are documented on Nerd Vittles.
 
Last edited:
@jrglass: Just tested SpeechGen which still works flawlessly. Tutorial is here.

$9.99 buys you 130,000 characters of TTS at current rates with the NV setup.

Just create an API key in your Profile and then follow the steps in the tutorial above with your API Key and Email Address.

947 Weather and 951 News Headlines both work great. Enjoy!
 
Last edited:
do u use standard or pro? How many units on average our used? which voice do you have?
 
Last edited:
It's standard which sounds great. You can count up the number of characters in the text and subtract from 130,000.

Voice is shown and can be changed when you plug in your credentials in speechgen.php.
 
Last edited:
Installing Lenny is a little trickier for Incredible PBX 2026. Here are the steps.

From the Debian CLI as root:

Code:
fwconsole ma downloadinstall https://filedn.com/lBgbGypMOdDm8PWOoOiBR7j/IncrediblePBX2026/itslenny.tar.gz
mysql -u root -ppassw0rd asterisk -e "UPDATE itslenny SET enable = 'CHECKED';"
# if you want to Record Lenny calls, uncomment next line
# mysql -u root -ppassw0rd asterisk -e "UPDATE itslenny SET record = 'CHECKED';"
fwconsole reload
cd /var/lib/asterisk/sounds/en
ln -s /var/www/html/admin/modules/itslenny/sounds/lenny lenny

From the FreePBX GUI as admin:

1. Create Custom Destination under Admin tab
Target: app-nv-itslenny,s,1
Description: Lenny
Return: No
Submit -> Apply Config

2. Delete User Extension 53669

3. Create a Misc Application under Applications tab
Description: Lenny
Feature Code: 53669
Destination: Custom Destination -> Lenny
Submit -> Apply Config

Usage: Dial 53669 or forward incoming call to 53669
 
Last edited:
I thought I did it right but it doesn't work. Does this also need TTS? I bought it but still waiting for the API key to show up.

Code:
root@noreply:~ $ Running under group 'asterisk'

Connected to Asterisk 22.10.0 currently running on noreply (pid = 2073)

[2026-06-21 22:00:32] ERROR[2105]: res_pjsip.c:1359 create_out_of_dialog_request: Unable to create outbound OPTIONS request to endpoint callcentric as URI 'sip:[email protected]/17735414611:5060' is not valid

[2026-06-21 22:00:32] ERROR[2105]: res_pjsip/pjsip_options.c:886 sip_options_qualify_contact: Unable to create request to qualify contact sip:[email protected]/17735414611:5060 on AOR callcentric

  == Using SIP RTP Audio TOS bits 184

  == Using SIP RTP Audio TOS bits 184 in TCLASS field.

  == Using SIP RTP Audio CoS mark 5

    -- Executing [536693@from-internal:1] ResetCDR("PJSIP/703-0000004e", "") in new stack

[2026-06-21 22:00:34] WARNING[243025][C-00000044]: pbx.c:2957 pbx_extension_helper: No application 'NoCDR' for extension (from-internal, 536693, 2)

  == Spawn extension (from-internal, 536693, 2) exited non-zero on 'PJSIP/703-0000004e'

    -- Executing [h@from-internal:1] Gosub("PJSIP/703-0000004e", "macro-hangupcall,s,1") in new stack

    -- Executing [s@macro-hangupcall:1] Set("PJSIP/703-0000004e", "__MCVMSTATUS=") in new stack

    -- Executing [s@macro-hangupcall:2] Gosub("PJSIP/703-0000004e", "app-missedcall-hangup,s,1()") in new stack

    -- Executing [s@app-missedcall-hangup:1] NoOp("PJSIP/703-0000004e", "Dialed: s") in new stack

    -- Executing [s@app-missedcall-hangup:2] NoOp("PJSIP/703-0000004e", "Caller: ") in new stack

    -- Executing [s@app-missedcall-hangup:3] GotoIf("PJSIP/703-0000004e", "0?exit") in new stack

    -- Executing [s@app-missedcall-hangup:4] Set("PJSIP/703-0000004e", "EXTENNUM=s") in new stack

    -- Executing [s@app-missedcall-hangup:5] Set("PJSIP/703-0000004e", "FEXTENNUM=s") in new stack

    -- Executing [s@app-missedcall-hangup:6] GotoIf("PJSIP/703-0000004e", "0?exit") in new stack

    -- Executing [s@app-missedcall-hangup:7] AGI("PJSIP/703-0000004e", "missedcallnotify.php,s,,s,0,,PJSIP/703-0000004e,,,,") in new stack

    -- Launched AGI Script /var/lib/asterisk/agi-bin/missedcallnotify.php

    -- <PJSIP/703-0000004e>AGI Script missedcallnotify.php completed, returning 0

    -- Executing [s@app-missedcall-hangup:8] Return("PJSIP/703-0000004e", "") in new stack

    -- Executing [s@macro-hangupcall:3] GotoIf("PJSIP/703-0000004e", "1?theend") in new stack

    -- Goto (macro-hangupcall,s,5)

    -- Executing [s@macro-hangupcall:5] ExecIf("PJSIP/703-0000004e", "0?Set(CDR(recordingfile)=)") in new stack

    -- Executing [s@macro-hangupcall:6] Hangup("PJSIP/703-0000004e", "") in new stack

  == Spawn extension (macro-hangupcall, s, 6) exited non-zero on 'PJSIP/703-0000004e'

noreply*CLI>
 
Last edited by a moderator:
[2026-06-21 22:00:34] WARNING[243025][C-00000044]: pbx.c:2957 pbx_extension_helper: No application 'NoCDR' for extension (from-internal, 536693, 2)
NoCDR() was deprecated in Asterisk 12 and removed in Asterisk 21. It won't work in current versions of Asterisk.
 
@jrglass: I wouldn't know how to tell you where to start debugging all of this. First of all, the API key doesn't show up. You create it as I noted above: "Just create an API key in your Profile and then follow the steps in the tutorial above with your API Key and Email Address."

Second, you've got a typo in the Misc Application. It's 53669 (spells "LENNY") not 536693.

Go through ALL the steps again and see what you've missed.
 
Last edited:

Members online

Forum statistics

Threads
26,712
Messages
174,572
Members
20,281
Latest member
RP1SP
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