我正在熟悉 Asterisk,并且正在阅读“Asterisk:电话的未来”一书。
我到那里我已经配置了点sip.conf
,并extensions.conf
根据书。
sip.conf
:
[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
[1000]
type=friend
context=phones
host=dynamic
Run Code Online (Sandbox Code Playgroud)
extensions.conf
:
[globals]
[general]
autofallthrough=yes
[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()
[incoming_calls]
[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Echo()
exten => 500,n,Hangup()
[phones]
include => internal
Run Code Online (Sandbox Code Playgroud)
我的 Asterisk 服务器和我的软电话 (Ekiga) 都在我的桌面上运行。当我添加一个帐户时,它说Could not register sip:1000@localhost
。我还尝试将 Ekiga 中的注册商设置为127.0.0.1
.
我只是想让 Asterisk 使用基本设置,这样我就可以试验它。
系统详情:
blaine :: /etc/asterisk » uname -a
Linux blaine 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux
blaine :: /etc/asterisk » cat /etc/issue
Ubuntu 10.04.1 LTS
Run Code Online (Sandbox Code Playgroud)
更新
我在本地主机上运行了一个 nmap 并发现了以下内容
blaine :: /etc/asterisk » nmap localhost
Starting Nmap 5.00 ( http://nmap.org ) at 2010-08-04 10:38 MDT
Warning: Hostname localhost resolves to 2 IPs. Using 127.0.0.1.
Interesting ports on localhost (127.0.0.1):
Not shown: 987 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
631/tcp open ipp
1720/tcp open H.323/Q.931
2000/tcp open callbook
3306/tcp open mysql
5222/tcp open unknown
5269/tcp open unknown
7070/tcp open realserver
7443/tcp open unknown
7777/tcp open unknown
9090/tcp open zeus-admin
9091/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.35 seconds
Run Code Online (Sandbox Code Playgroud)
我相信我已经想通了。由于 SIP 客户端和服务器都在端口 5060 上运行,因此我不能在与我的软电话相同的设备上运行 Asterisk 服务器。我已经在远程服务器上安装了 Asterisk,我可以按照书中的说明使用 Ekiga 连接到它。
哈,书上也是这么说的。为我感到羞耻。
If you are running Asterisk and a softphone on the same system (i.e.,
running an X-Lite softphone and Asterisk on a laptop or desktop), then
you will need to modify the SIP port that client listens on. It will need
to be changed from 5060 to 5061 (or some other unused port) so that
Asterisk and the softphone do not interfere with each other.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
7014 次 |
最近记录: |