Difference between revisions of "VoIP: Cara Mengkonfigurasi Trunk di Asterisk"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
+ | Disain asterisk memisahkan antara in-bound dan out-bound call. | ||
+ | In-bound call membutuhkan untuk di terima oleh SIP dan di arahkan ke context call plan. | ||
+ | Out-bound call aplikasi dial membutuhkan profile spesifik di konfigurasi SIP atau registrasi ke tujuan. | ||
− | + | ==Context== | |
− | + | Kesulitan utama dalam konfigurasi SIP trunking di asterisk adalah berbagai parameter di sip.conf dan sip_trunk.conf. | |
− | + | Pada contoh ini, kita akan membuat dua asterisk server | |
− | + | * asterisk-bangkok | |
+ | * asterisk-paris | ||
− | + | kedua-nya menggunakan IP address statik dalam jaringan yang sama. | |
− | + | Dalam dial plan | |
− | + | * 91 untuk menelepon Bangkok | |
+ | * 98 untuk menelepon Paris. | ||
− | + | ==Konfigurasi Sederhana== | |
+ | |||
+ | Untuk mengijinkan Paris untuk menelpon Bangkok. Konfigurasi pada masing-masing sip.conf | ||
− | |||
Bangkok | Bangkok | ||
− | |||
− | |||
− | |||
[trunk-bangkok-paris] | [trunk-bangkok-paris] | ||
type=peer | type=peer | ||
host=asterisk-paris | host=asterisk-paris | ||
context=from-asterisk-paris | context=from-asterisk-paris | ||
− | + | ||
+ | Paris | ||
[trunk-paris-bangkok] | [trunk-paris-bangkok] | ||
Line 36: | Line 40: | ||
host=asterisk-bangkok | host=asterisk-bangkok | ||
− | + | Pada dial plan (extensions.conf) call akan meninggalkan Paris dengan konfigurasi: | |
exten => _91.,1,Set(CALLERID(num)=98${CALLERID(num)}) | exten => _91.,1,Set(CALLERID(num)=98${CALLERID(num)}) | ||
exten => _91.,2,Dial(SIP/trunk-paris-bangkok/${EXTEN:2},20,rt) | exten => _91.,2,Dial(SIP/trunk-paris-bangkok/${EXTEN:2},20,rt) | ||
− | + | Agar memungkinkan struktur multi site dialin plan, kita memodifikasi caller ID dengan menambahkan Prefix Paris (98). | |
− | + | Aplikasi Dial akan me-redirect call ke SIP trunk yang bernama trunk-paris-bangkok, yang di definisikan di defined sip.conf. Tipe trunk di set sebagai peer karena kita menginginkan call untuk langsung ke IP address yang di definisikan di parameter host. | |
When a call needs to be established, a SIP INVITE message arrives on the Asterisk based in Bangkok. Asterisk looks in the SIP database for a profile which can accept this call, the IP address is used as the discriminator. The asterisk-paris profile match this requirement. The next action is to direct the call to the specified context and look for an extension match. | When a call needs to be established, a SIP INVITE message arrives on the Asterisk based in Bangkok. Asterisk looks in the SIP database for a profile which can accept this call, the IP address is used as the discriminator. The asterisk-paris profile match this requirement. The next action is to direct the call to the specified context and look for an extension match. | ||
− | Call | + | ==Call di Jalur Sebaliknya== |
Now that a call can be placed from Paris to Bangkok, we need the reverse configuration in order for Bangkok to be able to call Paris. Required modification to our configuration are in bold below: | Now that a call can be placed from Paris to Bangkok, we need the reverse configuration in order for Bangkok to be able to call Paris. Required modification to our configuration are in bold below: | ||
Bangkok | Bangkok | ||
− | |||
− | |||
− | |||
[trunk-bangkok-paris] | [trunk-bangkok-paris] | ||
type=peer | type=peer | ||
host=asterisk-paris | host=asterisk-paris | ||
− | context=from-asterisk-paris | + | context=from-asterisk-paris |
+ | |||
+ | Paris | ||
[trunk-paris-bangkok] | [trunk-paris-bangkok] | ||
Line 71: | Line 74: | ||
exten => _98.,2,Dial(SIP/trunk-bangkok-paris/${EXTEN:2},20,rt) | exten => _98.,2,Dial(SIP/trunk-bangkok-paris/${EXTEN:2},20,rt) | ||
− | Authenticated SIP trunk | + | ==Authenticated SIP trunk== |
It is sometimes required to authenticate calls routed from one PBX to another. Most of the time the main point is billing or tracking calls. Authenticating each call acts as an approval for the associated fees or constraints. Keep in mind that configuration is at the PBX level and not at the phone level and is not as strong as what we can do with X.509 certificates. Authentication for SIP is using a digest exchange and MD5 as the signature, therefore the secret exchanged between both entities is never exchanged in clear over the network. | It is sometimes required to authenticate calls routed from one PBX to another. Most of the time the main point is billing or tracking calls. Authenticating each call acts as an approval for the associated fees or constraints. Keep in mind that configuration is at the PBX level and not at the phone level and is not as strong as what we can do with X.509 certificates. Authentication for SIP is using a digest exchange and MD5 as the signature, therefore the secret exchanged between both entities is never exchanged in clear over the network. | ||
Line 79: | Line 82: | ||
Bangkok | Bangkok | ||
− | |||
− | |||
− | |||
[trunk-bangkok-paris] | [trunk-bangkok-paris] | ||
type=peer | type=peer | ||
Line 88: | Line 88: | ||
username=trunk-paris-bangkok | username=trunk-paris-bangkok | ||
secret=strong_password | secret=strong_password | ||
− | + | ||
+ | Paris | ||
[trunk-paris-bangkok] | [trunk-paris-bangkok] | ||
Line 99: | Line 100: | ||
The coloured parts should match in both configurations. | The coloured parts should match in both configurations. | ||
− | Conclusion | + | ==Conclusion== |
A SIP trunk between two Asterisk PBX is as simple and allows to easily expand the IP telephony network. Interfacing an Asterisk with any other SIP PBX will require something similar, this is the case when connecting to an IP telephony provider. We will see in another article how to take care of the NAT issues and the impact on Asterisk configuration and the network infrastructure. | A SIP trunk between two Asterisk PBX is as simple and allows to easily expand the IP telephony network. Interfacing an Asterisk with any other SIP PBX will require something similar, this is the case when connecting to an IP telephony provider. We will see in another article how to take care of the NAT issues and the impact on Asterisk configuration and the network infrastructure. | ||
Line 112: | Line 113: | ||
==Lebih Dalam== | ==Lebih Dalam== | ||
+ | * [[VoIP: Trunk]] | ||
* [[VoIP: Asterisk menerima Anonymous Call]] | * [[VoIP: Asterisk menerima Anonymous Call]] | ||
* [[VoIP: Asterisk route ke arah IP PBX lain dengan kode area]] | * [[VoIP: Asterisk route ke arah IP PBX lain dengan kode area]] | ||
* [[VoIP: Cara Mengkonfigurasi Trunk di Asterisk]] | * [[VoIP: Cara Mengkonfigurasi Trunk di Asterisk]] | ||
* [[VoIP: Cara Mengkonfigurasi Dial Out Melalui Trunk di Asterisk]] | * [[VoIP: Cara Mengkonfigurasi Dial Out Melalui Trunk di Asterisk]] | ||
+ | * [[VoIP: Asterisk forward call ke IP softswitch lain]] | ||
+ | |||
+ | ===Asterisk Round Robin=== | ||
+ | |||
+ | * [[VoIP: Astersk Dial Round Robin]] | ||
+ | * [[VoIP: Asterisk pakai GotoIf]] | ||
===OpenSIPS=== | ===OpenSIPS=== | ||
Line 121: | Line 129: | ||
* [[VoIP: OpenSIPS route ke arah Asterisk]] | * [[VoIP: OpenSIPS route ke arah Asterisk]] | ||
* [[OpenSIPS: Rewrite URI]] | * [[OpenSIPS: Rewrite URI]] | ||
+ | * [[OpenSIPS: Rewritehostport]] | ||
+ | ===OpenSIPS round robin=== | ||
− | + | * [[OpenSIPS: dispatcher]] | |
− | |||
==Pranala Menarik== | ==Pranala Menarik== |
Latest revision as of 19:55, 25 February 2014
Sumber: http://www.alkia.net/index.php/faqs/137-how-to-configure-sip-trunk-with-asterisk
Disain asterisk memisahkan antara in-bound dan out-bound call.
In-bound call membutuhkan untuk di terima oleh SIP dan di arahkan ke context call plan.
Out-bound call aplikasi dial membutuhkan profile spesifik di konfigurasi SIP atau registrasi ke tujuan.
Context
Kesulitan utama dalam konfigurasi SIP trunking di asterisk adalah berbagai parameter di sip.conf dan sip_trunk.conf.
Pada contoh ini, kita akan membuat dua asterisk server
- asterisk-bangkok
- asterisk-paris
kedua-nya menggunakan IP address statik dalam jaringan yang sama.
Dalam dial plan
- 91 untuk menelepon Bangkok
- 98 untuk menelepon Paris.
Konfigurasi Sederhana
Untuk mengijinkan Paris untuk menelpon Bangkok. Konfigurasi pada masing-masing sip.conf
Bangkok
[trunk-bangkok-paris] type=peer host=asterisk-paris context=from-asterisk-paris
Paris
[trunk-paris-bangkok] type=peer host=asterisk-bangkok
Pada dial plan (extensions.conf) call akan meninggalkan Paris dengan konfigurasi:
exten => _91.,1,Set(CALLERID(num)=98${CALLERID(num)}) exten => _91.,2,Dial(SIP/trunk-paris-bangkok/${EXTEN:2},20,rt)
Agar memungkinkan struktur multi site dialin plan, kita memodifikasi caller ID dengan menambahkan Prefix Paris (98).
Aplikasi Dial akan me-redirect call ke SIP trunk yang bernama trunk-paris-bangkok, yang di definisikan di defined sip.conf. Tipe trunk di set sebagai peer karena kita menginginkan call untuk langsung ke IP address yang di definisikan di parameter host.
When a call needs to be established, a SIP INVITE message arrives on the Asterisk based in Bangkok. Asterisk looks in the SIP database for a profile which can accept this call, the IP address is used as the discriminator. The asterisk-paris profile match this requirement. The next action is to direct the call to the specified context and look for an extension match.
Call di Jalur Sebaliknya
Now that a call can be placed from Paris to Bangkok, we need the reverse configuration in order for Bangkok to be able to call Paris. Required modification to our configuration are in bold below:
Bangkok
[trunk-bangkok-paris] type=peer host=asterisk-paris context=from-asterisk-paris
Paris
[trunk-paris-bangkok] type=peer host=asterisk-bangkok context=from-asterisk-bangkok
In Bangkok we also need a specific set of action to allow a call, prefixed by 98 to be routed towards Paris:
exten => _98.,1,Set(CALLERID(num)=91${CALLERID(num)}) exten => _98.,2,Dial(SIP/trunk-bangkok-paris/${EXTEN:2},20,rt)
Authenticated SIP trunk
It is sometimes required to authenticate calls routed from one PBX to another. Most of the time the main point is billing or tracking calls. Authenticating each call acts as an approval for the associated fees or constraints. Keep in mind that configuration is at the PBX level and not at the phone level and is not as strong as what we can do with X.509 certificates. Authentication for SIP is using a digest exchange and MD5 as the signature, therefore the secret exchanged between both entities is never exchanged in clear over the network.
Authentication is based on login and password validation. The password is called secret in the configuration and login is called username. The username is not mandatory and can be derived from the configuration, but specifying it is clearer and easier to troubleshoot in case of. Configuration changes are availabe below:
Bangkok
[trunk-bangkok-paris] type=peer host=asterisk-paris context=from-asterisk-paris username=trunk-paris-bangkok secret=strong_password
Paris
[trunk-paris-bangkok] type=peer context=from-asterisk-bangkok host=asterisk-bangkok username=trunk-bangkok-paris secret=strong_password
The coloured parts should match in both configurations.
Conclusion
A SIP trunk between two Asterisk PBX is as simple and allows to easily expand the IP telephony network. Interfacing an Asterisk with any other SIP PBX will require something similar, this is the case when connecting to an IP telephony provider. We will see in another article how to take care of the NAT issues and the impact on Asterisk configuration and the network infrastructure.
Referensi
Lebih Dalam
- VoIP: Trunk
- VoIP: Asterisk menerima Anonymous Call
- VoIP: Asterisk route ke arah IP PBX lain dengan kode area
- VoIP: Cara Mengkonfigurasi Trunk di Asterisk
- VoIP: Cara Mengkonfigurasi Dial Out Melalui Trunk di Asterisk
- VoIP: Asterisk forward call ke IP softswitch lain
Asterisk Round Robin
OpenSIPS
OpenSIPS round robin
Pranala Menarik
Latar Belakang
- Menjadikan VoIP dan 4G Legal
- Sekitar VoIP Rakyat
- VoIP: Dasar Hukum Internet Telepon
- VoIP: Beberapa Skenario Topologi
- VoIP: Pilihan Teknologi Internet Telepon
- VoIP: Pengkodean Suara di Jaringan Komputer
- VoIP: Konsep Video Conference
Untuk Pemula
Untuk Peneliti / Pencoba
- VoIP: Bandwidth Internet Telepon
- VoIP: Softswitch / Server Internet Telepon
- VoIP: Repository Software Internet Telepon
- VoIP: Menghubungkan PSTN dan Selular
Untuk Operator
- VoIP: Server Video Conference
- VoIP: Software dan peralatan client Internet Telepon
- VoIP: Penggunaan DAHDI
- VoIP: Hardware Client VoIP
- VoIP: Hardware Server VoIP
- VoIP: Interkoneksi dan Alokasi Nomor Telepon
- VoIP: Peering Antar Operator VoIP
- VoIP: Menghubungkan PSTN dan Selular
- VoIP: Trunk
Topik Lanjut
- VoIP: ENUM untuk pengenalan nomor telepon di Internet Telepon
- VoIP: Teknik Evaluasi Internet Telepon
- VoIP: Troubleshooting
- VoIP: Video Conference Server
Buku Teknologi VoIP
- Onno W. Purbo, "VoIP Cikal Bakal Telkom Rakyat", Infokomputer, 2007.
- http://125.160.17.21/speedyorari/index.php?dir=ebook-voip
- http://opensource.telkomspeedy.com/speedyorari/index.php?dir=ebook-voip