[asterisk-users] Tracking T1/PRI channel status - inbound vs. outbound

Kevin DeGraaf kevin at kdegraaf.net
Mon Oct 13 16:22:08 CDT 2008


I need to monitor the states of my T1/PRI Zap channels.  Specifically, I 
need to be able to programmatically determine whether a channel is 
unused, carrying an inbound call, or carrying an outbound call.

Using the manager interface, I can easily tell whether a Zap channel is 
used or not by looking at the results of:

   Action: Command
   Command: zap show channel <x>

Or:

   Action: Status

However, nothing in those results seems to reliably indicate whether the 
channel received an incoming call or was used to make an outgoing call.

I can make educated guesses based on the value of "Caller ID" or 
"Calling TON" or the combination of "Channel" and "Link", but none of 
these heuristics seem robust.

I've even tried GetVar-ing various channel functions, to no avail.

This seems like a case where a simple flag should be set somewhere, but 
I haven't found one.  What's the most elegant way to do this?  Thanks.

-- 
Kevin DeGraaf



More information about the asterisk-users mailing list