Difference between revisions of "VoIP: Penggunaan DAHDI"

From OnnoWiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 65: Line 65:
 
The userspace tools to control DAHDI spans/channels:-
 
The userspace tools to control DAHDI spans/channels:-
  
dahdi_cfg
+
'''dahdi_cfg'''
 
The DAHDI Configurator, which parses system.conf
 
The DAHDI Configurator, which parses system.conf
  
dahdi_genconf
+
'''dahdi_genconf'''
 
Generates /etc/dahdi/system.conf, so it's better that you don't hand edit system.conf. Uses /etc/dahdi/genconf_parameters to define it's actions.
 
Generates /etc/dahdi/system.conf, so it's better that you don't hand edit system.conf. Uses /etc/dahdi/genconf_parameters to define it's actions.
  
dahdi_hardware
+
'''dahdi_hardware'''
 
Displays listing of DAHDI hardware detected
 
Displays listing of DAHDI hardware detected
  
dahdi_monitor
+
'''dahdi_monitor'''
 
Monitors signal level on analog channel allows you to record audio from it
 
Monitors signal level on analog channel allows you to record audio from it
 
Usage: dahdi_monitor <channel num> -v -m -o -p -l limit -f FILE -s FILE -r FILE1 -t FILE2 -F FILE -S FILE -R FILE1 -T FILE2
 
Usage: dahdi_monitor <channel num> -v -m -o -p -l limit -f FILE -s FILE -r FILE1 -t FILE2 -F FILE -S FILE -R FILE1 -T FILE2
Line 80: Line 80:
 
note: extremly usefull, but otherwise not mentioned, that the raw format output is 8Khz 16bit signed. Use sox to convert to a wav. sox -r 8000 -s -w rx.raw rx.wav
 
note: extremly usefull, but otherwise not mentioned, that the raw format output is 8Khz 16bit signed. Use sox to convert to a wav. sox -r 8000 -s -w rx.raw rx.wav
  
dahdi_scan
+
'''dahdi_scan'''
 
Generates a list of things DAHDI channels, with some details
 
Generates a list of things DAHDI channels, with some details
  
dahdi_test
+
'''dahdi_test'''
 
Measures accuracy of the FXO/FXS board software digital signal processing
 
Measures accuracy of the FXO/FXS board software digital signal processing
  
dahdi_tool
+
'''dahdi_tool'''
 
A nice tool to see what your boards are doing.
 
A nice tool to see what your boards are doing.
 
  
 
==Sample installation==
 
==Sample installation==
  
 
After compiling and installing of dahdi and asterisk, you have to perform some further steps to use your hardware.
 
After compiling and installing of dahdi and asterisk, you have to perform some further steps to use your hardware.
This example will show you a few steps how to get asterisk and two Digium cards enabled:
+
This example will show you a few steps how to get asterisk and Digium card enabled:
  
 
Detect your hardware
 
Detect your hardware
Line 101: Line 100:
 
You should see something like this for TDM410
 
You should see something like this for TDM410
  
  00:09.0 0200: d161:8005 (rev 11) ---- for TDM410
+
  00:09.0 0200: d161:8005 (rev 11)
  
 
Edit /etc/dahdi/system.conf
 
Edit /etc/dahdi/system.conf
Line 109: Line 108:
 
  loadzone        = us
 
  loadzone        = us
 
  defaultzone    = us
 
  defaultzone    = us
 +
 +
 +
Do
 +
 +
modprobe wctdm24xxp
 +
dahdi_genconf
 +
 +
Or
 +
 +
modprobe wctdm24xxp
 +
/etc/init.d/dahdi restart
 +
dahdi_scan
 +
 +
Hasilnya harusnya kurang lebih
 +
 +
description=Wildcard TDM410P Board 1
 +
name=WCTDM/0
 +
manufacturer=Digium
 +
devicetype=Wildcard TDM410P
 +
location=PCI Bus 03 Slot 03
 +
basechan=1
 +
totchans=4
 +
irq=23
 +
type=analog
 +
port=1,FXO
 +
port=2,FXO
 +
port=3,FXS
 +
port=4,FXS
 +
  
 
check /etc/dahdi/system.conf
 
check /etc/dahdi/system.conf
Line 122: Line 150:
 
  modprobe wctdm24xxp
 
  modprobe wctdm24xxp
 
  dahdi_cfg -vv
 
  dahdi_cfg -vv
  dmseg
+
  dmesg
  
 
you should see something like
 
you should see something like
Line 178: Line 206:
 
  # /etc/init.d/asterisk restart
 
  # /etc/init.d/asterisk restart
  
 +
or
 +
 +
asterisk
  
 
* Verify your current system status. You should get some output like this:
 
* Verify your current system status. You should get some output like this:
Line 204: Line 235:
 
