401 SIP Auth Error, followed by 491 Request Pendin...
# support
r
2f52941906cfee1109fdbfc42082423a@sip.vapi.ai There is the call id im issuing problems. Hello, I need to resolve this problem urgently. I saw that it happened a while ago and it remains unresolved. For our solution to go into production within a large client, and I believe many, this is a BIG problem that prevents us from using your service. In 75% of calls, VAPI goes through perfectly, but in 25% of them at random times of the day, I receive the 491 Request Pending error, meaning the call does not go through successfully.
This is a project for around 250k calls/month.
@Shubham Bajaj
s
@rocha can you share the call Id the above one doesn't looks correct.
example call ID: 6a79e9bc-1a01-4b5a-918d-e9daf7d0c737
r
This is the call ID i got from vapi.. i think if you cant see it in your logs, its because it wasnt generated
I cant see also the refused calls into vapi dashboard logs table
@Shubham Bajaj this is the main problem.. when i receive 491 request pending error from vapi, the call doesnt start. instantly gets disconnected
The same problem, some months ago.. And it looks like it was not solved yet.
s
Hey Rocha, can you get the PCAP from your telephony?
r
@Shubham Bajaj
ill try to get it for you
Hello @Shubham Bajaj , I come here to inform you that I cannot access a PCAP from this connection. I can monitor via Asterisk, but generating the pcap files by intercepting the packets is a problem in my infrastructure. But I can assure you that the problem has already been investigated for days, in real time. The behavior is exactly as this old thread describes, I'll even paste here a relevant part that this guy described: "The scenario is that it works and does not work with no changes on our side. We have an engineer testing it every 15 minutes and when things start working again, we can demonstrate it to our clients. When it works, it works for any of the agents, when it breaks, it breaks for the entire account. This is even with sample sizes of 20 as I said, the config is the same It works with "user", that is fine There is no observable delta on our side between working and not working. There is no identifiable commonality either only time dependency."
Here is the link to the topic
From what I see, clearly the impact this guy had with your solution is the same one I have had. A terrible experience for the customer, since I deliver the solution for testing, receiving the call from the customer's IVR and passing it on to vapi. Sometimes it works, sometimes it doesn't. The impact of this is absurd to be able to sell your solution. I point out here that instabilities occur when the transfer comes from the customer's IVR, after which it is redirected to the vapi's SIP. The problem is not credentials or anything like that. The credentials work correctly and there is no problem with them. I urgently need to resolve the error 491 returned by you, and I'm running out of hope, since this same problem that occurred a while ago has not yet been resolved.
I dont get the 491 error when calling directly to my asterisk phone number that is appointed to vapi sip
The problem is when the call is transfered from any IVR to my asterisk phone number that is appointed to vapi sip.
s
Hey @rocha can you share any of recent call IDs, and also check your DM let's resolve it over the call.
FYI: added your ticket as priority ticket.
r
Thank you so much. Just scheduled it.
2d4f5efc-494f-436e-a0c6-9ee23afa77ee 4adce118-8bd8-4b1f-9b47-c91855f23aa6 065b640b-afef-4770-ae8f-33491fb68e53
Here we go with some call id's.
the 2 latests failed for any reason
it usually do not appear in dashboard when vapi refuses with 491 req pending
s
Copy code
"id": "2d4f5efc-494f-436e-a0c6-9ee23afa77ee",
  "transcript": "AI: Olá, aqui é a Cecilia com quem eu falo.\nUser: Marcar com ela? Oi, Cecília. Fala com a Larissa.\nAI: Oi, Larissa, quero entender com você o que está acontecendo. Você está sem energia ou precisa falar sobre uma situação de risco como fio, partido, explosão ou risco de incêndio?\nUser: Tô sem energia.\nAI: Entendi, Larissa, vamos resolver isso. Vou verificar se temos o número de instalação, correto? Um momento, por favor, verificando a instalação. Estou consultando sua instalação.\nAI: Larissa, confirme, por favor, se o endereço é o seguinte, a vejo alderide número 181 BL 23 AP 402, no bairro PQFAR, em São Carlos.\nUser: Não é outro endereço.\nAI: Vamos tentar novamente? Por gentileza, você pode me informar o código da instalação que está sem energia ou o seu CPF para que eu possa buscar as informações corretas?\nUser: Sim, código da instalação é 20 8481-4380.\nAI: Estou consultando sua instalação.\nAI: Olha, eu não encontrei a sua instalação. Com o código informado, podemos tentar novamente procurar pelo número de instalação ou pelo seu CPF. Qual você prefere?\nUser: Vou te passar de novo o número da instalação, vi. Nte. 8481-4381.\nAI: Estou consultando sua instalação.\nAI: Larissa, por favor confirme se o endereço é o seguinte, AV Ananias Batista Menezes, número 650, no bairro vl mirim, em Praia Grande.\n",
  "recordingUrl": "https://storage.vapi.ai/2d4f5efc-494f-436e-a0c6-9ee23afa77ee-1740140195334-2f7b8057-96ad-4d0f-84c5-a5c99eec68cd-mono.wav",
