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

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

问题描述

作为刚安装了他的第一台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个在队列"support"中,其中一个在队列"admin"中

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的Dial命令.

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.

如果电话号码是您的分机号,则可以使用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 +和+提示

https://wiki.asterisk.org/wiki/display/AST/Device + State

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

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