【问题标题】:How to get actual number of channel in asterisk 13?如何获得星号 13 中的实际频道数?
【发布时间】:2019-03-16 20:58:57
【问题描述】:

在星号 1.4 中,频道号在 chan->name 中指定。 例如62号:

asterisk 1.4 ZAPTEL: Zap/62-1

如何在 c 语言中获取星号 13 中的实际频道数? 例如in chan->仅命名此跨度数。

asterisk 13 DAHDI: DAHDI/I2/102-1

以下是 R.Mudget 对 extentons.conf 的评价:

You can use the AMI action DAHDIShowChannels to get the current channel mapping.

There is an AMI event that you can look for:
Event: DAHDIChannel Channel: name Uniqueid: id DAHDISpan: 5
DAHDIChannel: 23

It is generated whenever a call is assigned to a B channel or a call moves to a different B channel.

There is also the CHANNEL() dialplan function:
CHANNEL(dahdi_channel)
CHANNEL(dahdi_span)
CHANNEL(dahdi_type)

The DAHDIChannel event and CHANNEL() function are mentioned in the UPGRADE.txt file.

Richard

但是如何在 c 语言 API 中获得实际的通道数?

【问题讨论】:

    标签: asterisk dahdi


    【解决方案1】:

    回答这个问题的最简单方法是读取 chan_dahdi 的源代码(用 c/c++ 编写)并查看如何在您的 dahdi/星号组合中设置 dahdi_channel 变量。

    您也可以使用 c/c++ 中的 ami,但这不是最佳选择。

    一般来说,除非您设置了 one-channel-one-span,否则您不应该在 channel-name 中看到频道数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-02-26
      • 1970-01-01
      • 2012-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-27
      相关资源
      最近更新 更多