feat: add redial option in campaigns

This commit is contained in:
Abhishek Kumar 2026-04-13 23:25:43 +05:30
parent 79116e6af2
commit 7fab959e26
14 changed files with 998 additions and 58 deletions

View file

@ -672,6 +672,13 @@ class PipecatEngine:
self._gathered_context["call_disposition"] = reason
self._gathered_context["mapped_call_disposition"] = mapped_disposition
effective_disposition = self._gathered_context.get("call_disposition", "")
if effective_disposition:
call_tags = self._gathered_context.get("call_tags", [])
if effective_disposition not in call_tags:
call_tags.append(effective_disposition)
self._gathered_context["call_tags"] = call_tags
logger.debug(
f"Finishing run with reason: {reason}, disposition: {mapped_disposition} queueing frame {frame_to_push}"
)

View file

@ -370,8 +370,8 @@ class CustomToolManager:
logger.info(f"End call reason: {reason}")
self._engine._gathered_context["call_disposition"] = reason
call_tags = self._engine._gathered_context.get("call_tags", [])
if reason not in call_tags:
call_tags.extend([reason, "end_call_tool"])
if "end_call_tool" not in call_tags:
call_tags.append("end_call_tool")
self._engine._gathered_context["call_tags"] = call_tags
# Send result callback first