Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have Asterisk 1.6 with a analogic card X100p that work properly. I want to detect if the card is in use or not (the status of the card).

Please any one get the problem before ?

share|improve this question
    
this the output of the command "core show channels": > Channel Location State Application(Data) > 0 active channels 0 active calls 26 calls processed you think this is normal? –  dectroo Aug 18 '11 at 10:01

3 Answers 3

You can use "show channels" command

voip*CLI> show channels
Channel              Location             State   Application(Data)             
DAHDI/3-1            s@ivr-3:12           Up      BackGround(someexample)
1 active channel
1 active call

You can differentiate a DAHDI device by the channel name.

share|improve this answer
    
this the output of the command "core show channels": Channel Location State Application(Data) 0 active channels 0 active calls 26 calls processed you think this is normal? –  dectroo Aug 18 '11 at 9:58
    
You mean about 0 Active Channels, 0 active calls? It means nobody is calling right now, if you can be sure there is a call running, then it's not normal. –  ghm1014 Aug 18 '11 at 13:59
    
it's work, i made a call and send the cmd "core show channels" and it's work. –  dectroo Aug 18 '11 at 15:17
    
Good, shouldn't you mark the answer as correct? –  ghm1014 Aug 19 '11 at 14:07

asterisk -rx "dahdi show channel 1" |grep Onhook >/dev/null || echo "In Use"

share|improve this answer
dahdi show channels

in the asterisk console to show what channels managed by dahdi are in use. Also there's dahdi show status, but I'm not sure of the output.

share|improve this answer
    
"dahdi show status" show the status of the card, "dahdi show channel _ " dont give any information about the channel; if it's in use, busy,... –  dectroo Aug 16 '11 at 13:19
    
Are you sure you have configured your card to provide channels FXO's to asterisk? (usually it's /etc/asterisk/chan_dahdi.conf) –  O G Aug 16 '11 at 13:56
    
Yes it's work perfectly, i can make call through PTSN. –  dectroo Aug 16 '11 at 18:58
    
freepbx.org/forum/freepbx/users/x100p-channel-not-working - seems there are some complains concerning this card model, hence the recommended method does not provide the needed output. –  O G Aug 17 '11 at 16:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.