Asterisk 16.19.1 & WebRTC(with JsSIP 3.8.0) = No Audio

Hello there,

I have just tried our fist webrtc test with Asterisk 16.19.1 + JsSIP 3.8.0
The endpoints get registered well and it’s able to send calls without problems but without audio.

Transport

[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0
local_net=192.168.1.23/24
external_media_address=211.37.146.88
external_signaling_address=211.37.146.88
allow_reload=yes
symmetric_transport=no

Endpoint

bcs16*CLI> pjsip show endpoint 7000

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  7000                                                 Not in use    0 of inf
     InAuth:  7000/7000
        Aor:  7000                                               1
      Contact:  7000/sip:7000@110.12.31.212:52195;transpor 3b1ec81810 Avail        12.972
  Transport:  transport-wss             wss      0      0  0.0.0.0:5060


 ParameterName                      : ParameterValue
 ==========================================================================
 100rel                             : yes
 accept_multiple_sdp_answers        : false
 accountcode                        : 7000
 acl                                : 
 aggregate_mwi                      : true
 allow                              : (alaw|ulaw|opus)
 allow_overlap                      : true
 allow_subscribe                    : true
 allow_transfer                     : true
 allow_unauthenticated_options      : false
 aors                               : 7000
 asymmetric_rtp_codec               : false
 auth                               : 7000
 bind_rtp_to_media_address          : false
 bundle                             : true
 call_group                         : 1
 callerid                           : <unknown>
 callerid_privacy                   : allowed_not_screened
 callerid_tag                       : 
 connected_line_method              : invite
 contact_acl                        : 
 context                            : outbound
 cos_audio                          : 0
 cos_video                          : 0
 device_state_busy_at               : 0
 direct_media                       : false
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_auto_generate_cert            : No
 dtls_ca_file                       : /etc/asterisk/letsencrypt/cert.pem
 dtls_ca_path                       : 
 dtls_cert_file                     : /etc/asterisk/letsencrypt/cert.pem
 dtls_cipher                        : 
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   : /etc/asterisk/letsencrypt/privkey.pem
 dtls_rekey                         : 0
 dtls_setup                         : actpass
 dtls_verify                        : Yes
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 fax_detect_timeout                 : 0
 follow_early_media_fork            : true
 force_avp                          : false
 force_rport                        : true
 from_domain                        : 
 from_user                          : 
 g726_non_standard                  : false
 ice_support                        : true
 identify_by                        : username,ip
 ignore_183_without_sdp             : false
 inband_progress                    : false
 incoming_mwi_mailbox               : 
 language                           : 
 mailboxes                          : 
 max_audio_streams                  : 1
 max_video_streams                  : 1
 media_address                      : 
 media_encryption                   : dtls
 media_encryption_optimistic        : false
 media_use_received_transport       : true
 message_context                    : 
 moh_passthrough                    : false
 moh_suggest                        : default
 mwi_from_user                      : 
 mwi_subscribe_replaces_unsolicited : no
 named_call_group                   : 
 named_pickup_group                 : 
 notify_early_inuse_ringing         : false
 one_touch_recording                : false
 outbound_auth                      : 
 outbound_proxy                     : 
 pickup_group                       : 1
 preferred_codec_only               : false
 record_off_feature                 : automixmon
 record_on_feature                  : automixmon
 refer_blind_progress               : true
 rewrite_contact                    : true
 rpid_immediate                     : false
 rtcp_mux                           : true
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : true
 rtp_timeout                        : 0
 rtp_timeout_hold                   : 0
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_connected_line                : yes
 send_diversion                     : true
 send_history_info                  : false
 send_pai                           : false
 send_rpid                          : false
 set_var                            : 
 srtp_tag_32                        : false
 stir_shaken                        : false
 sub_min_expiry                     : 0
 subscribe_context                  : 
 suppress_q850_reason_headers       : false
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          : 
 tos_audio                          : 0
 tos_video                          : 0
 transport                          : transport-wss
 trust_connected_line               : yes
 trust_id_inbound                   : false
 trust_id_outbound                  : false
 use_avpf                           : true
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                : 
 webrtc                             : yes

bcs16*CLI>

DialPlan

exten => _01040230022,1,Noop(-- ${EXTEN} --)
same  => n,Answer
same  => n,Playback(vm-intro)
same  => n,Hangup

This is the Asterisk CLI:

  == WebSocket connection from '110.12.31.212:55771' for protocol 'sip' accepted using version '13'
    -- Added contact 'sip:7000@110.12.31.212:55771;transport=ws' to AOR '7000' with expiration of 600 seconds
  == Endpoint 7000 is now Reachable
    -- Contact 7000/sip:7000@110.12.31.212:55771;transport=ws is now Reachable.  RTT: 9.814 msec
  == DTLS ECDH initialized (automatic), faster PFS enabled
    -- Executing [01040230022@outbound:1] NoOp("PJSIP/7000-00000004", "-- 01040230022 --") in new stack
    -- Executing [01040230022@outbound:2] Answer("PJSIP/7000-00000004", "") in new stack
       > 0x7f713800ed20 -- Strict RTP learning after remote address set to: 110.12.31.212:54335
    -- Executing [01040230022@outbound:3] Playback("PJSIP/7000-00000004", "vm-intro") in new stack
    -- <PJSIP/7000-00000004> Playing 'vm-intro.gsm' (language 'en')
    -- Executing [01040230022@outbound:4] Hangup("PJSIP/7000-00000004", "") in new stack
  == Spawn extension (outbound, 01040230022, 4) exited non-zero on 'PJSIP/7000-00000004'
    -- Executing [h@outbound:1] NoOp("PJSIP/7000-00000004", "CHANNEL=PJSIP/7000-00000004") in new stack
    -- Executing [h@outbound:2] NoOp("PJSIP/7000-00000004", "CALLER="7000" <7000>") in new stack
bcs16*CLI> 

RTP debug

bcs16*CLI> rtp set debug on
RTP Packet Debugging Enabled
  == DTLS ECDH initialized (automatic), faster PFS enabled
    -- Executing [01040230022@outbound:1] NoOp("PJSIP/7000-00000001", "-- 01040230022 --") in new stack
    -- Executing [01040230022@outbound:2] Answer("PJSIP/7000-00000001", "") in new stack
       > 0x7fca500360d0 -- Strict RTP learning after remote address set to: 110.12.31.212:54486
    -- Executing [01040230022@outbound:3] Playback("PJSIP/7000-00000001", "vm-intro") in new stack
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003067, ts 000160, len 000160)
    -- <PJSIP/7000-00000001> Playing 'vm-intro.gsm' (language 'en')
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003068, ts 000320, len 000160)
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003069, ts 000480, len 000160)
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003070, ts 000640, len 000160)
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003071, ts 000800, len 000160)
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003072, ts 000960, len 000160)
Sent RTP packet to      110.12.31.212:54486 (type 08, seq 003073, ts 001120, len 000160)
...

I checked RTP Packet on my laptop with wireshark. but i can’t see a rtp

What about pcap on modem/router? do you see RTP in this ?

it’s not possible. so I request my friend to execute WebRTC at tryit.jssip.net.
but It’s same.
(The endpoints get registered well and it’s able to send calls without problems but without audio.)

If Asterisk is behind NAT the you need to configure rtp.conf, specifically the ice_host_candidates section, so that the external IP address is placed as a host candidate. You also need to ensure that the RTP ports are forwarded.

1 Like

Please check the module res_srtp.so working properly.
I faced the same issue and fixed it by compiling this module manually on Centos 7.

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