Posted On March 29, 2019

How to set up Sip Trunk between two offices

kimconnect 0 comments
blog.KimConnect.com >> Windows >> How to set up Sip Trunk between two offices
1. Set up two Asterisk machines: Asterisk1 & Asterisk2
 
Example for Ubuntu:
vim /etc/network/interfaces
configure static ip address
/etc/init.d/networking restart
 
2. Log onto Asterisk1
 
vim /etc/asterisk/sip.conf
———– contents ——————–
[asterisk2]
type=friend
host={ip_address_of_asterisk2}
context=internal
insecure=invite (this is so that authentication is basing only on IP)
allow=all (or g729 codec only)
[1000]
type=friend
host=dynamic
context=internal
allow=all
secret={someComplexPasswordHere}
———————————————-
 
vim /etc/asterisk/extensions.conf
———– contents ——————–
[internal]
ext => 2000,1,dial(SIP/2000)
ext => 2000,n,Hangup()
 
exten => _1XXX,1,Dial(SIP/${EXTEN}@asterisk1)              (underscore meaning wildcards; {EXTEN} means any extension at asterisk2 server)
exten => _1XXX,n,hangup()
———————————————-
 
3. Log onto Asterisk2
vim /etc/asterisk/sip.conf
———– contents ——————–
[asterisk2]
type=friend
host={ip_address_of_asterisk1}
context=internal
insecure=invite (this is so that authentication is basing only on IP)
allow=all (or g729 codec only)
[2000]
type=friend
host=dynamic
context=internal
allow=all
secret={someComplexPasswordHere}
———————————————-
 
vim /etc/asterisk/extensions.conf
———– contents ——————–
[internal]
ext => 2000,1,dial(SIP/2000)
ext => 2000,n,Hangup()
 
exten => _1XXX,1,Dial(SIP/${EXTEN}@asterisk1)
exten => _1XXX,n,hangup()
———————————————-
 
4. Test
Use any SIP capable phone such as:
Blink
Ekiga
 
 
Commands for troubleshooting:
cat /etc/asterisk/extensions.conf  (cat command to read contents of file)
cat /etc/asterisk/sip.conf 
asterisk (start asterisk)
asterisk -r (reload asterisk settings)
sip reload (reload sip.conf)
dialplan reload (reload extensions.conf)
sip show users (show connected users)
sip show peers (to show all phones that are registered)
dialplan show (show dial plans)

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

How to Disable or Remove Windows Defender

Step 1: Disable Real-time monitoring immediately to minimize current runtime memory resource utilization Set-MpPreference -DisableRealtimeMonitoring…

HPE Smart Update Manager 8.4.0

Step 1: Download ISO onto a Centralized Network Share Step 2: Connect to Remote Server…

Server Decommissioning Procedure

Migrate application or services of old server to new server Obtain approval from application owner…
Other project: DragonCoin.com