* http://docs.tzafrir.org.il/dahdi-linux/
 
* http://docs.tzafrir.org.il/dahdi-linux/
 
* http://docs.tzafrir.org.il/dahdi-tools/
 
* http://docs.tzafrir.org.il/dahdi-tools/
 +
* https://www.digium.com/en/supportcenter/documentation/viewdocs/TDM2400P
 +
* https://www.digium.com/en/supportcenter/documentation/viewdocs/TDM400P
 +
* https://www.digium.com/en/supportcenter/documentation/viewdocs/TDM410
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
 +
* [[VoIP]]
 +
* [[OpenBTS]]
 +
 +
===Latar Belakang===
 +
 +
* [[Menjadikan VoIP dan 4G Legal]]
 +
* [[Sekitar VoIP Rakyat]]
 +
* [[VoIP: Dasar Hukum Internet Telepon]]
 +
* [[VoIP: Beberapa Skenario Topologi]]
 +
* [[VoIP: Pilihan Teknologi Internet Telepon]]
 +
* [[VoIP: Pengkodean Suara di Jaringan Komputer]]
 +
* [[VoIP: Konsep Video Conference]]
 +
 +
===Untuk Pemula===
 +
* [[VoIP: Kebutuhan Peralatan dan Software]]
 +
* [[VoIP: Internet Telepon PC ke PC]]
 +
 +
===Untuk Peneliti / Pencoba===
 +
* [[VoIP: Bandwidth Internet Telepon]]
 +
* [[VoIP: Softswitch / Server Internet Telepon]]
 +
* [[VoIP: Repository Software Internet Telepon]]
 +
* [[VoIP: Menghubungkan PSTN dan Selular]]
 +
 +
===Untuk Operator===
 +
* [[VoIP: Server Video Conference]]
 +
* [[VoIP: Software dan peralatan client Internet Telepon]]
 +
* [[VoIP: Penggunaan DAHDI]]
 
* [[VoIP: Hardware Client VoIP]]
 
* [[VoIP: Hardware Client VoIP]]
* [[VoIP]]
+
* [[VoIP: Hardware Server VoIP]]
 +
* [[VoIP: Interkoneksi dan Alokasi Nomor Telepon]]
 +
* [[VoIP: Peering Antar Operator VoIP]]
 +
* [[VoIP: Menghubungkan PSTN dan Selular]]
 +
* [[VoIP: Trunk]]
 +
 
 +
===Topik Lanjut===
 +
* [[VoIP: ENUM untuk pengenalan nomor telepon di Internet Telepon]]
 +
* [[VoIP: Teknik Evaluasi Internet Telepon]]
 +
* [[VoIP: Troubleshooting]]
 +
* [[VoIP: Video Conference Server]]
 +
 
 +
===Buku Teknologi VoIP===
 +
* [[Onno W. Purbo]], "VoIP Cikal Bakal Telkom Rakyat", Infokomputer, 2007.
 +
* http://125.160.17.21/speedyorari/index.php?dir=ebook-voip
 +
* http://opensource.telkomspeedy.com/speedyorari/index.php?dir=ebook-voip
 +
 
  
 
[[Category: VoIP]]
 
[[Category: VoIP]]
 
[[Category: Internet Telepon]]
 
[[Category: Internet Telepon]]

Latest revision as of 10:36, 8 January 2014

From: http://www.voip-info.org/wiki/view/DAHDI

Short for "Digium Asterisk Hardware Device Interface"

The Change

DAHDI is the new name for 'Zaptel' as of May 19th 2008. The post at http://blogs.digium.com/2008/05/19/zaptel-project-being-renamed-to-dahdi/ details the reason for the change. Asterisk 1.4 releases later than 1.4.21, and all releases of Asterisk 1.6, will automatically use DAHDI in preference to Zaptel, even if Zaptel is still installed on the system.

Details should be available at http://www.asterisk.org/zaptel-to-dahdi

Subversion Release

svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-kernel

and

svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools

Or a shortcut (if you just want to get it working, not if you want to work on it). It pulls the above two through svn:externals .

http://svn.digium.com/svn/dahdi/linux-complete/trunk

Conversion from Zaptel

Digium resources regarding zaptel to dahdi migration http://www.asterisk.org/node/48481 /etc/zaptel.conf Becomes /etc/dahdi/system.conf /etc/asterisk/zapata.conf Becomes /etc/asterisk/chan_dahdi.conf


Configuration Files

/etc/dahdi/system.conf
/etc/asterisk/chan_dahdi.conf
/etc/dahdi/system.conf

Sample system.conf

Note that unlike zaptel.conf, you have to explicitly set the echo canceller for each channel.

There are a number of other configuration files under /etc/dahdi .

/etc/dahdi/init.conf

