如何在 Asterisk 服务器中为多个拨号方案配置相同的扩展

问题描述

sip.conf 文件内容如下

[general]
context=LOCAL
allowoverlap=no
udpbindaddr=0.0.0.0
tcpenable=no
tcpbindaddr=0.0.0.0
transport=udp
srvlookup=yes
accept_outofcall_message=yes
outofcall_message_context=LOCAL
auth_message_requests=yes
qualify=yes
qualifyfreq=60
disallow=all
allow=alaw,gsm
allowguest=no

[8001]
type=friend
host=dynamic
secret=1111

[8002]
type=friend
host=dynamic
secret=1111

[8003]
type=friend
host=dynamic
secret=1111

[7005]
type=friend
host=dynamic
secret=1111

extension.conf 文件如下

[general]
static=yes
writeprotect=no
priorityjumping=no
autofallthrough=yes
clearglobalvars=no

[LOCAL]
exten => 8001,1,Dial(SIP/8001,20)
exten => 8002,Dial(SIP/8002,20)
exten => 8003,Dial(SIP/8003,20)
exten => 7005,Dial(SIP/7005,20)

问题:现在我想为上下文创建另一个名为WORLD(新功能)的新拨号方案。 此上下文具有与上下文 LOCAL 相同的扩展名 8001,8002,8003,而不是 7005 上下文,此新功能具有 7003 扩展名

我需要有关如何做到这一点的指导/帮助。

解决方法

您可以尝试在 sip.conf 中的 [8001] sip-user 中添加 context=WORLD。并且在每个用户中