gpt4 book ai didi

Asterisk:将 Asterisk 系统连接到 SIP 提供商

转载 作者:行者123 更新时间:2023-12-01 12:42:03 29 4
gpt4 key购买 nike

设置:
森托斯 6
操作系统:Linux CentOS 64位
CPU:Intel® Core™ i7 - 4 核

Asterisk 11
libpri 1.4
达赫迪 2.9.1


我想通过 Asterisk 向我的 SIP 提供商发送调用。我想使用软电话拨出电话,当我在软电话上拨出电话时,它需要通过我的 asterisk 服务器路由,然后到 SIP 提供商。目前,当我进行出站调用时,它会生成“身份验证失败”且状态为“CONGESTION”的通知。

我的问题很简单:因为我的软电话是从“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/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com