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
  2. Terima kasih atas balasannya.

    Di system.conf ada warning:
    # Autogenerated by /usr/sbin/dahdi_genconf on Tue May 12 17:03:51 2015
    # If you edit this file and execute /usr/sbin/dahdi_genconf again,
    # your manual changes will be LOST.

    Apakah yang bisa menyebabkan /usr/sbin/dahdi_genconf autorun dan menyebabkan /etc/dahdi/system.conf di generate ulang dengan "=us"

    Saya kawatir kalau perubahannya overwritten karena itu.

    ReplyDelete

Post a Comment

Popular posts from this blog

Prejudice and Privilege

Notes : It is not about Linux or other geeky stuff nor it is a political writing.  It was a day in the end of March 2007. I was just landed at the Franz Josef Strauss Munich Airport  around 10 AM in the morning. I had 5 days free time from my work in Astrium. At that time I was contracted by EADS Astrium  (now become Airbus Defense and Space) to work with them in Toulouse . I worked for one of their project. I flew from Toulouse where I worked to visit my brother family in Munich. Just after I picked up my luggage from the conveyor, three guys without uniform approaching me and asked me in English what i'm doing in Munich. I asked them if I did anything wrong. One of them told me that it was a random checked.     "Who are you guys? Sorry sir if it is a random check, why do you choose me instead of other?" I reply to their answer.  One of them said they're from the Munich immigration, and at the same time showing a gun behind his jacket. For my itinerar...

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 Ja...

Asterisk 1.6.1 on openSUSE 11.1 (Part 1)

In several articles from this one, I will share some of my experience in preparing emergency operation center for disaster management in Indonesia. One of the software we implement in this project is Asterisk. I use Asterisk 1.6.1.5 from openSUSE repository. Actually I built a custom 64 bit appliance using KDE 4.3 from factory repositories through SUSE Studio and took Asterisk from openSUSE Build Service repositories. Well, it was a couple years ago (by the time I submit this post), but I believe it still useful for anyone learning Asterisk :-) I also used DAHDI (Digium Asterisk Hardware Device Interface), but during the implementation I have a problem with Indonesia PSTN telephone signaling so I should download dahdi trunk version from digium subversion server to make the digium card works. Here are the hardware I use: 2 HP tower based server with 8 GB memory (it is overkill actually, but the owner insist it) running in high availability. See the pictures here and here . 10 PS...