作为Asterisak 13.4.0 pbx的新用户,我在一个迄今为止最糟糕的WEB RTC问题上工作的时间比我实际预期的要长得多;我使用WebRTComm为我的sip客户端堆栈和chrome版本44.0.2403.125 m在两个客户端盒上作为用户era和用户b代表。我已经在centos 7(x86_64)服务器上部署并设置了web RTC的星号,运行在"192.168.1.2",并使用以下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相同(稍后将使用模板)(userB)…以上;
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标记5= =叫SIP/userB==SIP/userB-00000001振铃
一旦userB选择,我得到:==SIP/userB-0000001重定向信息发生变化,传递给SIP/userA-00000000==SIP/userB-0000001忙信息:
WebRTCommCall: onrtcpeerconnectionsetremotedescriptionerror ():error="Failed to set remote offer sdp: Called with sdp without ice-ufrag and 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
...
可以看到,在用户端(调用方)没有找到ice信息,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, uuid-devel,libuuid -devel和libuuid -devel,以及配置了许多其他可疑软件包。我不是我的安装没有res_http_post(与gmime,glib,libffi和他们的依赖地狱我必须经历和离开,一旦我被告知res_http_post I无关),但我被告知这可以被忽略,与问题无关。由于这个问题,整个项目已经搁置了几个月了。
相信我,我有多检查模块加载和菜单选择
我做错了什么?我现在真的需要一个帮助,我将非常感谢你的贡献。
提前感谢!!
我的天啊,好多信息。下面是我使用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
为webphone创建用户
[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
在扩展中为用户创建扩展。