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

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