asterisk IAX 使用经验

Voice transport should always balance between real time and bandwidth consumption. When interconnecting two PBX in order to exchange more than one communication, it could be interesting to limit bandwidth consumption by carrying more voice samples in the same IP frame. This is what the Asterisk Inter Exchange protocol (aka IAX) is doing and gains are real.
0diggsdigg

Usually codec’s output is carrying 20 ms of voice. This value is efficient enough to allow a low jitter and low delay during transport. Depending on the codec used those 20 ms of sound represent a variable size to transport in the IP frame (generally using UDP and RTP). Since we can potentially transport more than one voice sample in an IP frame we can make some savings.

On one hand, using a G.711 codec at 64Kbps, each 20 ms chunk represents 160 bytes of data. On the other hand, each standard voice frame using UDP and RTP is about 40 bytes long (IP + UDP + RTP) and with IAX it represents also a 40 bytes header. The waste ratio between transported interesting data (160 bytes) and the whole IP frame1 (200 bytes) is around 20% which is high when repeated every 20 ms.

The more samples we can transport in the same IP frame, the less waste we have: 11% with 2 samples, 6% with 4 and 5% with 5 samples. But putting too much samples in the same IP frame increase the delay between each frames and can increase the jitter2.

In IAX, that is mainly used to interconnect Asterisk PBX3 the approach is a bit different: each frame is sent at regular interval and carry the amount of data arriving from the codec during this delay. On our test platform, when using G.711 law A on the trunk, frames are sent every 100 ms (average) and frame size for one conversation is either 870 or 1034 bytes. When using GSM codec, frames are still sent every 100ms but size is between 230 and 270 bytes. The IAX trunk is obviously carrying more than one sample per IP frame, limiting the header impact down to the 5% stated previously.

But the main point is that IAX can multiplex inside the same IP frame multiple conversation. Asterisk still keep its delay between frames but, since more information are available, the IAX payload is bigger. For example, using G.711 with a second call on the same trunk the frame size is now bigger than my Ethernet MTU. Thus IP frames are fragmented on the network, which is not so good in some situation where fragments are not authorised. But the header loss ratio is becoming very good4: down to 3% with only 2 conversations on the same trunk.

IAX is really a good choice when dealing with Asterisk PBX interconnection, it is wasting less bandwidth, still limiting the delay and pass very easily firewalls. Why not using it more for multisite installation? The only issue is that IAX trunk is requiring an accurate clock [b](ie voice card or ztdummy), b[/b]ut this is not a big deal.

URL:[url]http://www.panoramisk.com/116/iax-trunk-and-bandwidth-optimisation/en/[/url]

主题测试文章,只做测试使用。发布者:zhangyang,转转请注明出处:https://www.voip88.com/asterisk-iax-%e4%bd%bf%e7%94%a8%e7%bb%8f%e9%aa%8c/

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022年 8月 26日 下午3:28
下一篇 2022年 8月 26日 下午3:28

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信
自6.2开始主题新增页头通知功能,购买用户可免费升级到最新版体验