How to SIP trunk from one FreePBX to another?

How to SIP trunk from one FreePBX to another?

Here is the instruction on how to create a peer to peer trunk between 2 IP-PBX using FreePBX (Elastix, Trixbox, etc.)


Scenario

FreePBX-a IP: 192.168.1.200 SIP extensions: 100, 101, 102, 103, 104, 105

FreePBX-b IP: 192.168.1.100 SIP extensions: 200, 201, 202, 203, 204, 205

we should be able to call 200-205 from extensions 100-105 and vice versa.

How to enable FreePBX-b call FreePBX-a

config on FreePBX-a side

  1. Log into 192.168.1.200
  2. Create a new sip extension (800)
  3. Create a custom trunk and set custom Dial String to: SIP/800/$OUTNUM$

config on smaRtPBX-b side

1) Log into 192.168.1.100

2) create a new sip trunk

3) set trunk name to something (eg. trunk_test)

4) set PEER Details to

fromdomain=192.168.1.200
host=192.168.1.200
username=800
fromuser=800
secret=123456
disallow=all
allow=ulaw&alaw
qualify=yes
context=from-trunk
type=peer
insecure=port,invite
nat=yes
canreinvite=no

5) set Register String to: 800:123456@trunk_test and then submit

6) create a new outbound route and name it to something like trunk-to-srv-a

7) set Dial Pattern to .

8 ) set trunk sequence 0 to SIP/trunk_test

9) submit

10) Apply changes on both sides

now you should be able to call 200 from 100




How to enable FreePBX-a call FreePBX-b

config on FreePBX-b side

  1. Log into 192.168.1.100
  2. Create a new sip extension (700)
  3. Create a custom trunk and set custom Dial String to: SIP/700/$OUTNUM$

config on smaRtPBX-a side

1) Log into 192.168.1.200

2) create a new sip trunk

3) set trunk name to something (eg. trunk_test)

4) set PEER Details to

fromdomain=192.168.1.100
host=192.168.1.100
username=700
fromuser=700
secret=123456
disallow=all
allow=ulaw&alaw
qualify=yes
context=from-trunk
type=peer
insecure=port,invite
nat=yes
canreinvite=no

5) set Register String to: 700:123456@trunk_test and then submit

6) create a new outbound route and name it to something like trunk-to-srv-b

7) set Dial Pattern to .

8 ) set trunk sequence 0 to SIP/trunk_test

9) submit

10) Apply changes on both sides

now you should be able to call 100 from 200




You may also like