[asterisk-users] Best way to get dahdi status

Shaun Ruffell sruffell at digium.com
Fri Jan 30 08:46:33 CST 2015


On Sun, Jan 25, 2015 at 03:33:47AM +0000, Michelle Dupuis wrote:
> I'm creating an app that needs to read the status of all dahdi
> spans and channels, etc.  (whatever is needed to tell a user the
> state of their DAHDI connections).
> 
> 
> What is the best way to do that?  I see dahdi-tools available from
> the command line, asterisk CLI commands, and AMI commands.  What
> is the best way to get the status at a detail level?

For analog and raw span information (line mode (E1/T1), alarms,
current analog configuration, etc..), I think using either
dahdi_scan or the attributes in
/sys/bus/dahdi_devices/devices/<device>/span-<spanno> is your best
bet.

Maintenance counters on digital spans (timing slips, bit errors, etc..) is returned via:

  $ dahdi_maint -s <spanno>

For information about whether your PRI is up, you have to ask
Asterisk since the drivers do not handle the PRI protocol. I don't
know if it is the *best* way, but I use:

  $ asterisk -rx 'pri show spans'
  
-- 
Shaun Ruffell
Digium, Inc. | Linux Kernel Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: www.digium.com & www.asterisk.org



More information about the asterisk-users mailing list