====== asterisk plugin ====== This plugin provides a simple way to see which zaptel trunks on an Asterisk phone server are in use. It works for up to 32 lines and displays either inactive or the sip device that is currently "connected" to the trunk. Only works for zaptel stuff for now as it's all I have to test. ---- ===== Functions: ===== asterisk::zapstatus(int) - Returns the status of the line passed to it. The following functions were added later. Each of them runs the Asterisk command line client (//asterisk -rx '...'//) when it is evaluated, so LCD4Linux has to run on the Asterisk server with sufficient rights, and the update interval should not be too short. |asterisk::corecalls()|number of active calls (from //core show channels//)| |asterisk::sippeers()|number of SIP peers (from //sip show peers//)| |asterisk::siponline()|number of monitored SIP peers that are online (from //sip show peers//)| |asterisk::uptime()|uptime of Asterisk in seconds (from //core show uptime//)| Note on //asterisk::corecalls()//: in the current source the function writes the output of the command to ///tmp/asterisk.calls//, but reads from ///tmp/asterisk.state//. Unless this is fixed, the function does not return a useful value. ---- ===== Example ===== Widget Zap1 { class 'Text' expression asterisk::zapstatus(1) width 20 align 'L' update 1000 } ----