星号如何在拨号前检查一个号码是否占线 [英] Asterisk how check if a number is busy before dialing it

查看:38
本文介绍了星号如何在拨号前检查一个号码是否占线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为刚刚安装了他的第一台 asterix 服务器的初学者,我遇到了一个小问题.我想在实际拨打之前检查我拨打的号码是否占线.

As a beginner that just installed his first asterix server I came across a small issue. i want to check if a number that i dial is busy or not before actually dialing it.

例如我会拨打 0904 => 号码忙 => 重定向到 0905

So for example I would call 0904 => number busy => redirect to 0905

但是,我不希望它在忙时先拨 0904,而是立即将其重定向到 0905.

However I don't want it to dial 0904 first if its busy but just instantly redirect it to 0905 instead.

我有一个非常基本的设置,只有 3 个用户.其中 2 个在支持"队列中,其中一个在管理员"队列中

I have a very basic setup with just 3 users. 2 of them are in a queue "support" one of them is in the queue "admin"

我已经看到并阅读了一些关于检查频道是否可用的内容,但我并不完全理解这一点,我不确定是否可以更轻松地完成.

I have seen and read a little about checking if a channel is available but i didn't fully understand that and I'm not sure if it could be done easier.

这是我的简单拨号计划,如果我调用 *12,我的简单 python 脚本将只对 0904 执行拨号命令.

Here is my simple dialplan, if i call *12 my simple python script will just execute the Dial command to the 0904.

exten => *12,1,Answer()
same => n,set(PHONE_EXTEN=0904)
same => n,AGI(test-agi.py,${PHONE_EXTEN})
same => n,Hangup()

推荐答案

没有办法知道外部号码是否忙.

There is no way know if external number is busy.

如果 number 是您的分机,您可以使用 GROUP/GROUP_COUNT 计算呼叫次数,或者您可以检查分机状态和提示,如文档中所述

If number is your extension, you can count calls using GROUP/GROUP_COUNT or you can check extensions states and hints, like described in docs

https://wiki.asterisk.org/wiki/display/AST/Extension+State+and+Hints

https://wiki.asterisk.org/wiki/display/AST/设备+状态

这篇关于星号如何在拨号前检查一个号码是否占线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