Webrtc etxension call has no audio or video after attending call

I have setup a asterisk on openwrt. everything works fine except calls between webrtc extension and sip extension. Asterisk version is 18

here is the output of httpstatus

image

http.conf is as follows

[general]
enabled=yes
bindaddr=0.0.0.0
bindport=8088
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
;tlscertfile=/etc/asterisk/keys/fullchain.pem
;tlsprivatekey=/etc/asterisk/keys/privkey.pem

pjsip.conf is as follows

;=========== General settings ===========
[global]
type=global
user_agent=Asterisk PBX
debug=yes
;externip = 192.168.1.6
;localnet=172.17.0.0/255.255.0.0
nat=yes

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

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

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

;=========== Extension 300 ===========
[300]
type=endpoint
context=from-internal
disallow=all
allow=alaw,ulaw
allow=h264,vp8
auth=300
aors=300
callerid=300
identify_by=username,auth_username
;media_address=192.168.1.6

[300]
type=auth
auth_type=userpass
password=300
username=300

[300]
type=aor
max_contacts=1

[400]
type=aor
max_contacts=5
remove_existing=yes
  
[400]
type=auth
auth_type=userpass
username=400
password=400

[400]
type=endpoint
aors=400
auth=400
callerid=400
dtls_auto_generate_cert=yes
webrtc=yes
; Setting webrtc=yes is a shortcut for setting the following options:
use_avpf=yes
; media_encryption=dtls
; dtls_verify=fingerprint
; dtls_setup=actpass
; ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes
context=from-internal
disallow=all
allow=alaw,ulaw
allow=h264,vp8
identify_by=username,auth_username

[500]
type=aor
max_contacts=5
remove_existing=yes
  
[500]
type=auth
auth_type=userpass
username=500
password=500

