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

SAN Storage: Using 3PAR StoreServ to Provision LUNs for vSphere ESXi or Windows Server

Overview: Assumptions MDS Zoning Configuration has been completed. Operating Systems ESXi OS has been installed…

How to recreate user profile on Windows 7

Method 1: You can do it with the User Profiles dialog in System Properties: Log…

Windows: Disable Low Disk Space Warning

To disable these balloon messages follow the steps below: 1. Open the Registry Editor by…