[asterisk-bugs] [JIRA] (ASTERISK-21930) WebRTC over WSS is not working.

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Fri Oct 11 11:03:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-21930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210877#comment-210877 ] 

Richard Mudgett edited comment on ASTERISK-21930 at 10/11/13 11:02 AM:
-----------------------------------------------------------------------

I have webrtc-12 and webrtc-trunk branches now as well

http://svnview.digium.com/svn/asterisk/team/moy/webrtc-12/
http://svnview.digium.com/svn/asterisk/team/moy/webrtc-trunk/

Find the patch for trunk attached as well if you find that easier to review.

The patch includes:

Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

This should fix an issue that I have experienced and other users may have reported [1][2], where
secure websockets wouldn't work, messages seem to not make it into Asterisk

[1] http://lists.digium.com/pipermail/asterisk-users/2013-August/280175.html
[2] ASTERISK-21930
                
      was (Author: moy):
    I have webrtc-12 and webrtc-trunk branches now as well

http://svnview.digium.com/svn/asterisk/team/moy/webrtc-12/
http://svnview.digium.com/svn/asterisk/team/moy/webrtc-trunk/

Find the patch for trunk attached as well if you find that easier to review.

The patch includes:

Several fixes for the WebSockets implementation in res/res_http_websocket.c

* Flush the websocket session FILE* as fwrite() may not actually guarantee sending
  the data to the network. If we do not flush, it seems that buffering on the SSL
  socket for outbound messages causes issues

* Refactored ast_websocket_read to take into account that SSL file descriptors
  may be ready to read via fread() but poll() will not actually say so because
  the data was already read from the network buffers and is now in the libc buffers

This should fix an issue that I have experienced and other users may have reported [1][2], where
secure websockets wouldn't work, messages seem to not make it into Asterisk

[1] http://lists.digium.com/pipermail/asterisk-users/2013-August/280175.html
[2] https://issues.asterisk.org/jira/browse/ASTERISK-21930
                  
> WebRTC over WSS is not working.
> -------------------------------
>
>                 Key: ASTERISK-21930
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21930
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_http_websocket
>    Affects Versions: 11.4.0
>         Environment: debian wheezy, asterisk 11.4, sipml5-webphone
>            Reporter: John
>            Assignee: Matt Jordan
>         Attachments: webrtc-trunk.patch
>
>
> Websocket connection over secure WSS gives a the following:
> == WebSocket connection from '192.168.1.1:59831' for protocol 'sip' accepted using version '13'
> but peer will never register.
> Using the unsecure WS, everything works as expected. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list