[500]
type=endpoint
aors=500
auth=500
callerid=500
dtls_auto_generate_cert=yes
webrtc=yes
; Setting webrtc=yes is a shortcut for setting the following options:
use_avpf=yes
; media_encryption=dtls
; dtls_verify=fingerprint
; dtls_setup=actpass
; ice_support=yes
media_use_received_transport=yes
rtcp_mux=yes
context=from-internal
disallow=all
allow=alaw,ulaw
allow=h264,vp8
identify_by=username,auth_username


 WebSocket connection from '192.168.1.182:37946' for protocol 'sip' accepted using version '13'
    -- Added contact 'sip:g6410242@192.168.1.182:37946;transport=ws' to AOR '500' with expiration of 600 seconds
  == Endpoint 500 is now Reachable
    -- Executing [300@fullrights:1] Dial("PJSIP/500-00000000", "PJSIP/300/sip:300@192.168.1.184:17824") in new stack
    -- Called PJSIP/300/sip:300@192.168.1.184:17824
    -- PJSIP/300-00000001 is ringing
       > 0x155d730 -- Strict RTP learning after remote address set to: 192.168.1.184:45198
       > 0x1562740 -- Strict RTP learning after remote address set to: 192.168.1.184:21364
    -- PJSIP/300-00000001 answered PJSIP/500-00000000
       > 0x158b970 -- Strict RTP learning after remote address set to: 5.36.210.24:45718
       > 0x157fbe0 -- Strict RTP learning after remote address set to: 5.36.210.24:45718
    -- Channel PJSIP/300-00000001 joined 'simple_bridge' basic-bridge <7882e14c-909e-42c4-91f6-e07dc77a892d>
    -- Channel PJSIP/500-00000000 joined 'simple_bridge' basic-bridge <7882e14c-909e-42c4-91f6-e07dc77a892d>
       > 0x158b970 -- Strict RTP learning after remote address set to: 192.168.1.182:45718
       > 0x157fbe0 -- Strict RTP learning after ICE completion
       > 0x158b970 -- Strict RTP learning after remote address set to: 192.168.1.182:45718
       > 0x157fbe0 -- Strict RTP learning after remote address set to: 192.168.1.182:45718
       > 0x155d730 -- Strict RTP switching to RTP target address 192.168.1.184:45198 as source
       > 0x1562740 -- Strict RTP switching to RTP target address 192.168.1.184:21364 as source
       > 0x155d730 -- Strict RTP learning complete - Locking on source address 192.168.1.184:45198
       > 0x1562740 -- Strict RTP learning complete - Locking on source address 192.168.1.184:21364
    -- Channel PJSIP/300-00000001 left 'simple_bridge' basic-bridge <7882e14c-909e-42c4-91f6-e07dc77a892d>
    -- Channel PJSIP/500-00000000 left 'simple_bridge' basic-bridge <7882e14c-909e-42c4-91f6-e07dc77a892d>
  == Spawn extension (fullrights, 300, 1) exited non-zero on 'PJSIP/500-00000000'
    -- Executing [300@fullrights:1] Dial("PJSIP/500-00000002", "PJSIP/300/sip:300@192.168.1.184:17824") in new stack
    -- Called PJSIP/300/sip:300@192.168.1.184:17824
    -- PJSIP/300-00000003 is ringing
       > 0x13fcf10 -- Strict RTP learning after remote address set to: 192.168.1.184:22554
    -- PJSIP/300-00000003 answered PJSIP/500-00000002
       > 0x155d520 -- Strict RTP learning after remote address set to: 5.36.210.24:50974
    -- Channel PJSIP/300-00000003 joined 'simple_bridge' basic-bridge <10012695-3d60-498c-837d-e513f6299e6f>
    -- Channel PJSIP/500-00000002 joined 'simple_bridge' basic-bridge <10012695-3d60-498c-837d-e513f6299e6f>
       > 0x155d520 -- Strict RTP learning after ICE completion
       > 0x155d520 -- Strict RTP learning after remote address set to: 192.168.1.182:50974
       > 0x13fcf10 -- Strict RTP switching to RTP target address 192.168.1.184:22554 as source
       > 0x13fcf10 -- Strict RTP learning complete - Locking on source address 192.168.1.184:22554
    -- Channel PJSIP/300-00000003 left 'simple_bridge' basic-bridge <10012695-3d60-498c-837d-e513f6299e6f>
    -- Channel PJSIP/500-00000002 left 'simple_bridge' basic-bridge <10012695-3d60-498c-837d-e513f6299e6f>
  == Spawn extension (fullrights, 300, 1) exited non-zero on 'PJSIP/500-00000002'

The call arrives and when I pick it up there is no audio and no video .

When I dial from webrtc to webrtc client 400-500 even then it doesnt work properly, No audi video

Based on the error DTLS failed to negotiate for some reason, why that is I do not know (haven’t seen that before - could certainly be due to you using openwrt). DTLS is required for WebRTC and without it won’t work.

I am using IP address ro access the asterisk server and havent setup any tls key’s. Will that be an issue ?

For DTLS? No. Asterisk if configured to do so (which if I recall the webrtc option does) will generate keys for the DTLS part itself.

what is the location of those keys?

Nowhere. They’re generated in memory for each call.

Ok! So I found out that the asterisk websockets pacakage in OPenwrt was auto selecting libopenssl but it didnt select enable DTLS in its configuartion. After enabling DTLS and compiling I don’t see the DTLS errors.

Still I got errors mentioning the STUN permisison issue.

Here is my configuration

When I dial from 500 to 400 , there is no video at 400 but 500 can get video.

Connected to Asterisk 18.5.1 currently running on SHAULA-001 (pid = 4900)
  == WebSocket connection from '192.168.1.183:55786' for protocol 'sip' accepted using version '13'
    -- Added contact 'sip:b5468908@192.168.1.183:55786;transport=ws' to AOR '500' with expiration of 600 seconds
  == Endpoint 500 is now Reachable
  == WebSocket connection from '192.168.1.184:46666' for protocol 'sip' accepted using version '13'
    -- Added contact 'sip:453475i8@192.168.1.184:46666;transport=ws' to AOR '400' with expiration of 600 seconds
  == Endpoint 400 is now Reachable
    -- Executing [500@from-internal:1] Dial("PJSIP/400-00000000", "PJSIP/500") in new stack
    -- Called PJSIP/500
    -- PJSIP/500-00000001 is ringing
       > 0x17caab0 -- Strict RTP learning after remote address set to: 5.36.200.129:15115
