Reputation: 3917
Is there a way to retrieve the ZAP channel from an extension number through the Manager API?
For example, this is what I see when I run "zap show channels":
Chan Extension Context Language MOH Interpret
...
33 3594 from-zaptel en default
...
But Manager API only returns the following (without extension):
Event: ZapShowChannels
Channel: 33
Signalling: FXS Kewlstart
Context: from-zaptel
DND: Disabled
Alarm: No Alarm
ActionID: aci-1234
Upvotes: 0
Views: 764
Reputation: 20540
You did not mention which version of asterisk you are working with. I assume asterisk 1.2 because in newer versions "zaptel" has been renamed to "dahdi".
It's a bit of a work around, but you can request the missing information for each channel with the "GetVar" Action.
send:
Action: GetVar
Channel: Zap/33
Variable: EXTEN
receive:
Response: Success
EXTEN: 3594
Upvotes: 1