[Help] WebRTC one way audio/video problem on Asterisk 12

Hello

I’m working on WebRTC project with Asterisk 12.0.0 and JsSip 0.3.7 WebRTC client. For my testing purposes I set up a simple testing environment, which contains: Asterisk 12.0.0 (10.10.1.10), rfc5766-turn-server used as STUN server (10.10.1.90) and 2 PC’s used as WebRTC clients (10.10.1.11 and 10.10.1.12). All testing devices are of course behind NAT which is connected to public internet.

A strange problem occurred with audio and video call. When I made first call, at my test environment, there is no big problem, both clients heard and saw each other. But when I made another call, just 10 – 15 seconds later, I got one way audio/video problem. Client A heard/saw client B, but client B didn’t hear/see client A. When this problem appears I got two error messages in Asterisk CLI: ERROR[5838]: pjsip:0 <?>: icess0xb6f4ae5 ..Error sending STUN request: Invalid argument When there was no audio/video problem I got only one Error sending STUN request message.

I figured it out, that if I delete the cookies on client’s browser (Chrome) or refresh the webpage with JsSip client and re-register the user, the problem with one way audio/video disappear. But of course, only for the first call.

I made an Asterisk Debug file and JsSip log from Chrome console for two successive calls. In first call both client heard/saw each other, but in second call there was a one way audio/video problem. Client A was registered as user 1000@10.10.1.10 and client B was registered as user 1001@10.10.1.10.

Can anyone help me with this problem?

Regards,
Blaz

Log files:
https://www.dropbox.com/s/zv7tr45aa6c6b1p/debug_log_files.zip

My config files:

sip.conf

[general] externip=92.37.66.167 localnet=10.10.1.0/255.255.255.0 context=default allowguest=yes udpbindaddr=0.0.0.0:5060 ;realm=10.10.1.10 realm=asterisk transport=ws,wss,udp ;srvlookup=yes language=en icesupport=yes
http.conf

[general] enabled=yes bindaddr=0.0.0.0 bindport=8088
rtp.conf

[general] rtpstart=10000 rtpend=20000 icesupport=true stunaddr=10.10.1.90:3478
users.conf

[code][1000]
type=friend
username=1000
host=dynamic
secret=1234
context=default
hasiax=no
hassip=yes
encryption=yes
avpf=yes
icesupport=yes
;videosupport=no
videosupport=yes
directmedia=no
disallow=all
allow=alaw,ulaw
nat=no
;nat=force_rport,comedia
allow=vp8
;allow=all

[1001]
type=friend
username=1001
host=dynamic
secret=1234
context=default
hasiax=no
hassip=yes
encryption=yes
avpf=yes
icesupport=yes
;videosupport=no
videosupport=yes
directmedia=no
disallow=all
allow=alaw,ulaw
nat=no
;nat=force_rport,comedia
allow=vp8;
;allow=all[/code]
extensions.conf

[code][default]
exten => 999,1,Answer()
exten => 999,2,Playback(hello-world)
exten => 999,3,Hangup()

exten => 1000,1,Dial(SIP/${EXTEN})
exten => 1001,1,Dial(SIP/${EXTEN})
exten => 2000,1,Dial(SIP/${EXTEN})
exten => 2001,1,Dial(SIP/${EXTEN})
exten => 1002,1,Dial(SIP/${EXTEN})
exten => 1003,1,Dial(SIP/${EXTEN})
exten => 1004,1,Dial(SIP/${EXTEN})
exten => 1005,1,Dial(SIP/${EXTEN})

;exten => number that is dialed,step, function

exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()[/code]

Hi,

Anybody has any clue about this issue. I already asked on official JsSIP Google group, but they told me that this must be a problem on Asterisk side.
Please help me.

Regards,
Blaz

Hi,
a last I managed to find the solution for my problem. After I applied this patch everything started to work normally :smiley:

Regards,
Blaz

Hi,
I am having the same problem. The audio on chrome sometimes comes and sometimes not.
In the asterisk cli I see an error pjsip:0 <?>: icess0x7fba300 …Error sending STUN request: Invalid argument.

Please let me know how can I resolve this issue.

Thanks

This has been subsumed in issues.asterisk.org/jira/browse/ASTERISK-22961. That is marked as fixed, and there is even discussion of how to find out the earliest version for which it is fixed.