Asterisk-18 Connection established but no audio

I’m trying to make a call between 2 Linphone instances. The call was successfully established but there was no audio. Here are my pjsip config:

[transport-udp]
type=transport
protocol=udp    ;udp,tcp,tls,ws,wss,flow
bind=0.0.0.0

[alice]
type=endpoint
context=office-phones
disallow=all
allow=ulaw
allow=t140
auth=alice-auth
aors=alice
rtp_symmetric=yes
direct_media=no
force_rport=yes
rewrite_contact=yes
ice_support=yes
use_avpf=no
force_avp=yes
trust_id_inbound=yes
media_use_received_transport=yes

[alice-auth]
type=auth
auth_type=userpass
username=alice
password=secret123

[alice]
type=aor
max_contacts=3


[bob]
type=endpoint
context=office-phones
disallow=all
allow=ulaw
allow=t140
auth=bob-auth
aors=bob
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
ice_support=yes
direct_media=no
use_avpf=no
force_avp=yes
trust_id_inbound=yes
media_use_received_transport=yes

[bob-auth]
type=auth
auth_type=userpass
username=bob
password=secret123

[bob]
type=aor
max_contacts=3

Any help would be much appreciated! Thank you!

Open the firewall to the RTP port range.

Hi thanks for your reply. But now i have a new problem. I couldn’t receive calls anymore. I could only make calls. The logs mark this as ‘no_answer’. What ports is used to receive call? How can I troubleshoot this?

You might want to try commenting out ‘media_use_received_transport=yes’ or set it to ‘no’.

I’m pretty sure that No Answer is a higher level message than would be produced by a failure in the SIP communication. However, you need to enable the protocol logs (google: asterisk wiki debug, for details).

Also, the exact text of the error message, is normally very useful.

Hi,
Here is what i gave me when i tried to dial from alice to bob

the softphone didn’t receive the call and so i couldn’t pick up…
Also I notice that port 5060 is not open:

If you don’t want NO ANSWER in 20 seconds, remove the 20 from the Dial application call. Note that 20 seconds is shorter than the timeout that would apply at the SIP level, although, if it were timing out at that level, you would get subsequent messages about that.

Also logs are best presented as text,taken from the log files, rather than the screen.

Thank you and sorry for the late response.

I was troubleshooting my dev environment because i had asterisk on docker and it crashed because I opened a large range of port.

But now that was fine. I could make calls now, just couldn’t hear anything… There are no firewall rules that block rtp ports. Please suggest me what else I could do

# Generated by iptables-save v1.8.4 on Tue Feb  2 18:47:57 2021
*filter
:INPUT ACCEPT [1081:227733]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [772:186777]
:DOCKER - [0:0]
:DOCKER-ISOLATION-STAGE-1 - [0:0]
:DOCKER-ISOLATION-STAGE-2 - [0:0]
:DOCKER-USER - [0:0]
-A FORWARD -j DOCKER-USER
-A FORWARD -j DOCKER-ISOLATION-STAGE-1
-A FORWARD -o br-fb1c3d10d4b8 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o br-fb1c3d10d4b8 -j DOCKER
-A FORWARD -i br-fb1c3d10d4b8 ! -o br-fb1c3d10d4b8 -j ACCEPT
-A FORWARD -i br-fb1c3d10d4b8 -o br-fb1c3d10d4b8 -j ACCEPT
-A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o docker0 -j DOCKER
-A FORWARD -i docker0 ! -o docker0 -j ACCEPT
-A FORWARD -i docker0 -o docker0 -j ACCEPT
-A DOCKER-ISOLATION-STAGE-1 -i br-fb1c3d10d4b8 ! -o br-fb1c3d10d4b8 -j DOCKER-ISOLATION-STAGE-2
-A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
-A DOCKER-ISOLATION-STAGE-1 -j RETURN
-A DOCKER-ISOLATION-STAGE-2 -o br-fb1c3d10d4b8 -j DROP
-A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
-A DOCKER-ISOLATION-STAGE-2 -j RETURN
-A DOCKER-USER -j RETURN
COMMIT
# Completed on Tue Feb  2 18:47:57 2021
# Generated by iptables-save v1.8.4 on Tue Feb  2 18:47:57 2021
*nat
:PREROUTING ACCEPT [484:62278]
:INPUT ACCEPT [52:4459]
:OUTPUT ACCEPT [9:584]
:POSTROUTING ACCEPT [9:584]
:DOCKER - [0:0]
-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
-A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
-A POSTROUTING -s 172.18.0.0/16 ! -o br-fb1c3d10d4b8 -j MASQUERADE
-A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
-A DOCKER -i br-fb1c3d10d4b8 -j RETURN
-A DOCKER -i docker0 -j RETURN
COMMIT
# Completed on Tue Feb  2 18:47:57 2021

I got some rtp packets too. But still no audio

RTP Packet Debugging Enabled
    -- Executing [6001@office-phones:1] Dial("PJSIP/bob-00000002", "PJSIP/alice") in new stack
    -- Called PJSIP/alice
    -- PJSIP/alice-00000003 is ringing
       > 0x7fb9ac059620 -- Strict RTP learning after remote address set to: 193.40.241.18:39357
       > 0x7fb9ac059620 -- Strict RTP switching to RTP target address 193.40.241.18:39357 as source
Got  RTP packet from    193.40.241.18:39357 (type 95, seq 056333, ts 1827893439, len 000001)
Got  RTP packet from    193.40.241.18:39357 (type 00, seq 056334, ts 1827893439, len 000160)
    -- PJSIP/alice-00000003 answered PJSIP/bob-00000002
       > 0x7fb9ac030ab0 -- Strict RTP learning after remote address set to: 193.40.241.24:56770
    -- Channel PJSIP/alice-00000003 joined 'simple_bridge' basic-bridge <6f90bdc2-5c2b-4f9b-8523-c94287b15efd>
    -- Channel PJSIP/bob-00000002 joined 'simple_bridge' basic-bridge <6f90bdc2-5c2b-4f9b-8523-c94287b15efd>
       > Bridge 6f90bdc2-5c2b-4f9b-8523-c94287b15efd: switching from simple_bridge technology to native_rtp
       > Remotely bridged 'PJSIP/bob-00000002' and 'PJSIP/alice-00000003' - media will flow directly between them
Got  RTP packet from    193.40.241.18:39357 (type 00, seq 056335, ts 1827893599, len 000160)
Sent RTP packet to      193.40.241.24:56770 (type 00, seq 009705, ts 1827893592, len 000160)
       > 0x7fb9ac030ab0 -- Strict RTP switching to RTP target address 193.40.241.24:56770 as source
Got  RTP packet from    193.40.241.24:56770 (type 95, seq 028763, ts 2344108388, len 000001)
    -- Channel PJSIP/bob-00000002 left 'native_rtp' basic-bridge <6f90bdc2-5c2b-4f9b-8523-c94287b15efd>
    -- Channel PJSIP/alice-00000003 left 'native_rtp' basic-bridge <6f90bdc2-5c2b-4f9b-8523-c94287b15efd>
  == Spawn extension (office-phones, 6001, 1) exited non-zero on 'PJSIP/bob-00000002'

Everything is fine now… it’s because i commented out this ice_support=true. I’m so glad to hear my own voice lol

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