Replaces /etc/default/zaptel (on Debians) and /etc/sysconfig/zaptel (on most other systems) - this is a shell script snippet that is sourced by the dahdi init.d script. All values there are optional (no need to explicitly define TELEPHONY=no). The variable MODULES, however, is no longer read from it. IT is read from:

/etc/dahdi/modules

A list of modules to load. Replaces the variable MODULES from the above configuration file.

/etc/dahdi/genconf_parameters

Fine--tuning parameters for dahdi_genconf (replaces zapconf and also deprecates genzaptelconf).

Architecture

The package is composed of two sub-packages:

Kernel

Include kernel modules and minila helper files (firmwares)

Tools

The userspace tools to control DAHDI spans/channels:-

dahdi_cfg The DAHDI Configurator, which parses system.conf

dahdi_genconf Generates /etc/dahdi/system.conf, so it's better that you don't hand edit system.conf. Uses /etc/dahdi/genconf_parameters to define it's actions.

dahdi_hardware Displays listing of DAHDI hardware detected

dahdi_monitor Monitors signal level on analog channel allows you to record audio from it Usage: dahdi_monitor <channel num> -v -m -o -p -l limit -f FILE -s FILE -r FILE1 -t FILE2 -F FILE -S FILE -R FILE1 -T FILE2 example :- dahdi_monitor 1 -vv note: extremly usefull, but otherwise not mentioned, that the raw format output is 8Khz 16bit signed. Use sox to convert to a wav. sox -r 8000 -s -w rx.raw rx.wav

dahdi_scan Generates a list of things DAHDI channels, with some details

dahdi_test Measures accuracy of the FXO/FXS board software digital signal processing

dahdi_tool A nice tool to see what your boards are doing.

Sample installation

After compiling and installing of dahdi and asterisk, you have to perform some further steps to use your hardware. This example will show you a few steps how to get asterisk and Digium card enabled:

Detect your hardware

# lspci -n

You should see something like this for TDM410

00:09.0 0200: d161:8005 (rev 11)

Edit /etc/dahdi/system.conf

vi /etc/dahdi/system.conf
loadzone        = us
defaultzone     = us


Do

modprobe wctdm24xxp
dahdi_genconf

Or

modprobe wctdm24xxp
/etc/init.d/dahdi restart
dahdi_scan

Hasilnya harusnya kurang lebih

description=Wildcard TDM410P Board 1
name=WCTDM/0
manufacturer=Digium
devicetype=Wildcard TDM410P
location=PCI Bus 03 Slot 03
basechan=1
totchans=4
irq=23
type=analog
port=1,FXO
port=2,FXO
port=3,FXS
port=4,FXS


check /etc/dahdi/system.conf

vi /etc/dahdi/system.conf
fxsks=3,4
fxoks=1,2
echocanceller=mg2,1-4

save the file and run modprobe as root

modprobe wctdm24xxp
dahdi_cfg -vv
dmesg

you should see something like

[  961.484269] wctdm24xxp 0000:00:09.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[  961.940405] Port 1: Installed -- AUTO FXO (FCC mode)
[  962.576453] Port 2: Installed -- AUTO FXO (FCC mode)
[  964.209579] Port 3: Installed -- AUTO FXS/DPO
[  965.838703] Port 4: Installed -- AUTO FXS/DPO
[  965.842700] VPM100: Not Present
[  965.846981] Found a Wildcard TDM: Wildcard TDM410P (4 modules)


Do

dahdi_genconf


Edit

vi /etc/asterisk/chan_dahdi.conf 
#include /etc/asterisk/dahdi-channels.conf

See

vi /etc/asterisk/dahdi-channels.conf

You should see something like

signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default


signalling=fxo_ks
callerid="Channel 3" <4003>
mailbox=4003
group=5
context=from-internal
channel => 3
callerid=
mailbox=
group=
context=default

Restart asterisk


# /etc/init.d/asterisk restart

or

asterisk
  • Verify your current system status. You should get some output like this:
asterisk*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC4   Fra Codi Options  LBO
DAHDI_DUMMY/1 (source: HRtimer) 1        UNCONFI 0      0      0      CAS Unk  YEL      0 db (CSU)/0-133 feet (DSX-1)
Wildcard TDM410P Board 1                 OK      8      0      0      CAS Unk  YEL      0 db (CSU)/0-133 feet (DSX-1)


  • Verify your configured channels
asterisk*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret        Blocked    State     
 pseudo            default                    default                         In Service
      1            from-pstn                  default                         In Service
      2            from-pstn                  default                         In Service
      3            from-internal              default                         In Service
      4            from-internal              default                         In Service

Referensi

Pranala Menarik

Latar Belakang

Untuk Pemula

Untuk Peneliti / Pencoba

Untuk Operator

Topik Lanjut

Buku Teknologi VoIP