Skip to main content

Asterisk 1.6.1 on openSUSE 11.1 (Part 2)

In this second part I will explain step-by-step configuration to use our appliance to build an Asterisk PABX server. Without further ado, here is the list:

Install the Digium card on the PCI slot

Install our appliance. You can also use any linux distribution, download asterisk from its website and install it.
There are several softwares I forget when I made the appliance, it is not the mandatory (dependencies) but they are useful when we want to use asterisk optimally. They are: mpg123, sox, libmad, and festival. The easiest way to install it in openSUSE is using zypper. Check it first where they reside in repositories and add the repositories accordingly. mpg123 and sox are in the packman repositoriy, libmad in OBS (please check with webpin) and festival in oss. Then as root run: "zypper install mpg123 sox libmad0 festival".
It is always useful to update your installation to update repository, to make sure that all the security update is up to date.

Download the latest dahdi from trunk and install it. Don't forget you should connected to internet to run this command as root
“svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-linux”

“cd dahdi-linux”

“make”

and follow the instructions on the screen.

If all the installation successful, then you will have :

/etc/dahdi/

/etc/asterisk/

/var/lib/asterisk/

/var/spool/asterisk/

/etc/init.d/dahdi

/etc/init.d/asterisk161

/usr/sbin/asterisk

/usr/sbin/dahdi_genconf (and several dahdi-tools files)

Connect the telephone line(s) to your digium. Make sure that all the telephone lines are functioning before you connect it (please pay your bill if you don't to that yet, otherwise the announcement in the telephone lines will screw up your asterisk :-)).
As root run “/usr/sbin/dahdi_genconf”. This command will generate the automatic configuration for digium card in file /etc/dahdi/system.conf. In my server it contains:
# Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov 17 18:38:30 2009
# If you edit this file and execute /usr/sbin/dahdi_genconf again,   
# your manual changes will be LOST.                                  
# Dahdi Configuration File                                           
#                                                                    
# This file is parsed by the Dahdi Configurator, dahdi_cfg           
#                                                                    
# Span 1: WCTDM/0 "Wildcard TDM410P Board 1" (MASTER)                
fxsks=1                                                              
echocanceller=mg2,1                                                  
fxsks=2
echocanceller=mg2,2
fxsks=3
echocanceller=mg2,3
fxsks=4
echocanceller=mg2,4

# Span 2: WCTDM/1 "Wildcard TDM410P Board 2"
fxsks=5
echocanceller=mg2,5
fxsks=6
echocanceller=mg2,6
fxsks=7
echocanceller=mg2,7
fxsks=8
echocanceller=mg2,8

# Span 3: WCTDM/2 "Wildcard TDM410P Board 3"
fxsks=9
echocanceller=mg2,9
fxsks=10
echocanceller=mg2,10
fxsks=11
echocanceller=mg2,11
fxsks=12
echocanceller=mg2,12

# Global data

loadzone        = nl
defaultzone     = nl

Actually default loadzone and defaultzone is “us” but I change it to “nl” which is according to ITU is close to Indonesia signaling system. Please check ITU Operational Bulletin No. 781 – 1.II.2003. At least busy tone, congestion tone, and dial tone are running in the same frequency and cadence. If you want you can also rebuild asterisk so that it already contain the frequency and cadence for your country.

Besides /etc/dahdi/system.conf, dahdi_genconf will also automatically configure the file /etc/asterisk/dahdi-channels.conf. In my installation the content of the file is:

; Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov 17 18:38:30 2009
; If you edit this file and execute /usr/sbin/dahdi_genconf again,   
; your manual changes will be LOST.                                  
; Dahdi Channels Configurations (chan_dahdi.conf)                    
;                                                                    
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;                                                                              

; Span 1: WCTDM/0 "Wildcard TDM410P Board 1" (MASTER)
;;; line="1 WCTDM/0/0"                               
signalling=fxs_ks                                    
callerid=asreceived                                  
group=0                                              
context=from-pstn                                    
channel => 1                                         
callerid=                                            
group=                                               
context=default                                      

;;; line="2 WCTDM/0/1"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 2         
callerid=            
group=               
context=default      

;;; line="3 WCTDM/0/2"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 3         
callerid=            
group=               
context=default      

;;; line="4 WCTDM/0/3"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 4         
callerid=            
group=               
context=default      


; Span 2: WCTDM/1 "Wildcard TDM410P Board 2"
;;; line="5 WCTDM/1/0"                      
signalling=fxs_ks                           
callerid=asreceived                         
group=0                                     
context=from-pstn                           
channel => 5                                
callerid=                                   
group=                                      
context=default                             

;;; line="6 WCTDM/1/1"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 6         
callerid=            
group=               
context=default      

;;; line="7 WCTDM/1/2"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 7         
callerid=            
group=               
context=default      

;;; line="8 WCTDM/1/3"
signalling=fxs_ks    
callerid=asreceived  
group=0              
context=from-pstn    
channel => 8         
callerid=            
group=               
context=default      


; Span 3: WCTDM/2 "Wildcard TDM410P Board 3"
;;; line="9 WCTDM/2/0"                      
signalling=fxs_ks                           
callerid=asreceived                         
group=0                                     
context=from-pstn                           
channel => 9                                
callerid=                                   
group=                                      
context=default                             

;;; line="10 WCTDM/2/1"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 10
callerid=
group=
context=default

;;; line="11 WCTDM/2/2"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 11
callerid=
group=
context=default

;;; line="12 WCTDM/2/3"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 12
callerid=
group=
context=default

The core of the asterisk configuration is dialplan. Dialplan manage how asterisk handle all the incoming and outgoing call. It can consist of 3 lines but also can reach tenth or hundreds lines, depends on how the complexity of our configuration. We can also use macro feature on asterisk. Dialplan is placed on /etc/asterisk/extensions.conf. My extensions.conf manage how the incoming call should be handled, how to make outgoing call to PSTN, GSM line and sip extensions, how to make conference call, how to connect to other asterisk server using IAX2 protocol, use the monitor application to record the conversation and how to make greeting. I will explain our extensions.conf in more detail in the next post together with sip.conf, iax.conf, meetme.conf and voicemail.conf.

Stay tuned and have a lot of fun :-)

