ftocc

Detect Asterisk HW

RoadKill
Posts: 232
Member Since:
2006-05-31

Hi,

I'm working on a script that will detect all known Asterisk interface cards.

the plan it that it has 3 modes
detectAsteriskHW.sh (display a list of hardware that is detected)
detectAsteriskHW.sh -h "HTML" (generate a HTML file with the hardware that is detected with links to where you can download drivers/help)
detectAsteriskHW.sh -a "AUTO" (call local script to install drivers, for HFC cards it will call install-ZAPHFC) for other cards scripts has to be made.

The script work with it has a list of all the PCI ID the the known cards.
I have sofare send a e-mail out to 10 manufactures, where I have ask them to supply me with the PCI ID a link to there driver and installations notes, software Alamos all of them has send a positive answer bask with the information needed.

The first beta shout be available in 1-2 weeks.

Mark

2xBillion HFC
1xOctoBRI HFC-8
1xTDM400 4xFXO
30xMOSA 3702
20xFritz ATA
1xCisco 5350

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



andrew
Posts: 789
Member Since:
2006-05-30
Re: Detect Asterisk HW

You read my mind. This is one of my top priorities. If you can get this working you are guaranteed a place in the trixbox hall of fame!!!



rasker
Posts: 529
Member Since:
2006-06-02
Re: Detect Asterisk HW

Hi roadkill,

Yeah good idea! I Was wondering if you had looked at mISDN (a generic ISDN driver) and vISDN at all (A HFC chipset driver supporting EuroISDN)? Would it be useful to include anything from these projects?

I noticed that you have 2 HFC cards!

Rehan



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

yes I will be looking at that in step 3

step 1 is this script (in progress)
step 2 is zaptel script (in progress)
step 3 is mISDN (as I want to try it out)
step 4 is Sangoma (because I'm planing on getting a E1)

As I planing on making a series of small scripts.
Each script must only do one thing, but do it great.
This help with making it easy for others to read and maintain.

for this script
face 1 detect HW (interface, driver, config)
face 2 call install scripts for detected HW
face 3 call config scripts for installed HW

face 4-> add support for more cards and scripts

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



arobar
Posts: 183
Member Since:
2006-06-01
Re: Detect Asterisk HW

Sounds like a fantastic project. The hardest part is in testing, but there's a great community for that. I'm good for testing the Sangoma analog setup if need be.

Alex

--

Alex Robar
alex.robar@gmail.com



UnDeRDoG
Posts: 79
Member Since:
2006-06-01
Re: Detect Asterisk HW

I'm good for the Sangoma A104 to test drive

--



degsod
Posts: 138
Member Since:
2006-05-31
Re: Detect Asterisk HW

I am good for the Digium TE110P card. Am uk based



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi,

Now version 1.0.0 is released

Please try it out and post your result here with the information off the name of your card if it has any "UNKNOWN" in the detection.

So if you want to try it out you can download it here detectVoiceHW

cd /usr/local/sbin
wget http://asterisk.dencro.net/TrixBox-Scripts/detectVoiceHW
chmod +x ./detectVoiceHW

to test that the file is corect type

md5sum detectVoiceHW

it shout return this line

1bc907fa587039c46de68b9265b4c633 detectVoiceHW

I have changed the name from detectAsteriskHW to detectVoiceHW as that way I will not conflict with Digium's trademark and as it also support openPBX, although it has not been tested.

in the first version the is a range of features :-)

It can detect 65 different cards
support both normal output and html

It has a call home feature.
That will send me an e-mail the first time the script is run and only if it detect a Voice Interface, that I have not been able to verify.
if you want to see what it has send just look at
cat /var/tmp/detectetasteriskhardware
please do not delete it as it will just recreate the file.
also if you make any changes and want to resend the information to me, use the -r option (send report)

the result from the script look like this

[size=x-small]-----------------------------------------------------
VOICE_CARD_NUMBER = 1
PCI_ID = 01:00.0
VENDOR = Cologne Chip Designs GmbH
NAME = ISDN network controller [HFC-8S]
SUBVERSION = Junghanns OctoBRI
DESCRIPTION = 4xBRI, Pasive, TE/NT
DRIVER = Bristuff from Junghanns
INSTALL SCRIPT = install-ZAPHFC
MODUL = qozap
INSTALLED = YES
-----------------------------------------------------
VOICE_CARD_NUMBER = 2
PCI_ID = 01:01.0
VENDOR = Cologne Chip Designs GmbH
NAME = ISDN network controller [HFC-PCI]
SUBVERSION = Billion BiPAC PCI V.3.0
DESCRIPTION = 1xBRI, Pasive, TE/NT
DRIVER = Bristuff from Junghanns
INSTALL SCRIPT = install-ZAPHFC
MODUL = zaphfc
INSTALLED = YES
-----------------------------------------------------
VOICE_CARD_NUMBER = 3
PCI_ID = 01:02.0
VENDOR = Tiger Jet Network Inc.
NAME = Tiger3XX Modem/ISDN interface
SUBVERSION = TDM400P/A400P analogue 4xPSTN FXO/FXS interface
DESCRIPTION = 1/2/3/4xPSTN, FXO/FXS
DRIVER = default zaptel driver
INSTALL SCRIPT =
MODUL = wctdm
INSTALLED = YES
-----------------------------------------------------
[/size]

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



degsod
Posts: 138
Member Since:
2006-05-31
Re: Detect Asterisk HW

hi,

I have downloaded the script and chmdo 777 on it, however when i try to run it i get an command not found error.

