TUTORIAL Gotcha-Free PBX: Add-a-Trunk

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
15,136
Reaction score
2,627
We've completed the first (of many) Trunk Add-Ons for Incredible PBX for Asterisk-GUI.

This will also serve as a template for those that wish to add new trunks using the same methodology we used to build the 'Incredible 9' collection. This keeps new trunks compatible with both Incredible PBX and Asterisk-GUI.

Add-On Trunk: DIDforsale (HINT: DIDforsale provides a FREE DID service to try things out for up to 4 hours! Their IP addresses already are included in the IPtables WhiteList.)

Installation: Download, untar, and run the install script to add DIDforsale to your server. Or just review the code and clone it for your own providers.
Code:
cd /root
wget http://incrediblepbx.com/DIDforsale.tar.gz
tar zxvf DIDforsale.tar.gz
rm DIDforsale.tar.gz
cd DIDforsale
./install
Contents: The tarball includes the following files...
Code:
COPYING (the GPL2 license)
credentials_DIDforsale.conf (the Trunk setup filename must begin with credentials_)
DIDforsale.pbx (the Dialplan for incoming and outgoing calls)
install (the installer)
Rolling Your Own:

1. Be consistent. Choose a name for the provider and use the same name and capitalization throughout the build.
Code:
PROVIDER=SomeBodyGood
cd /root
mkdir $PROVIDER
cd $PROVIDER
When you're finished, you should have COPYING, credentials_SomeBodyGood.conf, SomeBodyGood.pbx, and install files in /root/SomeBodyGood.

2. Imitation is the sincerest form of flattery. Find an existing setup for your Trunk (elsewhere) that works.

3. Copy all of the Trunk setup into the credentials file adding the special Asterisk-GUI settings already included in this sample:
; DIDforsale trunk Outbound Dialing Prefix = 33
[DIDforsale_209.216.2.211]
trunkname = DIDforsale1 ; GUI metadata
context = DID_DIDforsale
hasexten = no
hasiax = no
hassip = yes
registeriax = no
registersip = no ; change to yes if provider supports SIP registration
trunkstyle = voip
host = 209.216.2.211
type = peer
nat = no
qualify = no
disallow = all
allow = ulaw
4. Choose an unused dialing prefix for your new trunk, and choose a destination for the incoming calls using the examples in the sample. For DIDforsale, we chose 33 for the dialing prefix and chose the Stealth AutoAttendant with Ring Group for the Incoming Calls Destination. Adjust the Dialplan code for your Provider.pbx accordingly. Fax is an option!

5. Edit install script and replace DIDforsale in line 1 with the name of the new provider. That's it.

6. Once all of the files (correctly named!) are in place, change to the /root directory and create the tarball:
Code:
PROVIDER=SomeBodyGood
tar -zcf $PROVIDER.tar.gz $PROVIDER
7. Share your creations!

See also:
 

Attachments

  • Like
Reactions: gkuch

joktel

New Member
Joined
Jan 16, 2015
Messages
7
Reaction score
1
Hello Ward, I'm new in the forum and which just instal the great Gotcha GUI... very impressive about this great PBX...

I tried this step but could not find the crediential file for the new TRUNK I am creating... I am creating ANVEO which is the ANVEO twin-service...
this is my code
Code:
cd /root
mkdir ANVEO
cd ANVEO
here in the next set I got lost... please rescue...
I could see LALL various tunck credential files but could not find the ANVEO to past the adapted DIDFORSALE data
Rolling Your Own:

When you're finished, you should have COPYING, credentials_SomeBodyGood.conf, SomeBodyGood.pbx, and install files in /root/SomeBodyGood.
 

joktel

New Member
Joined
Jan 16, 2015
Messages
7
Reaction score
1
There is no doubt Ward, you and your co-developers are making a landmark difference.
 

Kimmy Dallas Posey

New Member
Joined
Apr 20, 2015
Messages
13
Reaction score
2
Hi Ward,

I was attempting to knock one of these up for VoIPstreet. For some reason though, the sed command that inserts the $PROVIDER.pbx and the following command that adds the credentials file include directive to users.conf seems to Gack (silently). Diff'ed the install with the sample and only diff is the name as suggested above. However looking at it, shouldn't sed be looking for "include = page_an_extension" instead of [include = page_an_extension]? The rest of the preconfigured trunks seem to be there. I couldn't find [include = page_an_extension] in extensions.conf though it does contain [page_an_extension]. Nothing in that block though.

Thx,

Dallas
 
  • Like
Reactions: wardmundy

Members online

PIAF 5 - Powered by 3CX

Forum statistics

Threads
22,367
Messages
137,355
Members
14,575
Latest member
Issue