We do see a 401 Unauthorized challenge at packet 3, then the client re-INVITEs with proper credentials (packets 5–7). There's no 491 Request Pending in this trace—just 401, followed by the successful INVITE/200 OK flow.
Copy code
"id": "4adce118-8bd8-4b1f-9b47-c91855f23aa6",
  "type": "inboundPhoneCall",
  "recordingUrl": "https://storage.vapi.ai/4adce118-8bd8-4b1f-9b47-c91855f23aa6-1740139703593-db506efe-35ab-4c57-8502-f4ff770db9a5-mono.wav",
Here's a breakdown with the IP list and their actions: | IP Address | Role | Actions Performed | |-----------------|----------|----------------------------------------------------------------------| | 35.198.23.153 | Client | • Sent INVITE (packet 1)• Sent CANCEL (packet 4)• Sent ACK (packets 6 & 10)• Sent a second INVITE (packet 7)• Sent BYE (packet 11) | | 172.31.1.205 | Server | • Sent 100 Trying (packets 2 & 8)• Sent 401 Unauthorized (packet 3)• Sent 200 OK responses for CANCEL, INVITE, and BYE (packets 5, 9, 12) | - 401 SIP Auth Error: Yes, there is a 401 Unauthorized response from the server (packet 3) which is a common challenge when credentials are missing or incorrect. - 491 Request Pending: There is no 491 Request Pending in the provided log.
Copy code
"id": "065b640b-afef-4770-ae8f-33491fb68e53",
  "type": "inboundPhoneCall",
  "transcript": "",
  "recordingUrl": "https://storage.vapi.ai/065b640b-afef-4770-ae8f-33491fb68e53-1740140038683-bf52f5d2-8a8c-4267-865c-9fcec07b4a43-mono.wav",
  "status": "ended",
  "endedReason": "phone-call-provider-closed-websocket",
- 35.198.23.153 (Client) - Line 1: Sent an INVITE to sip:123465986@sip.vapi.ai:5060. - Line 4: Sent an ACK after receiving a response. - Line 5: Sent a second INVITE. - Line 8: Sent an ACK directed to 44.229.228.186:5060. - Line 9: Sent a BYE request to 44.229.228.186:5060. - 172.31.1.205 (Server) - Line 2 & 6: Responded with 100 Trying. - Line 3: Responded with a 401 Unauthorized (SIP Auth error). - Line 7: Responded with 200 OK to the INVITE. - Line 10: Responded with 200 OK for the BYE. Regarding the 401 and 491: - 401 SIP Auth Error: Yes, it appears on line 3. - 491 Request Pending: No, there’s no sign of a 491 Request Pending in this log. Hope this helps clear things up!
@rocha let me know your thoughts on this.
The custom header “x-asterisk-hangupcausecode” was set to 16 in BYE requests.
r
@Shubham Bajaj Thanks for analysing this one. This one is not a part of the problem i’ve been experiencing.. since when 491 appears, it doesnt create a call id inside vapi logs. i’ll be testing more today and export a pcap file if i find the problem
@Shubham Bajaj just sent in your private some pcaps that shows the 491 error
didnt send it here for not sharing private info
s
Documenting: This matter is being discussed in direct messages.
r
@Shubham Bajaj I keep getting 491 error. I need to talk with you in a meeting in order to fix it as soon as possible. Really tried everything that is possible.
This guy had the same problem.
Literally the same behaviour
80% of the day, vapi accept all calls normally
20% of the day, it doesnt. returning 491 request pending
No problems with auth, since it works in the most part.
No problems with ip authorization
It should work in a simple way. I receive the call in my asterisk infrastructure and send it to vapi sip (As is works normally almost every part of the day)
Im trying to fix it with vapi support for so many days
And to detail this use case in more detail: This is not a common case where a customer calls the phone number and the call connects normally with the agent. This is the most common case, however, in serious and well-structured applications the call comes from an IVR via SIP transfer, and whoever sells your product needs to receive this call on their own infrastructure and send this call to the vapi sip after all necessary header manipulation. Calling directly on a number tied to Vapi's siptrunk works 100% of the time. When this call comes via sip, from our client's structure to ours, at the exact moment of forwarding the call to the vapi, the intermittency begins. 80% of the time it works, the other times it returns a 491.
@rocha Thank you for sharing this information after I reviewed your shared link and conducted my evaluation. I believe this may be an issue with our telephony system. I will contact them to confirm.
s
It is fixed, can you try again?
2 Views