asterisk - 实现内部分机互打 (实现DND功能和截答)

本文详细介绍了如何使用Asterisk PBX系统进行电话设置,包括DND(请勿打扰)模式的启用与取消、电话截答设置、以及pjsip.conf和extensions.conf文件的具体配置方法。适用于希望深入了解并掌握Asterisk PBX系统操作的IT技术人员。

设置DND :74
取消DND:074
截答:04+分机号

pjsip.conf

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[endpoint_internal](!)
type=endpoint
context=from-internal
disallow=all
allow=ulaw
trust_id_outbound=yes

[auth_userpass](!)
type=auth
auth_type=userpass

[aor_dynamic](!)
type=aor
max_contacts=1

[1001](endpoint_internal)
auth=1001
aors=1001
outbound_auth=1001
[1001](auth_userpass)
password=1001 ; put a strong, unique password here instead
username=1001
[1001](aor_dynamic)

[1002](endpoint_internal)
auth=1002
aors=1002
[1002](auth_userpass)
password=1002 ; put a strong, unique password here instead
username=1002
[1002](aor_dynamic)

extensions.conf

[make-pickup]
exten => _*04X.,1,Pickup(${EXTEN:3})
[make-dnd]
exten => *74,1,Set(PRESENCE_STATE(CustomPresence:${CALLERID(num)})=dnd,,Go Out to lunch)
        same => n,Hangup()
[nomake-dnd]
exten => *074,1,Set(PRESENCE_STATE(CustomPresence:${CALLERID(num)})=not_set,,I am come back)
        same => n,Hangup()
[from-internal]
include => make-pickup
include => make-dnd
include => nomake-dnd

exten => _100[1-2],hint,,CustomPresence:${EXTEN}
exten => _100[1-2],1,Verbose(The local number is ${CALLERID(num)})
        same => n,GotoIF($[${PRESENCE_STATE(CustomPresence:${EXTEN},value)} = dnd]?${EXTEN})
        same => n,Dial(PJSIP/${EXTEN},20)
        same => n,(${EXTEN}),Hangup()

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值