Skip to main content

the avatar of Medwinz's Notes

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 :-)
the avatar of Medwinz's Notes

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 PSTN lines
  • RJ 12 cables
Well, Digium and Polycom price are expensive but the quality of the sound is very good. There are some alternatives for the IP Phone like Grandstream and Aastra that also can be used.
In this project, Asterisk will be use to setup the voip communication between this site in Denpasar/Bali with the headquarter (HQ) in Jakarta as well as with other regional center in Java and Sumatera. Also Asterisk will act as traditional PBX to connect this site to PSTN lines as well as to GSM/CDMA lines. Every conversation through the PABX will be recorded by monitor application in Asterisk.

Before we go any further lets discuss a logical design about our setup. There is one HQ and several remote site including this one in Bali. This site is special because it's also act as second node beside HQ that can receive and transmit voip traffic to other center. The setup of every site is similar like the diagram below.
All the digium card provide 12 lines of PSTN, in this case we only use 10 lines. We then use RJ 12 coupler so that every line goes to 2 PBX server, PABXSV1 and PABXSV2. The PABXSV2 will become the backup asterisk in case the PABXSV1 is downed. We can use vrrpd or heartbeat (with DRBD) to control the service so that PABXSV2 can take over all the service from PABXSV1. More on this later.

I use stock asterisk and dahdi from OBS. While the asterisk is ok, dahdi in the OBS is not sufficient for Indonesia telephone lines (at least at the time I made the appliance). The root cause of the problem is that Indonesia PSTN line provided by Telkom is already equipped with the CID (caller identifier) but the service is not open to the end customer until the customer pay the service charge. But actually the CID is there and asterisk knows it but cannot open it. So it can answer the ring but if another call comes, suddenly it get confuse how to handle it and hangup the line. Off course we should make a good configuration not just downloading the trunk version.

I should thanks some good people who currently help me maintain the server, I should mentioned here:

Pak Wayan Sudana, Ketua KPLI Bali
Mas Adhi Wus, linuxer dari Denpasar
Mas Yan Arief (dkk), openSUSE user dari Yogyakarta

In the next post I will explain some configuration that I used, till then keep safe and have a lot of fun.

the avatar of Andrew Wafaa

Clarification & Credits for openSUSE on ARM Chromebooks

After my post yesterday on getting openSUSE on the new ARM Chromebook, a lot of interest was generated with discussions on various forms of media – heck I even got Slashdotted (thanks :-) ). I read some but not all of them and even the comments. One thing popped out to me, and I feel I need to clarify some things. Whilst I do indeed work for ARM, my device was a private purchase and not provided to me by my employer.

the avatar of Holger Macht

python-killswitch ported to URfkill 0.4

python-killswitch ported to URfkill 0.4

URfkill 0.4 has been released for quite some time now. However, I've been quite busy the last couple of months so I didn't make it to port the python-killswitch module to the new DBus API. Until now, until I've finally releasing python-killswitch 0.4 which is basically fixing SUSE bug 734894.

The package can either be found in my home project or can be installed via 1-Click-Install. Maintenance updates for openSUSE 12.1 and 12.2 are already running. The source code can be found at Gitorious.

the avatar of Andrew Wafaa

Geeko goes Chrome

I was lucky enough to get into work today to have a lovely package waiting for me, a shiny new ARM powered Chromebook! o/ I ordered it specifically to have a good mobile ARM development platform. So after having used the bundled ChromeOS for the first half of the day I decided it was time to get this machine’s Geeko on. Thankfully one of the Google employed developers , Olof Johansson, was kind enough to post his steps to get Linux on the machine.

a silhouette of a person's head and shoulders, used as a default avatar

Fiesta de lanzamiento del openSUSE 12.2 [Madrid] – openSUSE 12.2 Release Party [Madrid]

Vamos a beber unas cervecas y hablar del proyecto que nos une , que nos encanta.

Habra gente y profesores de URJC (Master en Software Libre).

Esperamos toda la gente que esta emocionada con openSUSE para celebrar el lanzamiento de la edición 12.2. Gente de otros proyectos o otras distribuciones esta bienvenida tambien.

Habran DVD’s de la edición 12.2

Si no eres un ‘camaleon’ , aprovechad la oportunidad!

Mas información esta disponible aqui

the avatar of Klaas Freitag

