我有一个场景,我希望将呼叫路由到从Asterisk sip服务器,但我想做一些像这样的事情
sip服务器正在运行:192.168.1.10和 Asterisk服务器正在运行:192.168.1.4
client Diales---->sip:111@192.168.1.4---->To Asterisk and then Asterisk route the
calls------->sip:111@192.168.1.10 --------> sip server
有人可以告诉我如何在Asterisk配置路由文件中执行此操作。
答案 0 :(得分:1)
您需要在Asterisk服务器上设置sip trunk。
查看此页面以获取更多信息:
https://www.beardy.se/how-to-set-up-a-sip-trunk-in-the-asterisk-pbx
答案 1 :(得分:1)
正如os11k所说,你需要SIP干线才能做到这一点。我将添加一些有关在两个城市之间设置SIP干线时遇到的问题的详细信息。
sendrpid=yes
放入SIP中继配置,或者192.168.1.10无法获取来电显示。default
,例如context=sip-server-192-168-1-10
。SIP干线样本
[general] register => SIP_ACCOUNT:SIP_PASSWORD@TheOtherSipServer [TheOtherSipServer] type=peer context=sip-server-192-168-1-10 host=192.168.1.10 defaultuser=THE_ACCOUNT_HERE fromuser=THE_ACCOUNT_HERE remotesecret=THE_PASSWORD_OF_ACCOUNT_HERE ; if you want to send the remote caller id to 192.168.1.10, then set sendrpid=yes . ; you also need to trust the remote caller id in 192.168.1.10 . sendrpid=yes ; if 192.168.1.10 can dial out from here, you need to set trustrpid=yes so you can get the caller id ;trustrpid=yes ; if 192.168.1.10 is picky on codecs ;disallow=all ;allow=THE_CODEC_NAME_ALLOWED_BY_THE_OTHER_SIP_SERVER
Dial
。
拨号方案示例
[globals] SIPTrunk=SIP/TheOtherSipServer [sip-server-192-168-1-10] ;exten=>111,1,Dial(SIP/TheOtherSipServer/111) exten=>111,1,Dial(${SIPTrunk}/${EXTEN})