creamy-judge-56458
02/16/2025, 6:04 PMgray-monkey-83525
02/16/2025, 6:04 PMVoicePipelineAgent
and LLM use the description
provided in the @llm.ai_callable
decorator to understand when to invoke the function. The description
in llm.TypeInfo
is used to provide additional context about the function's parameters. This helps the LLM understand the purpose of each parameter when making function calls.
For best practices, ensure that the description
in @llm.ai_callable
clearly states the function's purpose and when it should be called. The description
in llm.TypeInfo
should provide detailed information about each parameter, including its expected type and role in the function. This clarity helps the LLM make accurate decisions about when and how to use the function.
Would you like more detail on how to structure these descriptions or examples of best practices?
Sources:
- Function calling with Voice Agents 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.creamy-judge-56458
02/16/2025, 6:08 PMgray-monkey-83525
02/16/2025, 6:08 PMTransferSIPParticipantRequest
requires that an outbound SIP trunk is set up. This is because the transfer involves making an outbound call to the specified phone number (transfer_to
), which necessitates an outbound trunk configuration to handle the SIP traffic.
Would you like more details on setting up an outbound SIP trunk or the transfer process?
Sources:
- Transferring calls
- SIP outbound trunk setup 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.creamy-judge-56458
02/16/2025, 6:32 PMgray-monkey-83525
02/16/2025, 6:32 PMdispatch-rule.json
. The dispatch rule is primarily used to route incoming calls to specific rooms, so it typically references the inbound trunk ID. The outbound trunk ID is generally not required in the dispatch rule, as it is used for making outgoing calls rather than handling incoming ones.
Would you like more information on configuring dispatch rules or the role of SIP trunk IDs?
Sources:
- https://docs.livekit.io/sip/quickstart/
- https://docs.livekit.io/sip/quickstarts/accepting-calls/
Note: I wasn’t able to find highly relevant data sources, but above are a few potentially relevant links. 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.creamy-judge-56458
02/16/2025, 6:34 PM@llm.ai_callable(description="Called when the user wants the call to be forwarded to the operator")
async def forward_call(
self,
query: Annotated[
str,
llm.TypeInfo(description="User wants to forward the call to the operator")
]
):
print(f"-----------Forwarding call to {query}")
if self.phone_number == "848484":
transfer_request = TransferSIPParticipantRequest(
participant_identity=self.participant.identity,
room_name=self.ctx.room.name,
transfer_to="++3185849492",
play_dialtone=False
)
logger.debug(f"Transfer request: {transfer_request}")
try:
await self.lkapi.sip.transfer_sip_participant(transfer_request)
except Exception as e:
logger.error(f"Transfer failed: {e}")
This however, doesn’t seem to work, while the outbound trunk is setup with Telnyx. What might be going wrong here?gray-monkey-83525
02/16/2025, 6:34 PMTransferSIPParticipantRequest
. Ensure that the participant_identity
and room_name
are correct and that the transfer_to
number is in the correct format (e.g., E.164 format).
3. Error Handling: The error message logged in the exception block might provide more insight into what is going wrong. Ensure that the logger is correctly set up to capture and display these error messages.
4. Telnyx Configuration: Confirm with Telnyx support that your account is set up to handle SIP REFER transfers and that there are no restrictions or additional settings required on their end.
Would you like more detailed guidance on any of these points?
Sources:
- Transferring calls 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.creamy-judge-56458
02/16/2025, 7:29 PM@llm.ai_callable(description="Called when the user wants the call to be forwarded to the operator")
async def forward_call(
self,
query: Annotated[
str,
llm.TypeInfo(description="User wants to forward the call to the operator")
]
):
print(f"-----------Forwarding call to {query}")
if self.phone_number == "848484":
transfer_request = TransferSIPParticipantRequest(
participant_identity=self.participant.identity,
room_name=self.ctx.room.name,
transfer_to="++3185849492",
play_dialtone=False
)
logger.debug(f"Transfer request: {transfer_request}")
try:
await self.lkapi.sip.transfer_sip_participant(transfer_request)
except Exception as e:
logger.error(f"Transfer failed: {e}")
voice-agent-callable-functions - Transfer failed: (‘deadline_exceeded’, ‘request timed out’)
Also it looks like my outbound-trunk is setup correctly:
{
“trunk”: {
“name”: “Outbound Telnyx LiveKit Call Agent Trunk”,
“address”: “sip.telnyx.com”,
“numbers”: [“+3242424124”],
“auth_username”: “asdgasdgadga”,
“auth_password”: “asdgagasgdasdg”
}
}
What might I be missing here, because standard outbound call does work when I test it with “lk sip participant create sipParticipant.json”gray-monkey-83525
02/16/2025, 7:29 PMTransferSIPParticipantRequest
. Ensure that the participant_identity
, room_name
, and transfer_to
fields are correctly specified. The transfer_to
number should be in the correct format (e.g., E.164 format).
4. Timeout Settings: If possible, adjust the timeout settings for the transfer request to allow more time for the operation to complete. This might involve modifying the configuration on the LiveKit or Telnyx side.
5. Telnyx Support: Contact Telnyx support to ensure that your account is configured to handle SIP REFER transfers and that there are no restrictions or additional settings required on their end.
Would you like more detailed guidance on any of these points?
Sources:
- Transferring calls 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.creamy-judge-56458
02/19/2025, 9:37 AMgray-monkey-83525
02/19/2025, 9:37 AMTransferSIPParticipantRequest
to work. According to a Slack conversation, enabling PSTN transfers is necessary for certain SIP trunk configurations to support call transfers.
Would you like more details on how to proceed with enabling these features or any other related information?
Sources:
- Slack conversation on SIP transfer with Telnyx 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.