openSUSE Conference 2012

I spent the last weekend in Prague at the openSUSE conference 2012. It was a great opportunity to visit the wonderful city of Prague and meet old friends from the openSUSE community and get a bit more involved into openSUSE again.

I gave a talk about ownCloud on Saturday where I tried to show some technical details. That could have gone even deeper was the feedback some people gave me so I promise to show more of for example app development next time. Apart from that (and apart from the fact that laptops, projectors and Linux still do not play well) the talk went ok and was well received.

The conference is a joint conference of actually four conferences: The openSUSE Conference, the Czech Linux Days, the Gentoo Summit and the SUSE Labs Conference. Over the weekend it was hosted at the Czech technical university of prague and that was a great venue. Very inspiring that over the whole foyer of the building intersting art sculptures were shown. Unusual for a technical faculty but a great thing. The building is modern and large enough for all the talks and workshops but as a result of that it was sometimes a bit difficult to keep the overview where happens what. Especially because the start- and end times of the talks were not kept in sync over the tracks.

I found it is a different atmosphere on the event compared to the openSUSE conferences of the last years which might have been more focussed around the openSUSE project. This one felt more like an general FOSS event. That is not bad, just different, and since change is obvious and good I look forward to seeing how this influences the openSUSE project in the near future.

I like to thank all involved on the organizing teams for their successful hard work, have a lot of fun for the next two days, I had a lot during the last two days :)

a silhouette of a person's head and shoulders, used as a default avatar

OBS submit request top

There was a discussion on submit requests. Adrian Schröter and Jos Poortvliet suggested to use OBS api to generate some kind of reports on pending times. Here is a test (I will publish this python script on github or something like that). I've filtered out all "home:" projects and built following table. To my surprise, there are only a little stalled requests.


Generated at: 2013-04-13 05:27:41.044818
Request Pending time Project Package
1317 1680 days system:management puppet
25359 1227 days YaST:Web:STABLE webyast-vendor_en
31953 1158 days Moblin:Factory gnome-session
33643 1138 days Moblin:Factory gnome-settings-daemon
33644 1138 days Moblin:Factory dalston
33868 1136 days Moblin:Factory icon-theme-dmz-cursors
38905 1081 days Moblin:2.0 dalston
55428 855 days security:CASA CASA-kwallet
55429 855 days security:CASA CASA_auth_token_client
55431 855 days security:CASA CASA_auth_token_server
69864 705 days system:wicd wicd
72401 681 days isv:dell:community python-ctypes-rhel
74258 661 days net-snmp
74259 661 days net-snmp
74260 661 days net-snmp
75895 644 days network:ifolder:server_stable
110363 387 days Maemo:Mer:Extras:Import opengfx
123245 315 days isv:microsoft RHEL6
131196 236 days openSUSE:11.0:Update:Test
134952 206 days Banshee:Legacy ipod-sharp
134958 206 days Banshee:Legacy podsleuth
134959 206 days Banshee:Legacy ndesk-dbus-glib
134960 206 days Banshee:Legacy ndesk-dbus
136458 195 days GNOME:Evolution:mapi evolution-mapi
137714 184 days Maemo:Mer:Extras:Import
138490 177 days devel:languages:lua luaexpat
145153 121 days games:WorldForge wfmath
145154 121 days games:WorldForge skstream
145155 121 days games:WorldForge libwfut
145156 121 days games:WorldForge libdevil
145162 119 days devel:languages:lua tolua++
145501 119 days Novell:NTS supportutils-plugin-susecloud
145520 119 days isv:ownCloud:community patchinfo
147640 94 days devel:languages:lua lua-lgi
147641 94 days devel:languages:lua lua51-lgi
151409 66 days Arch:Extra
151535 65 days Arch:Core
153990 64 days Mono:Beta
154756 64 days Virtualization:openSUSE11.4
154759 64 days spins:open-pc:kde
155682 54 days Apache:Modules apache2-mod_authz_unixgroup
155683 54 days Apache:Modules pwauth
158065 35 days Apache:Modules apache2-mod_authn_sasl
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158089 34 days openSUSE:Evergreen:11.4 drbd.64
158556 32 days windows:mingw:win32 mingw32-cross-nsis
158558 32 days windows:mingw:win32 mingw32-cross-nsis-plugin-zipdll
159540 28 days Java:base clojure
159797 25 days security:netfilter SuSEfirewall2
159894 25 days drivers:nic r8168
160430 22 days network:ha-clustering:Factory corosync
160446 22 days security:passwordmanagement password-store
160510 22 days network:telephony:asterisk-11
160725 20 days isv:ownCloud:community
160726 20 days isv:ownCloud:community owncloud
160727 20 days isv:ownCloud:community qtkeychain
160794 19 days network:storage bcache-tools
160846 19 days X11:wxWidgets wxWidgets
160961 18 days Archiving:Backup rsync
160962 18 days Archiving:Backup librsync
161043 18 days Archiving:Backup dkopp
160885 17 days KDE:Qt50 libqt5-qtwebkit
161474 16 days X11:Cinnamon:Factory cinnamon-screensaver
161616 15 days security:passwordmanagement
162321 10 days Apache:Modules apache2-mod_authn_otp
162491 9 days utilities byobu
162528 9 days filesystems libvshadow
162537 9 days openSUSE:Tools obs-service-verify_file
162581 8 days vdr
162074 7 days, 22 hours devel:openSUSE:Factory:legal-queue which
162691 7 days, 21 hours openSUSE:12.3:Update pesign-obs-integration.1510
162691 7 days, 21 hours openSUSE:12.3:Update pesign-obs-integration.1510
162691 7 days, 21 hours openSUSE:12.3:Update pesign-obs-integration.1510
162691 7 days, 21 hours openSUSE:12.3:Update pesign-obs-integration.1510
158276 7 days, 16 hours devel:openSUSE:Factory:legal-queue sazanami-fonts
162931 7 days, 6 hours filesystems libsmdev
162932 7 days, 6 hours filesystems libsmraw
162933 7 days, 6 hours filesystems libodraw

