作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
设置:
森托斯 6
操作系统:Linux CentOS 64位
CPU:Intel® Core™ i7 - 4 核
Asterisk 11
libpri 1.4
达赫迪 2.9.1
我的问题很简单:因为我的软电话是从“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)
现在,当我尝试使用软电话拨出电话时, Asterisk 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'
asterisk cli> sip 显示注册
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.
asterisk 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)
最佳答案
尝试将@gw1.sip.us 更改为@myprovider,看看是否有任何变化。这将强制 asterisk 使用配置的中继 [myprovider] 而不是直接将调用直接转发到 gw.sip.us。
希望这对您有所帮助。
关于Asterisk:将 Asterisk 系统连接到 SIP 提供商,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23459210/
我正在开发一个 voip 调用应用程序。我需要做的是在接到来电时将 Activity 带到前台。我在应用程序中使用 Twilio,并在收到推送消息时开始调用。 问题是我试图在接到任何电话时显示 Act
我是一名优秀的程序员,十分优秀!