cuddly-cartoon-47334
07/31/2025, 10:20 PMjolly-air-155
08/01/2025, 2:16 AMgenerate_reply is added after the system message on the top of the chat ctx, so it might be ignored if you have a long chat ctx.cuddly-cartoon-47334
08/01/2025, 2:17 AMcuddly-cartoon-47334
08/01/2025, 2:17 AMjolly-air-155
08/01/2025, 2:17 AMjolly-air-155
08/01/2025, 2:18 AMcuddly-cartoon-47334
08/01/2025, 2:21 AM@ctx.room.on("sip_dtmf_received")
def dtmf_received(dtmf: rtc.SipDTMF):
logging.info`(f"DTMF received from {dtmf.participant.identity}: {dtmf.code} / {dtmf.digit}")
handle = ctx.proc.userdata["session"].generate_reply(
instructions=(f"(The Contact has just dialed the digit {dtmf.digit} (which is DTMF code {dtmf.code}) via their phone pad.Based on this, you would:)")
)`
this is my code to receive dtmf tones . the Agent does receive dtmf tones but the generate_reply just makes the agent repeat itelf and not like say anything regarding those dtmf tones.cuddly-cartoon-47334
08/01/2025, 2:22 AMcuddly-cartoon-47334
08/01/2025, 2:23 AMcuddly-cartoon-47334
08/01/2025, 2:24 AMcuddly-cartoon-47334
08/01/2025, 5:55 AMjolly-air-155
08/04/2025, 1:37 AMgenerate_reply right now, but you can use llm.chat to generate the reply directly and use a session.say with add_to_chat_ctx=False to speak the replycuddly-cartoon-47334
08/04/2025, 1:38 AMcuddly-cartoon-47334
08/04/2025, 6:37 AMjolly-air-155
08/04/2025, 6:48 AMllm.chat is still there if you can access the llm instance, or you can use llm_node from agent.