incamming call, Kamailio
# support
s
Hi, i use the Kamailio to connect to vapi, i can call vapi but can not hear the assistant. I tried with NAT, RTPENGINE nothing helps. I could not find any howto for that case. I need that connection case: phone -> voip provider (SIP Trunk) -> Kamailio - vapi AND also opposite direction . Maybe someone has already working conf. Phone Number of my voip provider is already in vapi enabled. With microSIP i can call vapi without any problems. I need a configuration when I can call Vapi via mobile or pstn phone. SIP trunk is ready at my voip providers side. thank you
s
Hey @supernova I just wanted to confirm a couple of things: 1. For incoming calls, are you using Kamailio to route calls from your SIP trunk provider to VAPI? 2. For outgoing calls, does Kamailio route the SIP INVITE to the VAPI endpoint using the correct SIP URI and credentials? Since MicroSIP works fine but the SIP trunk doesn’t, it might be due to a mismatch in SIP header. Let me know if these areas have been checked!
if everything is checked, could you share a PCAP file? This will help us pinpoint any signaling issues.
s
Hi, lets talko first about inbound. Attached i send you pcap with audio successfully and audio failed. With Kamailio i need to handle the header to get Digest Authorisation on vapi. The main issue is , that the audio does not work in 90% of calls and sometimes work... https://cdn.discordapp.com/attachments/1311054143229526057/1312053443514339388/call_made_well.pcap?ex=674b187d&is=6749c6fd&hm=582a77203d2657842f8ee180c4ef7c90510d643db78871f2dd42950cce150644& https://cdn.discordapp.com/attachments/1311054143229526057/1312053443925508247/call_ohne_audio.pcap?ex=674b187d&is=6749c6fd&hm=1190a111ba11750c21f4120cc21d76ae7d4d694659105028a0fbb5135f45ce27&
s
> With Kamailio i need to handle the header to get Digest Authorisation on vapi. We use Basic auth, instead of encrypted username and passwords.
@supernova The SIP client might automatically hash your password, but Vapi requires plain username and password. Use a SIP client that supports plain authentication. Look for an option like 'Plain Authentication' or 'Basic Authentication' in your SIP client settings. Enter the username and password as single words without symbols or spaces. Username can be your sip username and password is just merely a placeholder.
Do let me know how it goes.
s
Hi ShubhamBajaj, thank for your answering. I can her the Voice Agent, he can not hear me. I would say it is not a problem with autientication or ? Thank you.
s
The PCAP files says the call failed to connect because of 401 Auth and later Vapi opt out of call. But considering your words, still give me sometime to look into the call again. https://cdn.discordapp.com/attachments/1311054143229526057/1313500273104388246/Screenshot_2024-12-03_at_7.10.34_PM.png?ex=67505bf4&is=674f0a74&hm=61cad1cb343fa0b5d7fc2d7dd2ec25812023a7beed8624f2caf7a46afeeaf29a&
s
yes first auth did not work, second was successfully. Voice Assistant is speaking but can not hear.
s
@supernova I have checked the this PCAP file again, you need to send auth credentials as basic username and password in single words without any encryption over auth to make it work.
s
it does not help me... im authorized at the end, the only issue i have is that the audio connection works only one way
s
Can you share the recent call id where auth is accepted but audio is missing, and if possible PCAP file as well.
A gentle reminder @supernova