软件电话无法连接 Asterisk

软件电话无法连接 Asterisk

我正在尝试将我的 X-Lite 与远程 Asterisk 服务器连接。我已按照本教程将其安装在 Ubuntu VPS 服务器 (14.04) 上:https://www.callcentric.com/support/device/asterisk/1_8 我已遵循该文章中所写的所有内容。

在 sip.conf 中我做了如下更改:

[general]
dtmfmode = rfc2833
context=from-callcentric
srvlookup=yes
register => 1777MYCCID:[email protected]
session-timers=refuse

[callcentric]
type=peer
context=from-callcentric
host=callcentric.com
fromdomain=callcentric.com
defaultuser=1777MYCCID
fromuser=1777MYCCID
secret=SUPERSECRET
insecure=port,invite
disallowed_methods=UPDATE
directmedia=no
videosupport=no
disallow=all
allow=ulaw

[123]
context=to-callcentric
type=friend
defaultuser=123
secret=PASSWORD
host=dynamic

在 extensions.conf 中我在底部添加了这一行:

[from-callcentric]
exten => s,1,Dial(SIP/123)

[to-callcentric]
exten => _XX,1,Dial(SIP/${EXTEN}@callcentric)

从终端:

 asterisk -r

Privilege escalation protection disabled!
See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.
Asterisk 11.7.0~dfsg-1ubuntu1, Copyright (C) 1999 - 2013 Digium, Inc. and others.
Created by Mark Spencer <[email protected]>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 11.7.0~dfsg-1ubuntu1 currently running on torrent (pid = 518)
torrent*CLI>

torrent*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time
callcentric.com:5060                    N      17772807810         45 Registered           Thu, 10 Sep 2015 11:00:55
1 SIP registrations.

torrent*CLI> sip show peers
Name/username             Host                                    Dyn Forcerport ACL Port     Status      Description
123/123                   (Unspecified)                            D   a             0        Unmonitored
callcentric/17772807810   204.11.192.163                               a             5080     Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 1 offline]

但使用分机 123 将我的软电话 X-Lite 与 Asterisk 连接后,出现此错误:SIP error 408。我使用了以下信息:

User ID: 123
Pass: 123
Domain: My VPS IP

我哪里做错了?有什么建议吗...

答案1

您需要在 X-Lite 的帐户设置中将服务器的公共 IP 地址设置为 SIP 代理。我不太清楚为什么没有它就行不通,但添加它对我来说可以将 X-Lite 连接到我的 Asterisk。

相关内容