Repository navigation
Upgrade notes
- Logging no longer includes request or response bodies. When a Conversation Orchestrator or Conversation Memory call fails, the SDK logs the method, path, HTTP status and Twilio error code instead of the request body and response text. The Media Streams providers log a tool call's name but not its arguments or result. A malformed
get_profileorlookup_profileresponse now raises aValueErrorthat names the invalid fields without their values. - ConversationRelay creates the conversation before the call connects (orchestrated mode, inbound and outbound). The TwiML now carries
conversation_idand atacConversationIdcustom parameter, and no longer setsconversation_configuration. If the create fails or takes longer than 5 s, TAC falls back to the previous behavior. Nothing is created when your TwiML options already set aconversation_idor select anotherconversation_configuration.VoiceTwiMLOptionsConversationRelayhas a new optionalconversation_id. partial_prompts=Truenow fireson_message_readyonce per turn instead of once per partial prompt.- Outbound ConversationRelay calls now record the dialed number (
to) as the customer and your caller ID as the agent. Earlier versions swapped them. Onlydirection: "outbound-api"counts as outbound. - Recall failures fall back to Conversation Orchestrator.
TAC.retrieve_memorynow useslist_communications()when Recall fails, instead of returning empty memory. Direct callers ofMemoryClient.retrieve_memory, including the built-inretrieve_profile_memorytool, now get anhttpx.HTTPErrororValueErrorinstead of an empty response. - New
TAC.fetch_profile(profile_id)fetches a profile with yourmemory_config.trait_groupsapplied. - New
VoiceChannel.on_dtmf(handler)receives ConversationRelay keypresses whendtmf_detection=True, oneDtmfEvent(digit,conversation_id,call_sid,session) per key. A keypress initializes the conversation the same way a first prompt does. Digits are never logged.
What's Changed
- feat: add TAC.fetch_profile() and document the profile trait fetch by @LLuque-twilio in #153
- chore(deps): upgrade Dependabot-flagged dependencies by @xinghaohuang91 in #155
- test: fail any HTTP request a test didn't mock by @LLuque-twilio in #157
- fix(voice): Ignore partial ConversationRelay prompts by @xinghaohuang91 in #159
- feat(voice): pre-create the conversation before connecting ConversationRelay by @LLuque-twilio in #148
- fix(memory): fall back to Conversation Orchestrator when Recall fails by @xinghaohuang91 in #161
- fix(logging): stop logging request and response bodies by @ryanrishi in #156
- fix(voice): Use the dialed number as the customer on outbound calls by @xinghaohuang91 in #160
- feat(voice): Add on_dtmf callback for ConversationRelay keypresses by @xinghaohuang91 in #165
- chore: bump version to 2.7.0 by @ryanrishi in #164
Full Changelog: v2.6.0...v2.7.0