Asrterisk 13.4.0 RTC问题

时间:2015-08-18 19:16:44

标签: asterisk

作为Asterisak 13.4.0 pbx的新成员,我一直致力于解决迄今为止最糟糕的WEB RTC问题,其时间比我实际预期的要长得多; 我在两个客户端盒上使用WebRTComm作为我的SIP客户端堆栈和chrome版本44.0.2403.125 m作为userA和userB resp。 我已经在运行于" 192.168.1.2"的centos 7(x86_64)服务器上部署并设置了用于Web RTC的星号。使用以下sip.conf,extensions.conf,http.conf,rtp.conf和manager.conf:

sip.conf :
[general]
context=guest
localnet=192.168.1.0/255.255.255.0
externrefresh=150
language=en
allowguest=yes
callcounter=yes
allowtransfer=yes
callevents=yes
udpbindaddr=0.0.0.0:5060
transport=udp,ws
limitonpeers=yes
realm=192.168.1.2
nat=force_rport,comedia ;eventhough I am runing everytyhing local.'no' had not effect change
rtcachefriends=yes
disallow=all
allow=alaw
allow=ulaw
allow=gsm
useragent=test-agent

[userA]
host=dynamic
secret=strong pass
context=IncomingRTCCxt
type=friend ;tried user and peer as well
insecure=invite ;helped me avoid 401 auth issue
avpf=yes
dtmf=auto
nat=force_rport,comedia ;again
qualify=yes
force_avp=yes
icesupport=yes
encryption=yes
transpport=ws,udp
directmedia=no
disallow=all
allow=alaw
allow=ulaw
allow=gsm
dtlsenable=yes
dtlsverify=no ;tried fingerprint as well
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem
dtlssetup=actpass

对于userB来说是相同的(虽然稍后会使用模板) [用户B]   ......;如上所述

extensions.conf:
exten => userA,1,Dial(SIP/userA,40)
exten => userB,1,Dial(SIP/userB,40)
NOTE: even with:answer(),Playback(hello-world),i get failed to set remote answer sdp...this time answer sdp.but with dial application,it is 'remote offer sdp...'

http.conf:
[general]
enable=yes
bindaddr=0.0.0.0
bindport=8088

rtp.conf:
[general]
rtpstart=10000
rtpend=65000 ;because I realised asterisk was using large ports in my sdp on REGISTER etc..
icesupport=yes ;tried 'true' as well
stunaddr=stun.l.google.com:19302

然而,当我从userA调用userB时,userB响铃rtp调试:      - 在新堆栈中执行[userA @ IncomingRTCCxt:1]拨号(" SIP / userB 0000000"," SIP / userA,40")     ==使用SIP / RTP CoS标记5         ==被称为SIP / userB     == SIP / userB-00000001正在响铃

一旦用户B选择,我得到:     == SIP / userB-0000001重定向信息已更改,并将其传递给SIP / userA-00000000     == SIP / userB-0000001正忙 和消息:

WebRTCommCall:onRtcPeerConnectionSetRemoteDescriptionErrorEvent():error ="无法设置远程商品sdp:使用SDP调用而不使用ice-ufrag和ice-pwd。" 这是userB(被调用者)sip客户端输出:

SIP message received: INVITE sip:userA@PfoKs7oHgVn4.invalid;transport=ws SIP/2.0
Via: SIP/2.0/WS 192.168.1.2:5060;branch=z9hG4bK6a0720be;rport;rport
Max-Forwards: 70
From: "userB" <sip:userB@192.168.1.2>;tag=as6e3a062b
To: <sip:userA@PfoKs7oHgVn4.invalid;transport=ws>
Contact: <sip:userB@192.168.1.2:5060;transport=WS>
Call-ID: 4a8571b50aeb1d246cf8af2557efd94d@192.168.1.2:5060
CSeq: 102 INVITE
User-Agent: Digital-Merge_UA
Date: Tue, 18 Aug 2015 17:59:52 GMT
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,SUBSCRIBE,NOTIFY,INFO,PUBLISH,MESSAGE
Supported: replaces,timer
Content-Type: application/sdp
Content-Length: 456

v=0
o=root 1706945857 1706945857 IN IP4 192.168.1.2
s=Asterisk PBX 13.4.0
c=IN IP4 192.168.1.2
t=0 0
m=audio 17180 RTP/SAVPF 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=maxptime:150
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 5E:1F:8F:04:AB:2E:E0:41:84:E4:7F:8F:DE:38:85:3F:07:81:B1:01:04:C8:9E:E2:33:8B:3A:A7:7B:52:EC:03
a=sendrecv
...