if i do an ls-l i can see the script there.

TIA



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi,

Try cd to the directory where you downloaded the file and type
./detectVoiceHW

or move the file to /usr/local/sbin as that is where all the other scripts are placed (at least when it was AAH)

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



Cowboy47
Posts: 234
Member Since:
2006-06-02
Re: Detect Asterisk HW

I get an error too. I executed the script for the directory where I downloaded it to and received this error.

./detectVoiceHW: line 677: lspci: command not found

I also checked the output file, it did not detect the TDM400P with 4 FXO modules.



degsod
Posts: 138
Member Since:
2006-05-31
Re: Detect Asterisk HW

that worked for me.

Did you do a chmod 777 detectVoiceHW ?



UnDeRDoG
Posts: 79
Member Since:
2006-06-01
Re: Detect Asterisk HW

Dang @ home right now, can't wait to get to work! :-?

--



Cowboy47
Posts: 234
Member Since:
2006-06-02
Re: Detect Asterisk HW

yeppers, sure did. But I got an email from Robert making reference to vmware, which I am not using. So that might be the issue, this tool only detects for vmware boxes.



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi,

hmm strange, the script is designed to runn on a normal PC, as you can not have any PCI support in vmWare.
But I have test it with TrixBox in vmWare where I get the "no hardware is detectet"
and I know that it already has run on 3 diffrent installations, with out a problem

can you try to redownload the script, or check that the md5 is corect

1bc907fa587039c46de68b9265b4c633 detectVoiceHW

as line 677 look like this, so it shout not be able to cause an lspci not found.

Voice_Card_Detect() {

also can you post these information as they might help.

lspci
lspci -n -m
lsmod

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



mailaender
Posts: 5
Member Since:
2006-06-20
Re: Detect Asterisk HW

Hi,

great job !

What do you think if wget in Check_For_Update() function is called with the --connect-timeout option ? This in case the repository server is down, else the script hangs.

stefano



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi,

Thanks mailaender,

have now added a timeout feature.

[size=xx-small]# -------------------------------------------
# v.1.0.1
# - addes a 10 sek timeout on Check_For_Updates (sugestet by mailaender)
# - will now say drivers ststus UNKNOWN if we dont know the name
# - addes subversion for TDM400P
# -------------------------------------------
# V.1.0.2
# - added missinf Rename_File()
# - removed write to logfile
# -------------------------------------------
[/size]

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi here is some interesting statistic based on the detecVoiceHW

I have sofare received reports form 60 different system

47 had 1 card, 9 had 2 cards and 4 had 3 cards

of the 74 cards
33 was loaded, 29 was not loaded, 12 unknown

Analog = 29 (160 channels)
BRI =31 (64 channels)
PRI = 14 (456 channels)

24 diffrent cards from:
TigerJet (27)
Colone (20)
AVM (7)
Digium (6)
Eicon (4)
Motorola (4)
Rhino (3)
Sangoma (2)
PLX (1)
Asuscom (1)

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



benjaminht
Posts: 14
Member Since:
2006-10-17
Re: Detect Asterisk HW

Very good project.

I have 2 DIGIUM cards, TDM22B and B410P and this is the out of your script.

[root@ht24 sbin]# detectVoiceHW
-----------------------------------------------------
VOICE_CARD_NUMBER = 1
PCI_ID = 0a:00.0
VENDOR = Tiger Jet Network Inc.
NAME = Tiger3XX Modem/ISDN interface
SUBVERSION = TDM400P Wildcard TDM400P REV I
DESCRIPTION = 1/2/3/4xPSTN, FXO/FXS
DRIVER = default zaptel driver
INSTALL SCRIPT =
MODUL = wctdm
LOADED = YES
-----------------------------------------------------

B410P card not apear !!
Is normal or the script no detect B410P ?

thanks.



rasker
Posts: 529
Member Since:
2006-06-02
Re: Detect Asterisk HW

Not sure the script is updated often these days. B410P is a fairly recent card I beleive so the database does not contain the PCI info for this card. If you give Roadkill a nudge I am sure he would update it :)

R



RoadKill
Posts: 232
Member Since:
2006-05-31
Re: Detect Asterisk HW

Hi rasker

still alive :-D

have just made a small update

# -------------------------------------------
# V 1.0.14 - 13 febuary 2007
# - added support for Intel Dialogic d4pciuf (reportet by Li Pengfei)
# - added description for Traverse Technologies NetJet (reportet by Grant Parnell ELX)
# - added spell patch (Gregory McLean)
#--------------------------------------------

Benjamin if you can post or e-mail me with these information I will add your card

Name of the card
Manufactor of the card
lspci
lspci -n -m
lsmod

--

Mark Petersen

1xBillion HFC / 1xOctoBRI HFC-8 / 1xPerfecTone IP-300 / 1xSnom360 / 1xKirk 600v3



W1zz
Posts: 562
Member Since:
2006-05-31
Mark If your still around,

Mark

If your still around, you need to change the device ID fields to all lower case....

or make your tests case insensitive.

--

Alan

install-ZAPHFC

Look here for more help.
Current version is 1.4.0 (25 January 2008)



madvertising
Posts: 1
Member Since:
2008-03-11
detectVoiceHW command not found problem

I have run into the same problem when editing scripts on a windows based system and FTP'ing them onto my servers.
I simple Perl command always seems to clear up the problem.
Try the following command on your text file then try and run it.

perl -i -pe's/\r$//;'

for instance:

perl -i -pe's/\r$//;' detectVoiceHW



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.