The cause: where the request to transfer lands
Root causeTo hand a caller to a human, the ElevenLabs AI sends a SIP REFER ("please connect this caller to X"). Whoever receives it must place the new call. On inbound calls our b2bua receives it. On outbound calls the b2bua is not in the path, so the REFER goes to the carrier, Voxnet, which refuses.
ElevenLabs saw it too: 3 of 3 outbound transfers got 503
FailsAll five transfer attempts in the test window, as ElevenLabs recorded them. Every outbound one failed the same way, so the cause is consistent, not a one-off.
Kamailio log, outbound call at 18:59: the REFER goes to Voxnet, Voxnet answers 503
FailsKamailio treats the request as an ordinary message on the call and forwards it to the other end, the carrier at 103.163.174.44. Voxnet replies with a NOTIFY carrying 503. No call to the agent queue follows. The other two outbound calls (18:35, 18:49) show the same lines.
Kamailio log, inbound call at 18:43: the b2bua is in the path and rings the agent
WorksFor an inbound call Kamailio hands the call to the b2bua (route_via_b2bua). When the AI asks to transfer, the b2bua places the call to the agent itself, and the agent answers.
b2bua log of that inbound transfer: it connected, but around it two things went wrong
FragileThe b2bua records the transfer only after it has said goodbye to the AI. The AI had already left at 18:45:01, so that goodbye failed and the transfer was recorded only at 18:45:33. Until then the b2bua did not know the agent was on the line, so when the caller hung up at 18:45:31 the agent was not told. Faded rows belong to other calls.
What to fix, in order
Next1) Unblock outbound transfers: switch the Roaming agent's transfer from SIP REFER to conference/dial-out in ElevenLabs (fastest), or route outbound ElevenLabs calls through the b2bua the way inbound calls already go (lasting). 2) b2bua: record the agent leg as soon as media is bridged, and skip the goodbye to the AI if it has already hung up, so a hangup during a transfer reaches the other side. 3) Pass the real failure code to ElevenLabs instead of always 486, and stop the AI from telling callers that all agents are busy.