For Inbound calls user not able to hear voice agent

Hello guys, I am facing issue where voice agent’s voice is not reachable to SBC, while the user’s voice is able to received by voice agent. The problem is recently LiveKit changed their PCAP mechanism and its showing IP’s that are not of SBC and I am not able to properly debug the exact issue. Here’s what I have tried

  1. Checked if firewall has whitelisted the IPs for india region. Configuring firewalls | LiveKit Documentation
  2. The call is able to connect but voice agent’s media is not coming.
  3. I tried to keep my SIP Gateway server in between and tried to connect and it worked but the it increases latency.
  4. I checked SBC PCAP and they are not receiving any RTP packets
  5. I checked Livekit PCAP and its sending packets to local IP and I am not sure if its actully sending to local or just PCAP is shown local IP in destination.
  6. It is occuring for inbound calls i.e call is initiated by the customer and SBC transfers it to Livekit. For outbound calls its working perfectly fine and medias are also being exchanged properly.

NOTE: This is the second telephony provider that we are facing this issue with.

Sharing you the PCAP of LiveKit and TekInfo (Telephony provider) and Transcript screenshot. Both PCAPs are for different test calls.

tekinfo_side_pcap.pcap (210.7 KB)

capture_livekit.pcap (57.2 KB)

Looking at the SDP in the invite from both pcaps that you shared, I see the client address is invalid. The issue is not on the LiveKit side; it is an issue with the s=Asterisk sides configuration that is sending that invite.

=0
o=- 1252703116 1252703116 IN IP4 172.29.148.26
s=Asterisk
c=IN IP4 172.29.148.26.  <- This is not a valid address
t=0 0
m=audio 11288 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

I gave a more indepth answer to the problem you are seeing here:

This doc maybe helpful for you:

But the same setup works when I add my SIP gateway in between. If it were publishing wrong IP it should not work. Right?