开发者

Asterisk Manager API - Extension -> ZAP Channel

开发者 https://www.devze.com 2022-12-11 07:19 出处:网络
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\":

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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号