Anybody experienced an exception like the followin...
# agents
a
Anybody experienced an exception like the following when transferring a SIP call from within the Python agent, even though the transfer is successful from the SIP perspective? I've checked our SIP logs and I don't see a
404
anywhere so unsure of where this is coming from. Using livekit.io service btw and v1.2 api.
Copy code
Traceback (most recent call last):
  File "/opt/ai-agents/src/agents/base_agent.py", line 257, in transfer_call
    await livekit_api.sip.transfer_sip_participant(transfer_request)
  File "/opt/ai-agents/.venv/lib/python3.10/site-packages/livekit/api/sip_service.py", line 436, in transfer_sip_participant
    return await self._client.request(
  File "/opt/ai-agents/.venv/lib/python3.10/site-packages/livekit/api/twirp_client.py", line 129, in request
    raise TwirpError(
livekit.api.twirp_client.TwirpError: TwirpError(code=not_found, message=twirp error unknown: server not found, status=404)
r
Do you have an example call id where this happened. It should start with
SCL_
a
Not seeing an
SCL_
id at first glance, only
AJ_
id. Digging deeper...
r
What is that value?
a
AJ_45mod99cQJPE
👀 1
That is actually correct.
Found the callid as well.
SCL_kEDVb2MHqqXM
👍 1
r
I don't think the transfer actually completed: Call Flow INVITE sent from 11111111111 to +22222222222 at 125523 PM. 100 Processing response received immediately. 180 Ringing responses received three times, indicating the call is ringing. 200 OK response received, confirming the call is answered. ACK sent to acknowledge the 200 OK response. Transfer REFER sent from +22222222222 to 11111111111 at 125610 PM, indicating a request to refer the call. 202 Accept response received for the REFER request. BYE sent from 11111111111 to +22222222222 to terminate the call. 200 OK response received, confirming the call termination. Also did you really mean to transfer to the same number that is already in progress.
We should have seen a NOTIFY to complete the transfer.
a
Also did you really mean to transfer to the same number that is already in progress.
The original incoming call was to a DID number, and the REFER was to an internal extension number, so should not sure why it would appear as the same number.
I don't think the transfer actually completed
It completed on our end I was successfully transferred on the SIP end. I just always receive this exception on the agent side.
🤔 1
r
Do you have a PCAP from your side?
a
Yeah I can grab that. Regarding the NOTIFY, I didn't see that in the trace. Would that explain the exception?
r
I think so
I think that is when the transfer is completed.
a
DMed you the trace.
👀 1
r
From the PCAP I don't the the transfer completed.
I thought we need a notify for the completed transfer
a
I'm reaching out to our PBX team to find out if we're supposed to be issuing a NOTIFY.
r
a
Seems we have an option to enable this in our PBX but only globally so not likely an option in the near future. Is there any way to bypass the NOTIFY requirement? The RFC states that NOTIFY is no mandatory which is likely why it's disabled by default in our system.
r
What is there a BYE before to 200OK?
a
That's a really good question. Thanks for pointing that out. I'll reach out to the pbx team again with this.