[Mar 10 23:41:55] ERROR[4932]: pjproject: <?>: 	icess0xb4c4c02 ......Error sending STUN request: Permission denied
       > 0x17d5850 -- Strict RTP learning after remote address set to: 5.36.200.129:15115
    -- PJSIP/500-00000001 answered PJSIP/400-00000000
       > 0x17f0440 -- Strict RTP learning after remote address set to: 5.36.200.129:43690
       > 0x17c2e60 -- Strict RTP learning after remote address set to: 5.36.200.129:43690
[Mar 10 23:41:55] ERROR[4932]: pjproject: <?>: 	icess0xb68c902 ...Error sending STUN request: Permission denied
    -- Channel PJSIP/500-00000001 joined 'simple_bridge' basic-bridge <24145dc0-20ca-4fca-9bf5-06009b48e566>
    -- Channel PJSIP/400-00000000 joined 'simple_bridge' basic-bridge <24145dc0-20ca-4fca-9bf5-06009b48e566>
       > 0x17d5850 -- Strict RTP learning after remote address set to: 192.168.1.183:38891
       > 0x17caab0 -- Strict RTP learning after ICE completion
       > 0x17d5850 -- Strict RTP learning after remote address set to: 192.168.1.183:38891
       > 0x17caab0 -- Strict RTP learning after remote address set to: 192.168.1.183:38891
[Mar 10 23:41:55] ERROR[4942]: pjproject: <?>: 	icess0xb68c902 ..Error sending STUN request: Permission denied
[Mar 10 23:41:55] ERROR[4942]: pjproject: <?>: 	icess0xb68c902 ..Error sending STUN request: Permission denied
[Mar 10 23:41:55] ERROR[4942]: pjproject: <?>: 	icess0xb68c902 ..Error sending STUN request: Permission denied
       > 0x17f0440 -- Strict RTP learning after remote address set to: 192.168.1.184:43690
       > 0x17c2e60 -- Strict RTP learning after ICE completion
       > 0x17f0440 -- Strict RTP learning after remote address set to: 192.168.1.184:43690
       > 0x17c2e60 -- Strict RTP learning after remote address set to: 192.168.1.184:43690
       > 0x17c2e60 -- Strict RTP switching to RTP target address 192.168.1.184:43690 as source
       > 0x17d5850 -- Strict RTP switching to RTP target address 192.168.1.183:38891 as source
       > 0x17caab0 -- Strict RTP switching to RTP target address 192.168.1.183:38891 as source
       > 0x17d5850 -- Strict RTP learning complete - Locking on source address 192.168.1.183:38891
       > 0x17caab0 -- Strict RTP learning complete - Locking on source address 192.168.1.183:38891
       > 0x17c2e60 -- Strict RTP learning complete - Locking on source address 192.168.1.184:43690
    -- Channel PJSIP/400-00000000 left 'simple_bridge' basic-bridge <24145dc0-20ca-4fca-9bf5-06009b48e566>
  == Spawn extension (from-internal, 500, 1) exited non-zero on 'PJSIP/400-00000000'
    -- Channel PJSIP/500-00000001 left 'simple_bridge' basic-bridge <24145dc0-20ca-4fca-9bf5-06009b48e566>
    -- Executing [400@from-internal:1] Dial("PJSIP/500-00000002", "PJSIP/400") in new stack
    -- Called PJSIP/400
    -- PJSIP/400-00000003 is ringing

But when 400 calls 500 all is OK. Both the calls are from within the local network so far and I havent started testing calling to or from extrenal network yet

The call below is All OK

