Hi,
a quick update: IT WORKS! :)
First of all I updated my Chrome dev release as any morning (version
20.0.1132.11, release 137611), but that didn't seem to do anything
special.
Then I modified the Asterisk code to make it generate and respond to
bind requests for the RTCP connection too, since that bit was missing.
At this point I noticed from Wireshark that Chrome had started to send
SRTP packets too: I don't know if it was because of the software
update or the RTCP connection handling connectivity checks, but I saw
them, and that was enough for me.
Audio was still not working, though, and after a bit of debugging I
found out that was because of a problem in how Asterisk currently
handles crypto attributes in the SDP: apparently, Asterisk just takes
the first crypto line it finds and uses that for the negotiation,
despite of the algorythm. The problem is the first line Chrome sends
for audio is related to AES_CM_128_HMAC_SHA1_32, while Asterisk
replies with a AES_CM_128_HMAC_SHA1_80, obviously causing the
authentication to fail. I just had my Application Server remove the
AES_CM_128_HMAC_SHA1_32 line from the SDP before sending it to
Asterisk, and now audio works fine!
Or, to be more precise, I could hear the playback Asterisk was playing
in my browser: I still have not tried if Asterisk can get the frames
Chrome sends just as fine (I'll try this later in the day, I can't see
a reason why that should fail) but that's a very good start
nevertheless.
What puzzles me, though, is that I could hear the audio without
apparently having it in any element in the web page. I have two video
elements in my page: copying the approach the apprtc demo uses, I have
one video element where I put the local MediaStream (FYI, local video
is green in my case, I opened an issue on the webrtc track about that)
and another video element that is supposed to (dis)play the remote
MediaStream as soon as it is available. This remote video element is
never updated, though, and the onaddstream PeerConnection callback
never invoked, and yet I could hear the audio (which was definitely
coming from the webpage since, as soon as I closed it, audio stopped).
Am I wrong in assuming this relation between the media and something
"physical" in the HTML page?
I'll keep you updated on the gateway progress,
Lorenzo
> ...
>
> leggi tutto