wardmundy
Nerd Uno
- Joined
- Oct 12, 2007
- Messages
- 19,206
- Reaction score
- 5,227
We showed you our first build of Asterisk 15 a few days ago...
Although the FreePBX folks bristle at the idea that their GUI is a code generator for Asterisk, we decided to do a few experiments anyway. Obviously FreePBX 12 won't work with Asterisk 15 without some plumbing changes, and we can chat about whether it's worth the investment to maintain a free, open source, nagware-free version moving forward. But, for purposes of our Asterisk 15 experiments, what we've done is build an Incredible PBX 13 server, configure trunks, extensions, routes, etc. Then we made a snapshot of /etc/asterisk, /var/lib/asterisk, and /var/lib/mysql, but NOT the web stuff. Next we reworked the Incredible PBX installer to remove the FreePBX components and install Asterisk 15 from source. Finally, we've installed our image snapshot from the Incredible PBX 13 platform onto the Asterisk 15 platform. This gives you a pure Asterisk server with no GUI and a very small footprint. However, it can be modified just as you would modify traditional Asterisk code. Or you could update pieces on the Incredible PBX 13 platform using the GUI, make a new snapshot, and then load the new snapshot on your Asterisk 15 platform. So the million dollar question was... does it work? And here's the answer:
The short answer is that most things work great. As you might expect, FLITE and GV Oauth are broken because of hooks into Asterisk, but that is easily fixed by substituting SIP and a more robust TTS engine such as IBM's. News (option 5) and Weather (option 6) reports demonstrate how easy this was. Feel free to call the number and try it out for yourself (HINT: see line 5 above).
One advantage of this design is that there is no web exposure of your server at all. So, with Apache shut down, you probably could run this in the cloud with little or no firewall protection assuming your SIP passwords are extremely secure.
Although the FreePBX folks bristle at the idea that their GUI is a code generator for Asterisk, we decided to do a few experiments anyway. Obviously FreePBX 12 won't work with Asterisk 15 without some plumbing changes, and we can chat about whether it's worth the investment to maintain a free, open source, nagware-free version moving forward. But, for purposes of our Asterisk 15 experiments, what we've done is build an Incredible PBX 13 server, configure trunks, extensions, routes, etc. Then we made a snapshot of /etc/asterisk, /var/lib/asterisk, and /var/lib/mysql, but NOT the web stuff. Next we reworked the Incredible PBX installer to remove the FreePBX components and install Asterisk 15 from source. Finally, we've installed our image snapshot from the Incredible PBX 13 platform onto the Asterisk 15 platform. This gives you a pure Asterisk server with no GUI and a very small footprint. However, it can be modified just as you would modify traditional Asterisk code. Or you could update pieces on the Incredible PBX 13 platform using the GUI, make a new snapshot, and then load the new snapshot on your Asterisk 15 platform. So the million dollar question was... does it work? And here's the answer:
Code:
Connected to Asterisk 15.0.0 currently running on asterisk15-mia (pid = 28556)
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
> 0x7f796c006050 -- Strict RTP learning after remote address set to: 72.9.246.170:10096
-- Executing [8436060444@from-trunk:1] Set("SIP/voipms-00000000", "__FROM_DID=8436060444") in new stack
-- Executing [8436060444@from-trunk:2] Gosub("SIP/voipms-00000000", "sub-record-check,s,1(in,8436060444,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("SIP/voipms-00000000", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("SIP/voipms-00000000", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("SIP/voipms-00000000", "NOW=1507210385") in new stack
-- Executing [s@sub-record-check:4] Set("SIP/voipms-00000000", "__DAY=05") in new stack
-- Executing [s@sub-record-check:5] Set("SIP/voipms-00000000", "__MONTH=10") in new stack
-- Executing [s@sub-record-check:6] Set("SIP/voipms-00000000", "__YEAR=2017") in new stack
-- Executing [s@sub-record-check:7] Set("SIP/voipms-00000000", "__TIMESTR=20171005-133305") in new stack
-- Executing [s@sub-record-check:8] Set("SIP/voipms-00000000", "__FROMEXTEN=unknown") in new stack
-- Executing [s@sub-record-check:9] Set("SIP/voipms-00000000", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("SIP/voipms-00000000", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("SIP/voipms-00000000", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("SIP/voipms-00000000", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("SIP/voipms-00000000", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("SIP/voipms-00000000", "2?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("SIP/voipms-00000000", "1?sub-record-check,in,1") in new stack
-- Goto (sub-record-check,in,1)
-- Executing [in@sub-record-check:1] NoOp("SIP/voipms-00000000", "Inbound Recording Check to 8436060444") in new stack
-- Executing [in@sub-record-check:2] Set("SIP/voipms-00000000", "FROMEXTEN=unknown") in new stack
-- Executing [in@sub-record-check:3] ExecIf("SIP/voipms-00000000", "10?Set(FROMEXTEN=843*******)") in new stack
-- Executing [in@sub-record-check:4] Gosub("SIP/voipms-00000000", "recordcheck,1(dontcare,in,8436060444)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("SIP/voipms-00000000", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("SIP/voipms-00000000", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("SIP/voipms-00000000", "") in new stack
-- Executing [in@sub-record-check:5] Return("SIP/voipms-00000000", "") in new stack
-- Executing [8436060444@from-trunk:3] Gosub("SIP/voipms-00000000", "app-blacklist-check,s,1()") in new stack
-- Executing [s@app-blacklist-check:1] GotoIf("SIP/voipms-00000000", "0?blacklisted") in new stack
-- Executing [s@app-blacklist-check:2] Set("SIP/voipms-00000000", "CALLED_BLACKLIST=1") in new stack
-- Executing [s@app-blacklist-check:3] Return("SIP/voipms-00000000", "") in new stack
-- Executing [8436060444@from-trunk:4] Set("SIP/voipms-00000000", "CDR(did)=8436060444") in new stack
-- Executing [8436060444@from-trunk:5] ExecIf("SIP/voipms-00000000", "0 ?Set(CALLERID(name)=843*******)") in new stack
-- Executing [8436060444@from-trunk:6] Set("SIP/voipms-00000000", "CHANNEL(musicclass)=default") in new stack
-- Executing [8436060444@from-trunk:7] Set("SIP/voipms-00000000", "__MOHCLASS=default") in new stack
[2017-10-05 13:33:05] WARNING[23225][C-00000001]: func_channel.c:468 func_channel_read: Unknown or unavailable item requested: 'reversecharge'
-- Executing [8436060444@from-trunk:8] GotoIf("SIP/voipms-00000000", "0?macro-hangupcall") in new stack
[2017-10-05 13:33:05] WARNING[23225][C-00000001]: func_callerid.c:920 callerpres_read: CALLERPRES is deprecated. Use CALLERID(name-pres) or CALLERID(num-pres) instead.
-- Executing [8436060444@from-trunk:9] Set("SIP/voipms-00000000", "__CALLINGPRES_SV=allowed_not_screened") in new stack
-- Executing [8436060444@from-trunk:10] Set("SIP/voipms-00000000", "CALLERPRES()=allowed_not_screened") in new stack
-- Executing [8436060444@from-trunk:11] Goto("SIP/voipms-00000000", "ivr-1,s,1") in new stack
-- Goto (ivr-1,s,1)
-- Executing [s@ivr-1:1] Set("SIP/voipms-00000000", "TIMEOUT_LOOPCOUNT=0") in new stack
-- Executing [s@ivr-1:2] Set("SIP/voipms-00000000", "_IVR_CONTEXT_ivr-1=") in new stack
-- Executing [s@ivr-1:3] Set("SIP/voipms-00000000", "_IVR_CONTEXT=ivr-1") in new stack
-- Executing [s@ivr-1:4] Set("SIP/voipms-00000000", "__IVR_RETVM=") in new stack
-- Executing [s@ivr-1:5] GotoIf("SIP/voipms-00000000", "0?skip") in new stack
-- Executing [s@ivr-1:6] Answer("SIP/voipms-00000000", "") in new stack
-- Executing [s@ivr-1:7] Wait("SIP/voipms-00000000", "1") in new stack
-- Executing [s@ivr-1:8] Set("SIP/voipms-00000000", "IVR_MSG=custom/ivr-Allison") in new stack
-- Executing [s@ivr-1:9] Set("SIP/voipms-00000000", "TIMEOUT(digit)=3") in new stack
-- Digit timeout set to 3.000
-- Executing [s@ivr-1:10] ExecIf("SIP/voipms-00000000", "1?Background(custom/ivr-Allison)") in new stack
-- <SIP/voipms-00000000> Playing 'custom/ivr-Allison.slin' (language 'en')
> 0x7f796c006050 -- Strict RTP switching to RTP target address 72.9.246.170:10096 as source
> 0x7f796c006050 -- Strict RTP learning complete - Locking on source address 72.9.246.170:10096
-- Executing [5@ivr-1:1] Goto("SIP/voipms-00000000", "ext-miscdests,5,1") in new stack
-- Goto (ext-miscdests,5,1)
-- Executing [5@ext-miscdests:1] NoOp("SIP/voipms-00000000", "MiscDest: News") in new stack
-- Executing [5@ext-miscdests:2] Goto("SIP/voipms-00000000", "from-internal,951,1") in new stack
-- Goto (from-internal,951,1)
-- Executing [951@from-internal:1] Answer("SIP/voipms-00000000", "") in new stack
-- Executing [951@from-internal:2] Wait("SIP/voipms-00000000", "1") in new stack
-- Executing [951@from-internal:3] Set("SIP/voipms-00000000", "TIMEOUT(digit)=7") in new stack
-- Digit timeout set to 7.000
-- Executing [951@from-internal:4] Set("SIP/voipms-00000000", "TIMEOUT(response)=10") in new stack
-- Response timeout set to 10.000
-- Executing [951@from-internal:5] Playback("SIP/voipms-00000000", "/var/lib/asterisk/agi-bin/pleaseholdyahoo") in new stack
-- <SIP/voipms-00000000> Playing '/var/lib/asterisk/agi-bin/pleaseholdyahoo.slin' (language 'en')
-- Executing [951@from-internal:6] AGI("SIP/voipms-00000000", "nv-news-yahoo.php,10") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/nv-news-yahoo.php
-- <SIP/voipms-00000000>AGI Script nv-news-yahoo.php completed, returning 0
-- Executing [951@from-internal:8] AGI("SIP/voipms-00000000", "ibmtts.php,"This Top Stories news update brought to you by Yahoo and Nerd Viddles. From HuffPost: Donald Trump Says He'll ‘Wipe Out’ Puerto Rico’s Massive Debt. '. Have a nice day. Goodbye."") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/ibmtts.php
-- <SIP/voipms-00000000> Playing '/tmp/text.slin' (escape_digits=) (sample_offset 0) (language 'en')
-- <SIP/voipms-00000000>AGI Script ibmtts.php completed, returning 4
== Spawn extension (from-internal, 951, 8) exited non-zero on 'SIP/voipms-00000000'
-- Executing [h@from-internal:1] Hangup("SIP/voipms-00000000", "") in new stack
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/voipms-00000000'
The short answer is that most things work great. As you might expect, FLITE and GV Oauth are broken because of hooks into Asterisk, but that is easily fixed by substituting SIP and a more robust TTS engine such as IBM's. News (option 5) and Weather (option 6) reports demonstrate how easy this was. Feel free to call the number and try it out for yourself (HINT: see line 5 above).
One advantage of this design is that there is no web exposure of your server at all. So, with Apache shut down, you probably could run this in the cloud with little or no firewall protection assuming your SIP passwords are extremely secure.
Last edited: