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

Remarkable Year 2018 for openSUSE Indonesia Community

Year 2018 is a remarkable year for the Indonesian openSUSE community. There are quite a lot of our achievements as a community that make us proud. As a long time person in this community, I feel that there are quite a lot of young people who can be role models for future generations. Even though the dominance of "you again" cannot be denied, because the same people are also activists in BlankON, LibreOfficeID, Glib, and other communities, it does not reduce my admiration for their militancy towards the spread of FOSS use in Indonesia.



One of openSUSE community friend once said to me, the first step is the most difficult. When I started using Linux in 1997 no one used it at my workplace. I have been using Unix for about 2 years and it happens that many GNU software is also used on both operating systems so the commands are not so weird for me. But it is very difficult to find people to have direct discussion at that time. At present the obstacles that I felt before seemed to b…

In Search of Manohara

Notes:
I always write note in my laptop and put it somewhere either on disk or cloud when I think there is an interesting experience. I found this 7 years old note when I try to clear some space in my disk, and before I wipe it out from my disk I think it is an interesting story to share with you. This happened in 2011, at that time I was working to build Linux based computer labs for 500 elementary and junior high schools in Yogyakarta Indonesia. No it is not about computer and other geeky stuff. So here it is. 

Well, it is very out of topic everyone, you've already been warned 😁

During my busy weeks in implementing openSUSE Li-f-e for schools in Yogyakarta Indonesia (see the pictures below), me and one of my colleague use our free time in a Sunday afternoon to visit Borobudur, the biggest Buddhist temple in the world. One of the World Heritage preserve by Unesco. 85% of Indonesia population are Moslem and this make Indonesia the biggest Moslem country in the world. We are tolerant…

Mengenang Bapak

Mohammad Ali Zakaria, bapak saya, guru dan sahabat. Seorang yang sangat sederhana, perhatian dengan keluarga, dan selalu mengajarkan kepada kami anak-anaknya untuk belajar dan menuntut ilmu. Bapak lahir di Makale, Tana Toraja, sebuah kota kecil 310 km dari Makassar ibu kota propinsi Sulawesi Selatan, pada 14 September 1937. Beliau lulus SD dan SMP di Makale dan menamatkan SMA nya di Makassar. Bapak menyelesaikan kuliahnya di UI Jakarta. Beliau kemudian bekerja sebagai pegawai negeri di Departemen Kesehatan. Bagi saya bapak adalah seorang pegawai negeri yang pejuang.
Ketika kecil kami beternak ayam petelur, sedikit demi sedikit sampai jumlahnya sekitar 500 ekor. Setiap pagi sebelum ia berangkat kerja dan kami belum berangkat sekolah ia mengajari kami memberi makan ayam-ayam itu. Dan siangnya sepulang kerja ia mengajari kami mengambil telurnya. Di awal-awal kami mengantarkan telur-telur ayam itu ke warung-warung dekat rumah setiap pulang sekolah, belakangan orang-orang dari war…