如您所见,在userA(调用者)sdp上没有找到冰信息由客户端完全生成并发送为:

SIP message sent: INVITE sip:userB@pbx.testdomain.com SIP/2.0
Call-ID: 1439921054041
CSeq: 1 INVITE
From: "userA" <sip:userA@pbx.testdomain.com>;tag=1439921054247
To: <sip:userB@pbx.testdomain.com>
Via: SIP/2.0/WS PfoKs7oHgVn4.invalid;branch=z9hG4bK-353139-0933c152f7c327fa0884da16ca7fa901;rport
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: test-ua
Allow: INVITE,ACK,CANCEL,BYE
Contact: <sip:userA@PfoKs7oHgVn4.invalid;transport=ws>
Content-Length: 1268

v=0
o=- 712764575873617987 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio
a=msid-semantic: WMS htItKFZedG8Su46RU93dhwTEYjJuvEG2ejVQ
m=audio 50113 RTP/SAVPF 8 0
c=IN IP4 192.168.1.10
a=rtcp:50114 IN IP4 192.168.1.10
a=candidate:4077567720 1 udp 2122260223 192.168.1.10 50113 typ host generation 0
a=candidate:4077567720 2 udp 2122260222 192.168.1.10 50114 typ host generation 0
a=candidate:3179889176 1 tcp 1518280447 192.168.1.10 0 typ host tcptype active generation 0
a=candidate:3179889176 2 tcp 1518280446 192.168.1.10 0 typ host tcptype active generation 0
a=ice-ufrag:cI2rB+zf3Z0nu5IY
a=ice-pwd:pW72fhckiizlLW4lP2Ctdgfr
a=fingerprint:sha-256 9A:C4:1B:8C:D6:EF:A2:79:4F:55:0A:23:99:63:25:27:70:0F:9F:DB:68:1A:C0:E6:01:08:E9:C8:AD:0E:88:94
a=setup:actpass
a=mid:audio
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=sendrecv
a=rtcp-mux
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=maxptime:60
a=ssrc:2412920463 cname:Khb+ASO4msuaAsHx
a=ssrc:2412920463 msid:htItKFZedG8Su46RU93dhwTEYjJuvEG2ejVQ 4cd36caf-4fbf-469d-be49-52bf1dc5b99a
a=ssrc:2412920463 mslabel:htItKFZedG8Su46RU93dhwTEYjJuvEG2ejVQ
a=ssrc:2412920463 label:4cd36caf-4fbf-469d-be49-52bf1dc5b99a.

有点星号是为了完全生成具有所需冰细节的sdp。

我注意到网络上的问题有点令人担忧,很多用户都喜欢这样;我已经完全安装了uuid,uiuid-devel,libuuid和libbuuid-devel以及许多配置的其他可疑软件包。 我不是我的安装没有res_http_post(与gmime,glib,libffi和他们的依赖地狱我必须通过并在我被告知res_http_post我无关紧要时离开)但我被告知这可以被遗漏并且与之无关问题。 由于这个问题,整个项目已经堆叠了好几个月了。

相信我,我已经多次检查加载的模块和menuselect

我在做错了什么。 我现在真的需要帮助,我非常感谢你的贡献。

提前多多感谢!!

1 个答案:

答案 0 :(得分:1)

哦,天哪,很多信息。以下是我用sipml5做的事情:

你可能错过了一些软件包,所以你可以先做的就是去/ usr / src / asterisk-version / contrib / scripts /然后执行

./install_prereq install
./install_prereq install-unpackaged

然后转到/ usr / src / asterisk-version /进行常规安装

./configure
make menuselect
make && make install
make samples ;if you do not have your own configuration

现在我们需要生成证书:

mkdir /etc/asterisk/keys
cd /usr/src/asterisk-version/contrib/scripts
/ast_tls_cert -C hostname -O "Some name" -d /etc/asterisk/keys

在/ etc / asterisk / dir中编辑sip.conf

udpbindaddr=0.0.0.0:5060
realm=your_ipaddr
transport=ws,udp

网络电话的创建用户

[1000]
host=dynamic
secret=YouPassword
context=from-internal
type=friend
encryption=yes
avpf=yes
icesupport=yes
directmedia=no
disallow=all
allow=ulaw
allow=alaw
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlscafile=/etc/asterisk/keys/ca.crt
dtlssetup=actpass

在http.conf中

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088

在rtp.conf中

[general]
rtpstart=10000
rtpend=20000
icesupport=yes
stunaddr=stun.l.google.com:19302

在扩展程序中为用户创建扩展程序。它完成了。