我最近用 PJSIP 和数据库设置了我的星号 13。一切正常,但有时我没有声音,大多数时候我都有声音。所以我需要RTP软件吗?以下是详细日志,我正在寻找但没有发现任何语音或编解码器问题,因为我为所有人设置了编解码器,这是本地环境所有本地服务,所以应该没有任何与 nat 相关的问题,但似乎我配置了不正确的 nat问题。我迁移了,并且在旧的 sip 服务器中也注意到了同样的问题,由于这个语音问题,我把它移到了新的服务器上。所以确定不是软件问题,一定是配置问题。以下是我的日志。注意:我是 PJSIP 的新手,这是我第一次安装 PJSIP。
-- Executing [1567241111@default:1] AGI("PJSIP/192.168.56.103-00000004", "myagi.pl,0000FFFF0001,1567241111,,PJSIP/192.168.56.103-00000004,,1547882181.8") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/myagi.pl
<--- Transmitting SIP response (913 bytes) to UDP:192.168.56.103:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.56.103:5060;received=192.168.56.103;branch=z9hG4bK08e608fd
Call-ID: 25918c527ec2200b25e99b862ff7ac80@192.168.56.103:5060
From: "vendorTest" <sip:0000FFFF0001@192.168.56.103>;tag=as7756e843
To: <sip:1567241111@192.168.56.102>;tag=1bf6a0d2-1c8b-431f-91c7-a074337a7b88
CSeq: 102 INVITE
Server: Asterisk PBX certified/13.21-cert3
Contact: <sip:192.168.56.102:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub
Content-Type: application/sdp
Content-Length: 288
v=0
o=- 2131651698 2131651700 IN IP4 192.168.56.102
s=Asterisk
c=IN IP4 192.168.56.102
t=0 0
m=audio 24874 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
<--- Received SIP request (460 bytes) from UDP:192.168.56.103:5060 --->
ACK sip:192.168.56.102:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.56.103:5060;branch=z9hG4bK62ff354e
Max-Forwards: 70
From: "vendorTest" <sip:0000FFFF0001@192.168.56.103>;tag=as7756e843
To: <sip:1567241111@192.168.56.102>;tag=1bf6a0d2-1c8b-431f-91c7-a074337a7b88
Contact: <sip:0000FFFF0001@192.168.56.103:5060>
Call-ID: 25918c527ec2200b25e99b862ff7ac80@192.168.56.103:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 11.13.1~dfsg-2+deb8u5
Content-Length: 0
我的 PJSIP 配置调用对等体
[192.168.56.103]
type = aor
contact = sip:192.168.56.103
maximum_expiration = 60
minimum_expiration = 60
default_expiration = 180
[192.168.56.103]
type = identify
endpoint = 192.168.56.103
match = 192.168.56.103
[192.168.56.103]
type = endpoint
context = default
dtmf_mode = rfc4733
disallow = all
allow =all
direct_media = yes
language = en
aors = 159.203.27.198
t38_udptl = yes
t38_udptl_ec = none
rtp_symmetric = yes
force_rport = no
rewrite_contact = yes
direct_media = no
我的服务器
192.168.56.103 - Asterisk 13 with PJSIP - call receiver
192.168.56.102 - Asterisk 11 with PJSIP - Caller
为了清楚起见,我已经放了语音邮件,所以另一部分实际上是用星号回复的,正常它要求输入密码,它做了 10 次但 2 次没有声音?任何想法我做错了什么。我应该安装 RTP 引擎还是 RTPProxy。我听到很多人说我们必须有 RTP、Stun 或 ICE 服务器,所以如果我将 opensips 作为 SBC 放在前面而不是转发给 Asterisk 会更好,因为我希望在当前的设置中有更多的服务器所以需要强大的通信基础设施,没有任何声音问题。