I HAVE A DREAM Command Line Utilities for FreePBX + Drag-and-Drop GUI

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
Since no one else has volunteered, we are beginning the painful process of creating BASH command line utilities to add extensions, trunks, outbound routes, inbound routes, and perhaps other components such as IVRs, call forwarding, etc. to PBX in a Flash and Incredible PBX. See also our earlier work with Phone Genie for other features we plan to incorporate. Should work fine with other FreePBX 2.11-compatible distros , but I'm not testing them!

This will be a slow process as time permits. It's even slower because it requires reverse-engineering numerous pieces of FreePBX code to get things to work with and remain compatible with FreePBX 2.11. As (more) time permits, we will rework the basic components to work with FreePBX 12 as well, but the initial releases HAVE NOT BEEN TESTED AND PROBABLY WILL NOT WORK with FreePBX 12!

If there are other components anyone desperately needs or wants, post a note about what is desired and why. It will then be prioritized on the Wish List. If others wish to contribute GPL2 code, please feel free to jump in.



The long-range objective is to get these command-line utilities built and then hire some off-shore programmers to write a drag-and-drop GUI (see proof-of-concept video) similar to what's available with Anveo, RingRoost, and pbxww.com. See this thread for some examples. See jsPlumb documentation used for proof-of-concept video here. The GUI would hook into these command-line utilities to put the pieces together while remaining compatible with FreePBX. No promises whether it will be GPL2 code or commercial. Kinda depends on the development cost.

 
  • Like
Reactions: ibstelix

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
Call Forwarding

Forward Calls Syntax: call-forward ext-num fwd-num

Cancel Forwarding Syntax: call-forward ext-num cancel/disable/delete

License: GPL2

Version: 0.002
 

Attachments

  • Like
Reactions: ibstelix

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
Create Sample Trunks

Create Sample Trunks Syntax: create-sample-trunks now

License: GPL2

Version: 0.002

This script should be especially helpful (now) to those installing Incredible PBX for CentOS or Incredible PBX for Ubuntu 14. It creates and then disables the Baker's Dozen Trunks that were included in earlier builds of Incredible PBX 11 for PBX in a Flash servers. Just add your credentials and enable the desired trunks using FreePBX (for now).

Strongly recommend that this only be run on virgin installs until more testing is done. Unless you have 70+ existing trunks, running this script shouldn't step on any of them.:taz:
Vitelity
AxVoice
CallCentric
DIDforSale
FlowRoute
Future-Nine
IPkall
Les.net
LocalPhone
Teliax
VoIP.ms
VoipMyWay
VoipStreet
 

Attachments

  • Like
Reactions: ibstelix

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
List Inbound Routes

Syntax: list-inbound-routes

License: GPL2

Version: 0.002

One of the real shortcomings of FreePBX is that there's no way to quickly identify which Trunk is associated with the DID specified in an Inbound Route. Usually, but not always, the DID matching that of the Inbound Route is tacked onto the end of the Trunk's Registration String. But this only applies to registered Trunks. Thus, it is prudent to name Inbound Routes in a way that identifies the Trunk to which each is associated.

Example below shows a Default Inbound Route with a destination of the IVR sample shown here.

 

Attachments

  • Like
Reactions: ibstelix

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
List Outbound Routes

Syntax: list-outbound-routes

License: GPL2

Version: 0.002

If you enjoy hairy MySQL queries with 4-table joins, this Bud's for you! In FreePBX parlance, this example shows two Outbound Routes (in seq order as shown in column 1). The first Outbound Route has two Routes specified in its Trunk Sequence (which are displayed in priority order based upon column 6 seq entries). All sequences start with 0. None of the trunks have Outbound CallerID set. Since all of the specified trunks have their disabled flag set on, outbound calls will go nowhere. This is a great troubleshooting tool for outbound call issues. :smartass:

 

Attachments

  • Like
Reactions: ibstelix

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
14,963
Reaction score
2,582
Here's the Po' Folks one-minute demo of how we envision the drag-and-drop GUI working with the GPL2 components in this thread to generate code for your existing Incredible PBX server.

You would first click on each of the components to create and/or select extensions and trunks for inbound and outbound routes as well as a destination for failed calls and voicemail. This isn't shown in the video. Then you would use drag-and-drop connectors to interconnect the desired components in the way you want them to work (see video demo). Then the software would generate the necessary code to populate the requested setup to your existing Incredible PBX server for operation with Asterisk 11 and FreePBX 2.11.

 
  • Like
Reactions: ibstelix

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
These are great. Thanks Ward. :)

I have a lot of inbound routes, so I modified your script slightly to show the name of the route and sort by it. This works a little better for me in my own situation.

Code:
mysql -u $DBUSER -p$DBPASS asterisk -e "select description,cidnum,extension,destination from incoming order by description"
 
  • Like
Reactions: wardmundy

matthew

Guru
Joined
May 22, 2013
Messages
83
Reaction score
26
I was inspired by this thread, so thought I'd whip up a quick script to do something like it on the cli. There's probably a million ways it could be improved.

show_active_calls
Code:
#!/bin/bash -
echo "A Party          B Party"
asterisk -rx "core show channels concise"|awk -F ! '$6 == "Dial" { print $8"\t"$7 }'|sed -e 's/\t.*\//\t/g' -e 's/,.*$//g'
 
  • Like
Reactions: wardmundy

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,274
Messages
136,540
Members
14,505
Latest member
athan