I’m setting up Asterisk to work with web clients (sipML js library) and native softphone clients. The problem is calling a web client , in which case I can’t hear anything (in any direction). If a web client calls a native client, everything is ok.
Web Client Configuration
The configuration of a web client is as follows (I’m using realtime, so the configuration is in a table, so I’m reporting column_name: value
, without using the .conf syntax):
Table ps_aors:
id: 503 max_contacts: 1 remove_existing: yes
Table ps_auths:
id: 503 auth_type: userpass password: ******* username: 503
Table ps_endpoints:
id: 503 transport: wss-transport aors: 503 auth: 503 context: default disallow: all allow: ulaw, opus direct_media: no ice_support: yes identify_by: username use_avpf: yes media_encryption: dtls dtls_verify: fingerprint dtls_setup: actpass media_use_received_transport: yes rtcp_mux: yes dtls_auto_generate_cert: yes
Native Client Configuration
The configuration of a native client is as follows:
Table ps_aors:
id: 500 max_contacts: 1 remove_existing: yes
Table ps_auths:
id: 500 auth_type: userpass password: ******* username: 500
Table ps_endpoints:
id: 500 transport: transport-udp aors: 500 auth: 500 context: default disallow: all allow: ulaw, opus direct_media: no ice_support: yes dtls_auto_generate_cert: no
The two transports in pjsip.conf
are:
[transport-udp] type=transport protocol=udp bind=0.0.0.0
[wss-transport] type=transport protocol=wss bind=0.0.0.0
My Hypothesis
I think the problem is with ICE support. I activated SIP and RTP debug on Asterisk, and when 500 (native) calls 503 (web) I don’t see the (via ICE)
message, while it is there if 503 calls 500. I’m reporting the bug traces below; they are from two different calls, I hope that’s ok.
SIP debug trace for call 500 -> 503
RTP debug trace for call 500 -> 503
... Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011030, ts 067040, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011031, ts 067200, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006845, ts 067360, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011032, ts 067360, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006846, ts 067520, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011033, ts 067520, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006847, ts 067680, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011034, ts 067680, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006848, ts 067840, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011035, ts 067840, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006849, ts 068000, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006850, ts 068160, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011036, ts 068000, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011037, ts 068160, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006851, ts 068320, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011038, ts 068320, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006852, ts 068480, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011039, ts 068480, len 000160) Got RTP packet from 10.20.67.50:4022 (type 00, seq 006853, ts 068640, len 000160) Sent RTP packet to 10.20.102.93:48976 (type 00, seq 011040, ts 068640, len 000160) ...