简体   繁体   English

如何获取星号13中的实际频道数?

[英]How to get actual number of channel in asterisk 13?

In asterisk 1.4 number of channel was specified in chan->name. 在星号1.4中,通道号在chan-> name中指定。 eg number 62: 例如62:

asterisk 1.4 ZAPTEL: Zap/62-1

How to get actual number of channel in asterisk 13 in c-language? 如何获取C语言中星号13中的实际频道数? eg in chan->name this number of span only. 例如,在chan-> name中,仅指定此跨度数。

asterisk 13 DAHDI: DAHDI/I2/102-1

Here is what R.Mudget say about extentons.conf: 这是R.Mudget关于Expandons.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 

But how do I get an actual number of channel in c-language API? 但是,如何获取c语言API中的实际通道数?

Simplest way answer this question is read source code(writed in c/c++) of chan_dahdi and see how dahdi_channel variable is set in YOUR dahdi/asterisk combination. 回答此问题的最简单方法是读取chan_dahdi的源代码(用c / c ++编写),并查看如何在您的dahdi /星号组合中设置dahdi_channel变量。

You also can use ami from c/c++, but that is not optimal. 您也可以在c / c ++中使用ami,但这并不是最佳选择。

In general you should not see number of channel in channel-name unless you setuped one-channel-one-span. 通常,除非设置了“一通道一跨”,否则您不应在“通道名”中看到通道数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM