0

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 ?

shgnInc
  • 1,804
  • 3
  • 22
  • 29
dectroo
  • 1
  • 1
  • 1
  • 1
  • 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 Answers3

1

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.

ghm1014
  • 944
  • 1
  • 5
  • 14
  • 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 09: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
0

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

Chris H
  • 56
  • 3
-1
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.

O G
  • 874
  • 4
  • 6
  • "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
  • http://www.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