【发布时间】:2014-05-04 17:22:13
【问题描述】:
设置:
Centos 6
操作系统:Linux CentOS 64 位
CPU:Intel® Core™ i7 - 4 核
星号 11
libpri 1.4
达迪 2.9.1
我想通过星号向我的 SIP 提供商发送呼叫。我想使用软件电话拨打电话,当我在软件电话上拨打电话时,它需要通过我的星号服务器路由,然后发送到 SIP 提供商。目前,当我进行出站呼叫时,它会产生“身份验证失败”并且状态为“拥塞”通知。
我的问题很简单:由于我的软电话是从“User1”呼叫的(如下所示)我需要在我的 sip.conf 和 extensions.conf 文件中写什么才能让 SIP 提供商拨出电话我?
我的想法:
我觉得我错过了流程的一部分,比如如何设置 User1 来处理拨出电话...
查看我当前如何设置这两个文件的概述:
注意:
- 此帖子的所有用户名和密码已被删除。
- sip.us 是 sip 提供者
sip.conf:
[general]
transport=udp
register => username:password@gw1.sip.us
[myprovider]
type=peer
insecure=port,invite
host=gw1.sip.us
port=5060
dtmfmode=rfc2833
canrevinvite=no
disallow=all
allow=ulaw
qualify=yes
qualifyfreq=30
nat=force_rport,comedia
trustrpid=yes
fromdomain=gw1.sip.us
username=*****
secret=*****
context=from-trunk
rfc2833compensate=yes
session-timers=refuse
[friends_internal](!)
type=friend
host=dynamic
context=users
disallow=all
allow=ulaw
allow=alaw
[user1](friends_internal)
secret=****
[user2](friends_internal)
secret=****
现在是 extensions.conf:
...
...
exten=>_1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@gw1.sip.us)
[users]
exten=>6001,1,Dial(SIP/user1,20)
exten=>6002,1,Dial(SIP/user2,20)
当我尝试使用软电话拨打电话时,现在是星号 cli 输出:
== Using SIP RTP CoS mark 5
-- Executing [12015550155@users:1] Dial("SIP/user1-0000001e",
"SIP/12015550155@gw1.sip.us") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/12015550155@gw1.sip.us
[May 4 10:02:13] NOTICE[28935][C-0000002a]: chan_sip.c:23094
handle_response_invite: Failed to authenticate on INVITE to
'<sip:user1@501.62.174.2>;tag=as798e5009'
-- SIP/gw1.sip.us-0000001f is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
-- Auto fallthrough, channel 'SIP/user1-0000001e' status is 'CONGESTION'
星号 cli> sip show registery
Host dnsmgr Username Refresh State Reg.Time
gw1.sip.us:5060 N username 105 Registered Sun, 04 May 2014 10:28:05
1 SIP registrations.
星号 cli> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status
user1/user1 68.198.. D Auto (No) No 55461 Unmonitored
user2/user2 68.198.. D Auto (No) No 55461 Unmonitored
myprovider/username 65.254.44.194 Yes Yes 5060 OK (42 ms)
【问题讨论】:
-
注意'
;',你的配置中有那个IP吗? (请注意,它不是有效的 IP 地址) -
我为这篇文章特意改变了它。它注册成功。谢谢。