69 Selesai sudah proses instalasi asterisk. Tahap selanjutnya yang
perlu dilakukan adalah mengkonfigurasi agar sesuai dengan apa yang kita inginkan. Konfigurasi Asterisk dengan tujuan untuk meng-authentikasi
user, mengkonfigurasi dial-plan tidak banyak yang harus dilakukan. Seluruh proses konfigurasi utama merupakan proses editing file-file yang
terdapat di folder etcasterisk. Selanjutnya untuk konfigurasi asterisk, file yang perlu
ditambahkan antara lain: a. Sip.conf
: untuk authentikasi user dengan nomor telepon dan password menggunakan protokol SIP
b. Iax.conf : untuk authentikasi user dengan nomor telepon dan
password menggunakan protokol IAX2. c. Extension.conf
: untuk mengatur dialplan d. Rtp.conf
: untuk mengatur port rtp secara manual
3.9.3 Contoh Pembacaan Konfigurasi
[general] merupakan context umum port=5060 port yang digunakan SIP
bindaddr=0.0.0.0 listen semua ip address yang request [101] context user, dipakai di extensions.conf untuk setting nomor VoIP
type=friend tipe client host=dynamic menyatakan ip address dapat berubah
context=default context jaringan canreinvite=no mekanisme canreinvite
insecure=very tidak perlu re-authenticate username=101 login client
secret=1234 password client callerid=”ruang1” id client
nat=yes set no jika tidak berada di belakang NAT
70
3.9.4 Konfigurasi Sip.conf
Pada server VoIP pertama ubah isi file etcasterisksip.conf untuk pembuatan account dengan nomor telepon 1001 sampai 1004 maka entry
yang digunakan adalah: register = labsi1:labsi1192.168.1.652001
[labtk1] type=friend
username=labtk1 secret=labtk1
callerid=labtk1 1001 host=dynamic
nat=yes insecure=port
canreinvite=no allow=all
dtmfmode=rfc2833 mailbox=labtk1default
[labtk2] type=friend
username=labtk2 secret=labtk2
callerid=labtk2 1002 host=dynamic
nat=yes insecure=port
canreinvite=no allow=all
dtmfmode=rfc2833 mailbox=labtk2default
71 [labtk3]
type=friend username=labtk3
secret=labtk3 callerid=labtk3 1003
host=dynamic nat=yes
insecure=port canreinvite=no
allow=all dtmfmode=rfc2833
mailbox=labtk3default [labtk4]
type=friend username=labtk4
secret=labtk4 callerid=labtk4 1004
host=dynamic nat=yes
insecure=port canreinvite=no
allow=all dtmfmode=rfc2833
mailbox=labtk4default Untuk trunk ke server VoIP kedua harus ditambahkan entry
account server VoIP kedua pada file etcasterisksip.conf di server VoIP pertama, yaitu:
72 [labsi1]
type=friend username=labsi1
secret=labsi1 callerid=labsi server
fromuser=labsi1 fromdomain=192.168.1.65
host=192.168.1.65 insecure=port,invite
canreinvite=no nat=yes
allow=all dtmfmode=rfc2833
mailbox=labsi1default Pada server VoIP kedua ubah isi file etcasterisksip.conf untuk
pembuatan account dengan nomor telepon 2001 sampai 2004 maka entry yang digunakan adalah:
register = labtk1:labtk1192.168.1.621001 [labsi1]
type=friend username=labsi1
secret=labsi1 callerid=labsi1 2001
host=dynamic nat=yes
insecure=port canreinvite=no
allow=all dtmfmode=rfc2833
73 mailbox=labsi1default
[labsi2] type=friend
username=labsi2 secret=labsi2
callerid=labsi2 2002 host=dynamic
nat=yes insecure=port
canreinvite=no allow=all
dtmfmode=rfc2833 mailbox=labsi2default
[labsi3] type=friend
username=labsi3 secret=labsi3
callerid=labsi3 2003 host=dynamic
nat=yes insecure=port
canreinvite=no allow=all
dtmfmode=rfc2833 mailbox=labsi3default
[labsi4] type=friend
username=labsi4
74 secret=labsi4
callerid=labsi4 2004 host=dynamic
nat=yes insecure=port
canreinvite=no allow=all
dtmfmode=rfc2833 mailbox=labsi4default
Untuk trunk ke server VoIP pertama harus ditambahkan entry account server VoIP pertama pada file etcasterisksip.conf di server VoIP
kedua, yaitu: [labtk1]
type=friend username=labtk1
secret=labtk1 callerid=labtk server
fromuser=labtk1 fromdomain=192.168.1.62
host=192.168.1.62 insecure=port,invite
canreinvite=no nat=yes
allow=all dtmfmode=rfc2833
mailbox=labtk1default
75
3.9.5 Konfigurasi IAX.conf