a silhouette of a person's head and shoulders, used as a default avatar

Android Application for openSUSE Conference

Thanks to Matt Barringer, we now have an Android application for showing the openSUSE Conference schedule, details about talks and presentations and also some information about the presenters.

The application can be found at Google Play Store under name SUSE Conferences and it's, of course, for free. It uses internet connection for downloading the data - there will be wireless network at the site, SSID Conference (get the details during registration/getting your badge).

When you start the application, you can select the conference schedule you are interested in. There are these two conferences now:
  • Bootstrapping  Awesome - 2012
  • openSUSE Summit - 2012
Make sure you select the Bootstrapping Awesome.

Selecting the conference:
 
Conference schedule, click on a talk to get more details:
   
Details for a selected talk, click on the gray star to add it to your personal schedule (turns to yellow):

Talk added to your personal schedule, you still have some time left for more talks :)
Currently downloaded news:
 
 

the avatar of Will Stephenson

OT: Shimano Alfine 11 Di2 SEIS and backwards compatibility with existing hubs

This post is completely OT for openSUSE, but I don’t have a better place to put it to share this useful snippet of information.

Shimano has just released its electronic shifting system for Alfine internally geared hubs. In mechanical Alfine, the gear cable pull is translated into rotation and gear selection by a detachable unit that sits on the end of the hub.  Alfine Di2 SEIS replaces this with a MU-S705 motor unit controlled by an electronic brake lever.  But it also introduces a new hub (SG-S705).  I wondered whether the motor unit can be retrofitted to existing hubs, as I have the original Alfine 11 (SG-S700) on my Genesis Day One, and I’m not completely happy with the Versa drop bar brake lever integrated shifter*.

So I mailed Paul Lange, Shimano’s German distributor, to ask. The answer I got is that the SG-S700 hub can not be used with the Di2 components, because it has a return spring for upshifts, whereas SG-S705 does not since the gear selection in both directions is actively performed by the motor.  If you put a MU-S705 motor unit on an SG-S700 it would be working against the return spring.

As far as I understood it, there is a spring in the SM-S700 cable end unit – I didn’t know there is also one in the hub itself, but I’ll check next time I have the wheel out.  Until then, my dreams of perfect drop bar shifting are just that, because at 400 quid SRP the hub is a big investment.  Maybe Shimano will take pity on me and make a mechanical STI…

* Mostly because there is no little cam decoupling the upshift lever from the cable spool inside the Versa shifter, so sometimes it shifts up several gears at once.