Comments

  1. Boleh numpang tanya?

    Cara mengubah
    loadzone = nl
    defaultzone = nl

    dari us -> nl edit file mana supaya bisa auto generate ke /etc/dahdi/system.conf ?

    ReplyDelete
    Replies
    1. Saya mengubah secara manual pada file /etc/dahdi/system.conf

      Delete

Post a Comment

Popular posts from this blog

openSUSE.Asia Summit 2017

openSUSE.Asia Summit 2017 was held at University of Electro Communication (UEC) Chofu Tokyo on October 20-22, 2017. Japan is an advance developed country. Tokyo is a big city that can be compared with other major big cities in the world. While it is not the first time for me to go to Tokyo, I was so excited when the committee approved my talk, and openSUSE, as always, give me TSP to come to the event.


During the preparation we have  online meeting every week since February 15, 2017. I was so happy to help the preparation of this yearly openSUSE Summit for Asia Region. Indonesia community also contribute to provide the online voting for the logo contest this year through the voting site.

On the midnight on October 17, 2017 together with my friend Estu Fardani, I went to Tokyo.

It was 7 hours long flight. While almost half of the flight was so bumpy because the initiation of Lan Cyclone, in the morning of October 18, 2017 I enjoyed the clear sky with the golden hour in Japan air around…

FOSSASIA 2017

It's been a while since last time I wrote to this blog. I've been busy with my work and don't have time to make a notes here. However there are some posts I write for openSUSE Indonesia, you can go this link if you will.

On January 12, Douglas DeMaio from openSUSE contact me if I have time to go to FOSSASIA 2017 schedule in Singapore on 17-19 March. I checked my calendar and the date was available for me. So I reply his email and said I will go there to represent openSUSE at booth.

openSUSE become Silver sponsor for FOSSASIA 2017, and also have 2 talks by my colleagues Gary Lin from SUSE Labs Taipei and Zhao Qiang from SUSE Beijing on Day 2. I (only) became a booth-person this time :-)

Doug sent me some stickers to bring to the crowd which consists of:
94 webcam covers
128 Tumbleweed stickers
108 Leap stickers
213 openSUSE stickers
174 OBS stickers
175 Portus stickers
116 Alex the Geeko stickers
56 small black Geeko stickers
78 power by openSUSE stickers
30 openSUSE pamphl…

Heartbeat dan DRBD

Dalam sebuah implementasi saya harus mengganti implementasi vrrpd (virtual router redundancy protocol) dengan heartbeat+drbd disebabkan adanya penambahan database dalam server yang digunakan. Service awal pada mesin ini hanyalah web server statis, named dan dhcpd yang relatif statis dan file-filenya saya sinkronisasi dengan rsync. Tetapi dengan adanya penambahan database (mysql) dibutuhkan sebuah mekanisme dimana data yang disimpan dalam satu mesin primary dapat secara langsung ditulis juga ke mesin backup. Untuk hal yang terakhir ini vrrpd saja tidak mencukupi karenanya saya harus mengganti vrrpd dengan heartbeat (baca hartbit, bukan hertbet :-) )sedangkan untuk menjamin mekanisme clusternya saya menggunakan drbd.

Implementasi heartbeat saja sangatlah mudah. Cukup mendownload, mengkompilasi dan mengkonfigurasi tiga buah file /etc/ha.d/ha.cf, /etc/ha.d/authkeys dan /etc/ha.d/haresources. Untuk drbd bisa download tarball dan jangan lupa untuk membaca dokumentasinya, karena drbd harus d…