Hello team, If there is a dialer that supports se...
# telephony
p
Hello team, If there is a dialer that supports sending SIP and media data over SIPS. How can we enable that for the inbound trunk in LiveKit? Is this through -
SIPMediaEncryption
in the SIP Inbound Trunk request - https://docs.livekit.io/sip/api/#sipmediaencryption? How can we exchange certificates between the dialer and LiveKit for SIPS? I am seeking some clarity here, would appreciate if someone can help answer. Apologies if the questions are unclear a bit.
@magnificent-art-43333 @refined-appointment-81829 - would appreciate your help here
r
You can enable TLS and/or media encryption in the trunk setup UI.
The TLS part for inbound is set on the provider side.
p
@refined-appointment-81829 - I tried enabling Media encryption for Twilio Secure Trunking. But it did not go through. The call would connect but the voice from the AI agent wouldn't go through in the call to Twilio and the data of the user was also not being received on the AI Agent side.
r
Works fine if you turn off media encryption?
p
Yes - it works fine if I turn off media encryption and disable the secure trunking of twilio
r
you have a call id that failed it will start with
SCL_
p
Will get the call Id
@refined-appointment-81829 - I was setting up this again from Scratch. I have a Linphone that I am making the calls from to LiveKit. As the first step I want to get the call working without the TLS or media encryption. I started the call from Linphone to a sip address that I have registered as inbound trunk on LiveKit.
sip:<number>@livekit-project-sip-address
I am able to see the call being connected on the AI agent side when I make the call from Linphone but the linphone stays in beeping sound state. I have attached the linphone logs where it shows the phone is in ringing state and livekit does not send 200 ACK as the response. Can you pls help check? Then I will proceed to test the TLS or encryption once this is working
On the LiveKit project console I see the
media timeout error
for the linphone call I made. CallID - https://cloud.livekit.io/projects/p_4sen7zyruwn/telephony/SCL_vHxuQxotkYs5/inbound
@refined-appointment-81829 - would appreciate your help here
r
So this is failing before enabling TLS or media encryption?
p
I want to tet the media encryption. But I am unable to test using Linphone in the first case to dial the sip uri and run the test call
r
What do you see in PCAP for the call?
Sounds like something is wrong the the media streaming setup in Linphone
p
I have added the logs from linphone above. I am getting media timeout error on LiveKit dashboard. Do you have any settings that I can replicate on linphone and try this pls?
r
I've never used linphone so not sure how to set it up
Can you get a PCAP?
So you are currently setup to use UDP?
Based on the call in LiveKit dashboard you shared: The media timeout suggests that the SIP participant wasn't sending media properly. This could be due to: • Network connectivity issues between the SIP endpoint and LiveKit • Firewall blocking RTP media packets • NAT traversal problems • SIP endpoint not properly handling the media negotiation
p
Can you get a PCAP?
Ok let me check and get back
So you are currently setup to use UDP?
Yes
@refined-appointment-81829 - Here is the pcap file I tried capturing on my local system
Can you pls help check what happened to these call Ids on the livekit side if the PCAP file I shared above is not much help 1. SCL_YNQLANj2bH45 2. SCL_kVatChxD4HfD
@refined-appointment-81829 - did you get a chance to check this?
p
Any way for me to debug this further?
r
I am not familiar with linphone so not exactly sure how to troubleshot from that client. I've always had good luck using Wireshark for debugging SIP related issues. Maybe try running linphone from a different network? Is it's ports/IP publicly accessible from the internet? I assume it is publishing some private IP or something that is not accessible from the Internet and that is likely the root cause. But I guess that is just a long way of saying same thing as my previous message. Also, I don't really understand a usecase for why someone would use linphone.
p
I am running linphone from my laptop. So the ports and IP addresses are accessible from the internet. Did you get a chance to check the PCAP file I sent above. I am unable to make sure why the RTP data is not coming in from livekit to linphone and the 180 Ringing continues and 200 ACK is not received to linphone
r
> I am running linphone from my laptop. So the ports and IP addresses are accessible from the internet. I think you have a typo there. I think you meant "are not accessible from the internet" since I assume your laptop is on a NAT and behind a firewall.
p
I am not behind a NAT or Firewall. I am using my laptop normally using a Wifi, tried even with my mobile hotspot and switching to a different network. Still the same issue
r
What is your computers current IP address?
From the PCAP you sent it looks like 192.168.0.101 or something like that.
192.168.0.xxx
is private IP range
p
122.15.213.145
r
Why does your PCAP have 192 in it?
Also why does packet 9,10 not wrapped in a UDP header in that capture?
And it is larger than 1 mtu. You should fix that too
Sorry, I can't really help debug a linphone setup issue.
👍 1
p
Ok is there a way to enforce public ip address in the linphone setup. I checked on the internet / chatgpt. Not much help
🤷 1