Wanpipemon cookies: Checking Sangoma FXO status

This is the first post in what I expect to be a long series of posts called “Wanpipemon cookies”. They aim to be small and easy to swallow posts with tips on how to use “Wanpipemon”, the debugging tool provided with Sangoma Wanpipe drivers.

This time I’ll show you how to check whether an FXO line is plugged into the the card via the command line. You can also check if the FXO is OnHook (http://en.wikipedia.org/wiki/On-hook) or OffHook (http://en.wikipedia.org/wiki/Off-hook)

In order to check the analog status for a given analog channel in a Sangoma card you can do the following:

# wanpipemon -i w1g1 -c astats -m 1

The -i option is used in most commands to specify the wanpipe interface in which will be run. You can find your wanpipe interfaces using ifconfig, normally they are named in the form “wXg1”.

The -c option is used to specify the command to run in the given interface.

The -m is used to specify the analog channel.

Typical output for an FXO channel not connected will be:

root@sigchld:/home/moy # wanpipemon -i w1g1 -c astats -m 4

        ------- Voltage Status  (FXO,port 3) -------

VOLTAGE : 1 Volts

        ------- Line Status  (FXO,port 3) -------

Line    : disconnected

The voltage comes handy if you want to check if the line is OnHook or OffHook. The typical voltage when the line is connected and OnHook is around 53, 53 volts. When the line is OffHook and the circuit is closed, the voltage drops to 8, 9 volts.

Even when the output of the command tells you if the line is connected or not, you can also appreciate that the voltage is very low when the line is not connected (1 volt is reported in this case).

This entry was posted in wanpipemon. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *