refactor: telephony integration

This commit is contained in:
Sabiha Khan 2025-10-13 17:55:10 +05:30
parent b9d1720d94
commit a01f2df7ea
26 changed files with 1583 additions and 28 deletions

View file

@ -40,6 +40,9 @@ async def calculate_workflow_run_cost(ctx, workflow_run_id: int):
logger.warning("Workflow not found for workflow run")
raise Exception("Workflow not found")
# TODO: Migrate to use telephony provider abstraction
# provider = await get_telephony_provider(workflow.organization_id)
# call_info = await provider.get_call_status(twilio_call_sid)
twilio_service = TwilioService(workflow.organization_id)
call_info = await twilio_service.get_call(twilio_call_sid)
# Twilio returns price as a string with negative value (e.g., "-0.0085")