How to create custom trunk in freepbx with custom dial string

Topic: FreePBX custom Trunk and Custom dial String

    Step by step guide to create custom trunk in FreePBX with custom dial string. If you are configuring the Trunks in FreePBX cli or you are not familiar with Freepbx GUI you can use the Freepbx Custom Trunk option to configure your trunk with Custom dial string matching your dialplan and TRUNK name.

freepbx custom trunk custom dial string

What is Freepbx?

    FreePBX is a web-based open-source graphical user interface (GUI) that manages Asterisk, a voice over IP and telephony server.

FreePBX is licensed under the GNU General Public License version 3.

Overview: Freepbx Custom Trunk

    In Freepbx sometimes you may need to configure the Trunks and dialpaln in cli instead of FreePBX gui and in Freepbx the outbound route will only list the trunks which are created in GUI - Trunk section.

    To overcome this issue , Freepbx have the option to create custom trunk, where you can define your trunks created in sip_custom.conf.

Steps to create Freepbx Custom Trunk

    To use the FreePBX custom trunk ,you need to create your trunk and a dialplan to dial over the new custom trunk. The files to create custom trunk and custom dialplan are sip_custom.conf and extensions_custom.conf

1. Configure your trunks (SIP/IAX/PRI) in there respective XXX_custom.conf
    example: vi /etc/asterisk/sip_custom.conf
[voiptrunk]
type=fried
username=xxxx
secret=yyyy
host=192.168.1.222
disallow=all
allow=all
qualify=yes
2.Create a custom dialplan with proper context and trunk in extensions_custom.conf

    example
vi /etc/asterisk/extensions_custom.conf
[my-outgoing]
exten => _X.,1,Answer()
exten => _X.,2,Dial(SIP/voiptrunk/${EXTEN},,Ttor)
extne => _X.,3,Hangup

 3. Now in Freepbx under Trunks create Custom Trunk  and under custom dial string enter the below format

Dial String = Local/$OUTNUM$@my-outgoing

If you want to define trunk without a dialplan use the below custom dialplan string

Dial String = SIP/$OUTNUM$@192.168.1.123
Dial String = IAX2/$OUTNUM$@192.168.1.123

Conclusion:

    If you are looking for how to configure trunk in Freepbx cli ,then you may follow this guide. For any professional support reach me on skype or telegram id:striker24x7

1 Comments
  • Ajit Kumar
    Ajit Kumar April 4, 2022 at 11:42 AM

    How to Create Custom Trunk in Freepbx

Add Comment
comment url