[Asterisk-Users] How to map zap channels to ISDN extensions on
queues?
Elwin Andriol
elwin at heuveltop.nl
Wed Feb 9 14:05:57 MST 2005
I need to determine the state of extensions/port based on active
channels on my asterisk. For SIP and AIX extensions this is not a real
problem because the channel names they create relate to the SIP/AIX
extensions (just strip the '-' sign and anything after). For ISDN
extensions addressed by Zap, it turned out problematic. As I figured out
there'se no direct relation between a Zap channel (name) and the ISDN
extension currently occupying it.
The actual problem is this. I have a queue where I dynamically
add/remove interfaces to/from. My queue may look something like this:
helpdesk has 0 calls .....
Members:
SIP/port1 (dynamic) has taken no calls yet
ZAP/g1/100 (dynamic) has taken no calls yet
ZAP/g1/200 (dynamic) has taken no calls yet
No Callers
When some one is calling my queue and is being bridged to one of the
ISDN members, I want to know which extension it got bridged to
(zap/g1/100 or zap/g1/200). I can't seem to figure it out based on the
Zap channel to the member extension, neighter based on the incomming
channel. I've tried to based on several sources:
- show channels (CLI)
- show channel (CLI)
- events information (Asterisk Manager API)
Neither of those appear to help me determine wich ISDN extension are in use.
I figured out that in case a call is being bridged to a queue member,
the caller channel's CDR contains the value I want to have (e.g.
zap/g1/100). It's stored in the lastappdata field. The problem is that
the CDR is written after the call is being terminated. I need it
preferabely as soon as the extension at zap/g1/100 starts ringing.
Looking at the source code of asterisk, I believe to have figured out
that CDR data is internally being stored within any channel object. Now
the big question is, if this data is accessable from a CLI or Asterisk
Manager API (telnet)?
Does anybody recognize the above problem?
Is there a clean solution?
Is the real solution to the problem writing something like a zap channel
tracker (patch)?
TIA,
Elwin
--
-----------------------------------------------------------------------
HeuvelTop ICT Diensten v.o.f.
Elwin Andriol tel: +31 65 08 134 91
Utrecht, Nederland fax: +31 30 602 22 71
-----------------------------------------------------------------------
"There are management solutions to technical problems,
but no technical solutions to management problems"
-----------------------------------------------------------------------
More information about the asterisk-users
mailing list