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

Troubleshooting Active Directory Replication Issues

How to Check Domain Controller Syncronization Check replication summary [TEST-DC02]: PS C:\Users\testadmin\Documents> Repadmin /replsummary Replication…

How To Change Default Backup Directory of Microsoft SQL Server

Option 1: Use the GUI Run Ssms.exe > login as sa > Right-click SQL Server…

Veritas Backup Exec Account Setup to Authenticate Domain Controllers

1. ADUC >> Create domain user account named "backup" belonging to Administrators, Backup Operators groups…