Executing [400@from-internal:1] Dial("PJSIP/500-00000002", "PJSIP/400") in new stack
    -- Called PJSIP/400
    -- PJSIP/400-00000003 is ringing
       > 0x22ee550 -- Strict RTP learning after remote address set to: 5.36.200.129:46693
[Mar 10 23:46:09] ERROR[3287]: pjproject: <?>: 	icess0xb4cce02 ......Error sending STUN request: Permission denied
       > 0x22dfff0 -- Strict RTP learning after remote address set to: 5.36.200.129:46693
    -- PJSIP/400-00000003 answered PJSIP/500-00000002
       > 0x22d7110 -- Strict RTP learning after remote address set to: 5.36.200.129:49501
       > 0x224aaa0 -- Strict RTP learning after remote address set to: 5.36.200.129:49501
[Mar 10 23:46:09] ERROR[3287]: pjproject: <?>: 	icess0xb4fa602 ...Error sending STUN request: Permission denied
    -- Channel PJSIP/400-00000003 joined 'simple_bridge' basic-bridge <2474088b-7f75-44a0-b9ef-b1dd37e5c11b>
    -- Channel PJSIP/500-00000002 joined 'simple_bridge' basic-bridge <2474088b-7f75-44a0-b9ef-b1dd37e5c11b>
       > 0x22dfff0 -- Strict RTP learning after remote address set to: 192.168.1.184:46693
       > 0x22ee550 -- Strict RTP learning after ICE completion
       > 0x22dfff0 -- Strict RTP learning after remote address set to: 192.168.1.184:46693
       > 0x22ee550 -- Strict RTP learning after remote address set to: 192.168.1.184:46693
[Mar 10 23:46:09] ERROR[2246]: pjproject: <?>: 	icess0xb4fa602 ..Error sending STUN request: Permission denied
[Mar 10 23:46:09] ERROR[2246]: pjproject: <?>: 	icess0xb4fa602 ..Error sending STUN request: Permission denied
[Mar 10 23:46:09] ERROR[2246]: pjproject: <?>: 	icess0xb4fa602 ..Error sending STUN request: Permission denied
       > 0x22d7110 -- Strict RTP learning after remote address set to: 192.168.1.183:49501
       > 0x224aaa0 -- Strict RTP learning after ICE completion
[Mar 10 23:46:09] ERROR[2246]: pjproject: <?>: 	icess0xb4fa602 ..Error sending STUN request: Permission denied
       > 0x22d7110 -- Strict RTP learning after remote address set to: 192.168.1.183:49501
       > 0x224aaa0 -- Strict RTP learning after remote address set to: 192.168.1.183:49501
       > 0x224aaa0 -- Strict RTP switching to RTP target address 192.168.1.183:49501 as source
       > 0x22d7110 -- Strict RTP switching to RTP target address 192.168.1.183:49501 as source
       > 0x22dfff0 -- Strict RTP switching to RTP target address 192.168.1.184:46693 as source
       > 0x22ee550 -- Strict RTP switching to RTP target address 192.168.1.184:46693 as source
       > 0x22dfff0 -- Strict RTP learning complete - Locking on source address 192.168.1.184:46693
       > 0x22ee550 -- Strict RTP learning complete - Locking on source address 192.168.1.184:46693
       > 0x22d7110 -- Strict RTP learning complete - Locking on source address 192.168.1.183:49501
       > 0x224aaa0 -- Strict RTP learning complete - Locking on source address 192.168.1.183:49501
    -- Channel PJSIP/400-00000003 left 'simple_bridge' basic-bridge <2474088b-7f75-44a0-b9ef-b1dd37e5c11b>
    -- Channel PJSIP/500-00000002 left 'simple_bridge' basic-bridge <2474088b-7f75-44a0-b9ef-b1dd37e5c11b>
  == Spawn extension (from-internal, 400, 1) exited non-zero on 'PJSIP/500-00000002'

I don’t know anything further, that doesn’t happen on other systems.

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