WEBRTC no audio

Hello there !

I’m trying to use WEBRTC with SIPJS and Asterisk (Asterisk GIT-16-89cf7899be) . It works very well with Chrome version ~50. Since I’m using chrome 96 on Android 10 audio seems not working at all…

Maybe codecs change?

This is my PJSIP configuration:

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0:5060

[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0

[transport-ws]
type=transport
protocol=ws
bind=0.0.0.0

[1000]
type=aor
max_contacts=20
default_expiration=90400
minimum_expiration=86400
maximum_expiration=100000
[auth1000]
type=auth
auth_type=userpass
username=1000
password=1000 

[1000]
type=endpoint
aors=1000
auth=auth1000
webrtc=yes
context=default
disallow=all
allow=ulaw

[998]
type=endpoint
context=default
allow=opus,alaw,ulaw,gsm,vp8,h264
dtls_auto_generate_cert=yes 
webrtc=yes
auth=auth998
aors=998
 
[auth998]
type=auth
auth_type=userpass
password=998
username=998
 
[998]
type=aor
max_contacts=10
default_expiration=90400
minimum_expiration=86400
maximum_expiration=100000


[999]
type=endpoint
context=default
allow=opus,alaw,ulaw,gsm,vp8,h264
dtls_auto_generate_cert=yes 
webrtc=yes
auth=auth999
aors=999
 
[auth999]
type=auth
auth_type=userpass
password=999
username=999
 
[999]
type=aor
max_contacts=10
default_expiration=90400
minimum_expiration=86400
maximum_expiration=100000

my RTP configuration

[general]
rtpstart=10000
rtpend=20000

My codecs

Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID TYPE  NAME         FORMAT           DESCRIPTION
------------------------------------------------------------------------------------------------
      31 image png          png              (PNG Image)
       6 audio g726         g726             (G.726 RFC3551)
       4 audio alaw         alaw             (G.711 a-law)
       2 audio g723         g723             (G.723.1)
      20 audio speex        speex            (SpeeX)
      21 audio speex        speex16          (SpeeX 16khz)
      22 audio speex        speex32          (SpeeX 32khz)
      24 audio g722         g722             (G722)
      25 audio siren7       siren7           (ITU G.722.1 (Siren7, licensed from Polycom))
      32 video h261         h261             (H.261 video)
      33 video h263         h263             (H.263 video)
       8 audio adpcm        adpcm            (Dialogic ADPCM)
      36 video h265         h265             (H.265 video)
      44 audio silk         silk8            (SILK Codec (8 KHz))
      45 audio silk         silk12           (SILK Codec (12 KHz))
      46 audio silk         silk16           (SILK Codec (16 KHz))
      47 audio silk         silk24           (SILK Codec (24 KHz))
      28 audio g719         g719             (ITU G.719)
      34 video h263p        h263p            (H.263+ video)
      35 video h264         h264             (H.264 video)
      19 audio g729         g729             (G.729A)
       9 audio slin         slin             (16 bit Signed Linear PCM)
      10 audio slin         slin12           (16 bit Signed Linear PCM (12kHz))
      11 audio slin         slin16           (16 bit Signed Linear PCM (16kHz))
      12 audio slin         slin24           (16 bit Signed Linear PCM (24kHz))
      13 audio slin         slin32           (16 bit Signed Linear PCM (32kHz))
      14 audio slin         slin44           (16 bit Signed Linear PCM (44kHz))
      15 audio slin         slin48           (16 bit Signed Linear PCM (48kHz))
      16 audio slin         slin96           (16 bit Signed Linear PCM (96kHz))
      17 audio slin         slin192          (16 bit Signed Linear PCM (192kHz))
       3 audio ulaw         ulaw             (G.711 u-law)
      18 audio lpc10        lpc10            (LPC10)
      27 audio testlaw      testlaw          (G.711 test-law)
      43 audio none         none             (<Null> codec)
      42 image t38          t38              (T.38 UDPTL Fax)
      39 video vp9          vp9              (VP9 video)
      38 video vp8          vp8              (VP8 video)
       5 audio gsm          gsm              (GSM)
      37 video mpeg4        mpeg4            (MPEG4 video)
      23 audio ilbc         ilbc             (iLBC)
      40 text  red          red              (T.140 Realtime Text with redundancy)
      41 text  t140         t140             (Passthrough T.140 Realtime Text)
      29 audio opus         opus             (Opus Codec)
      30 image jpeg         jpeg             (JPEG image)
       7 audio g726aal2     g726aal2         (G.726 AAL2)
       1 audio codec2       codec2           (Codec 2)
      26 audio siren14      siren14          (ITU G.722.1 Annex C, (Siren14, licensed from Polycom))

This is Asterisk console log output during a call (998 → 999):

Executing [999@default:1] NoOp("PJSIP/998-0000000a", "999") in new stack
Executing [999@default:2] Dial("PJSIP/998-0000000a", "PJSIP/999,60") in new stack
    -- Called PJSIP/999
PJSIP/999-0000000b is ringing
PJSIP/999-0000000b is ringing
PJSIP/999-0000000b answered PJSIP/998-0000000a
       > 0x7f9860016b70 -- Strict RTP learning after remote address set to: 194.xxx.xxx.xxx:44383
       > 0x7f9860041470 -- Strict RTP learning after remote address set to: 213.xxx.xxx.xxx:58960
Channel PJSIP/999-0000000b joined 'simple_bridge' basic-bridge <2ef1f491-49dd-4fc8-b06f-6a01760baebb>
    -- Channel PJSIP/998-0000000a joined 'simple_bridge' basic-bridge <2ef1f491-49dd-4fc8-b06f-6a01760baebb>
        > 0x7f9860016b70 -- Strict RTP learning after ICE completion
        > 0x7f9860041470 -- Strict RTP learning after ICE completion
  -- Channel PJSIP/999-0000000b left 'simple_bridge' basic-bridge <2ef1f491-49dd-4fc8-b06f-6a01760baebb>
 -- Channel PJSIP/998-0000000a left

I’m not able to see any problem from SIPJS (javascript console). There is just no soud :frowning:

Can someone help me with this issue ?

Is your app hosted on a public server with a valid Domain and HTTPS enabled?

I would try ‘disallow=all’ before ‘allow=…’ under 998 and 999.
Also I would limit the codecs to one (ulaw) for initial testing then add others afterward.
Hope this helps…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.