venugopalraokk / doubango

Automatically exported from code.google.com/p/doubango
0 stars 0 forks source link

Resampler related problems with Chrome browser using OPUS and remote SIP user agent using G.711a #390

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Starting a call from the Chrome browser using sipml5 to my SIP proxy, which 
sends it to a user agent supporting G.711a.

Is there any way to use G.711a or change the OPUS sample rate to 8000Hz on the 
browser side?

What is the expected output? What do you see instead?

*INFO: !!DTLS-SRTP started!!
*INFO: dtls.srtp_handshake_succeed=1, dtls.srtcp_handshake_succeed=1
*INFO: DTLS-DTLS-SRTP socket [10.77.40.78]:53186 handshake succeed
*INFO: [OPUS] Open decoder: rate=48000, channels=1
*INFO: [OPUS] Open encoder: rate=48000, channels=1
*INFO: Consumer audio params different than producer expected input...request 
resampler
*INFO: setActualSndCardRecordParams(ptime=20, rate=48000, channels=1)
*INFO: Create audio resampler(G.711a codec (native)) for producer: 
rate=48000->8000, channels=1->1, bytesPerSample=2
*INFO: State machine: No matching state found.
*INFO: Using symetric RTP for [10.77.38.206]:20384
*INFO: Consumer audio params different than producer expected input...request 
resampler
*INFO: setActualSndCardRecordParams(ptime=20, rate=8000, channels=1)
*INFO: Create audio resampler(opus Codec) for producer: rate=8000->48000, 
channels=1->1, bytesPerSample=2
***ERROR: function: "tdav_speex_resampler_process()"
file: "src/audio/tdav_speex_resampler.c"
line: "105"
MSG: Input data has wrong size
***ERROR: function: "tdav_session_audio_producer_enc_cb()"
file: "src/audio/tdav_session_audio.c"
line: "242"

The last two errors are then continuously repeated.

What version of the product are you using? On what operating system?

Doubango svn r1116
webrct2sip svn r130

Red Hat Enterprise Linux Server release 6.3 (Santiago)
Linux xxxxxxxx 2.6.32-279.el6.i686 #1 SMP Wed Jun 13 18:23:32 EDT 2012 i686 
i686 i386 GNU/Linux

Please provide any additional information below.

RTCWeb Breaker enabled on sipml5.

Audio related configuration from config.xml:

  <enable-rtp-symetric>yes</enable-rtp-symetric>
  <enable-media-coder>yes</enable-media-coder>
  <rtp-buffsize>65535</rtp-buffsize>
  <srtp-mode>optional</srtp-mode>
  <srtp-type>sdes;dtls</srtp-type>
  <dtmf-type>rfc4733</dtmf-type>

  <codecs>pcma;pcmu;opus</codecs>
  <!-- <codecs>opus;pcma;pcmu;gsm;vp8;h264-bp;h264-mp;h263;h263+</codecs> -->
  <codec-opus-maxrates>48000;48000</codec-opus-maxrates>

speexdsp version: speex-1.2-0.11.rc1.el6.i686

Doubango configure command line: ./configure --with-ssl=/usr/local --with-srtp 
--with-speexdsp

Doubango configure result:

**************************************************************************
*                               CONGRATULATIONS
**************************************************************************
Cross Compilation:   no
Target OS:           Linux
Host setup:          i686-pc-linux-gnu
Install prefix:      /usr/local
Compiler:            gcc

Enable GPL:          yes
Enable Non Free:     yes

FFmpeg:              no
VP8 video codec:     no
OPUS audio codec:    yes
ILBC audio codec:    no
G.729 audio codec:   no -> yes
GSM audio codec:     no
AMR audio codec:     no -> yes
SPEEX audio codec:   yes
G.722 audio codec:   yes
G.711 audio codec:   yes

YUV:                 no
SPEEX DSP:           yes

SSL:                 yes
DTLS-SRTP:           yes
DTLS:                yes

SRTP:                yes

WebRTC:              Enabled(no): AEC(no), NS(no)

Monotonic timers:    yes
RESOLV:              no

DEBUG:               no

webrtc2sip configure result:

**************************************************************************
                                CONGRATULATIONS
**************************************************************************
Host setup:
Install prefix:              /usr/local/webrtc2sip
Compiler:                    gcc

DOUBANGO
     MIN_VER:                2.0.1089
     TINYSAK:                yes
     TINYNET:                yes
     TINYHTTP:               yes
     TINYSIP:                yes
     TINYDAV:                yes
     TINYSDP:                yes
     TINYSIGCOMP:            yes
     TINYMEDIA:              yes
     TINYMEDIA:              yes
     TINYSMS:                yes
     TINYMSRP:               yes
     TINYRTP:                yes
     TINYIPSEC:              yes

LIBXML2_INCLUDE:             /usr/include/libxml2
LIBXML2_LIB:                 /usr/lib

LIBPTHREAD_INCLUDE:          /usr/include
LIBPTHREAD_LIB:              /usr/lib

Best regards,
Fabrizio

Original issue reported on code.google.com by f.ammo...@gmail.com on 13 Jun 2014 at 7:58

GoogleCodeExporter commented 9 years ago
Updated: I managed to avoid che resampling problem by removing the OPUS codec 
from the list of supported codecs into config.xml, this way G.711a is 
negotiated between the browser and webrct2sip and there are no errors into 
webrtc2sip console, but I am still not able to hear anything.

I captured the (unencrypted) RTP sent from the remote endpoint to webrtc2sip 
and it is OK, but I am unable to debug the payload of the RTP sent from 
webrtc2sip to the browser because it is encrypted.

Could it be to possible to save the RTP stream after decryption within the 
browser using a Javascript API? I tried to find information about this subject 
but I did not find any clear information about it.

Best regards,
Fabrizio

Original comment by f.ammo...@gmail.com on 13 Jun 2014 at 9:41