mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-16 11:31:04 +02:00
fix: fix speech to speech model transitions (#545)
* fix: fix transition logic for realtime providers * chore: run formatter * chore: generate SDK and fix other realtime providers * fix: fix ultravox node transitions
This commit is contained in:
parent
348cd8427b
commit
01acf6ac30
34 changed files with 1282 additions and 617 deletions
|
|
@ -1096,9 +1096,7 @@ class CloudonixProvider(TelephonyProvider):
|
|||
from_number = random.choice(self.from_numbers)
|
||||
|
||||
backend_endpoint, _ = await get_backend_endpoints()
|
||||
callback_url = (
|
||||
f"{backend_endpoint}/api/v1/telephony/cloudonix/transfer-result/{transfer_id}"
|
||||
)
|
||||
callback_url = f"{backend_endpoint}/api/v1/telephony/cloudonix/transfer-result/{transfer_id}"
|
||||
|
||||
endpoint = f"{self.base_url}/calls/{self.domain_id}/application"
|
||||
data: Dict[str, Any] = {
|
||||
|
|
@ -1111,9 +1109,7 @@ class CloudonixProvider(TelephonyProvider):
|
|||
|
||||
data.update(kwargs)
|
||||
headers = self._get_auth_headers()
|
||||
masked_destination = (
|
||||
f"***{destination[-4:]}" if len(destination) > 4 else "***"
|
||||
)
|
||||
masked_destination = f"***{destination[-4:]}" if len(destination) > 4 else "***"
|
||||
logger.info(
|
||||
f"[Cloudonix Transfer] Dialing {masked_destination} into conference "
|
||||
f"{conference_name} (transfer_id={transfer_id})"
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ async def handle_cloudonix_transfer_result(transfer_id: str, request: Request):
|
|||
original_call_sid = transfer_context.original_call_sid
|
||||
conference_name = transfer_context.conference_name
|
||||
|
||||
if (conferenceStatus == "participant-join"):
|
||||
if conferenceStatus == "participant-join":
|
||||
event = TransferEvent(
|
||||
type=TransferEventType.DESTINATION_ANSWERED,
|
||||
transfer_id=transfer_id,
|
||||
|
|
@ -89,7 +89,7 @@ async def handle_cloudonix_transfer_result(transfer_id: str, request: Request):
|
|||
message="Great! The destination answered. Connecting you now.",
|
||||
status="success",
|
||||
action="destination_answered",
|
||||
)
|
||||
)
|
||||
elif outboundCallStatus in _CLOUDONIX_TRANSFER_FAILURE_STATUSES:
|
||||
event = TransferEvent(
|
||||
type=TransferEventType.TRANSFER_FAILED,
|
||||
|
|
|
|||
|
|
@ -120,7 +120,9 @@ class CloudonixConferenceStrategy(TransferStrategy):
|
|||
manager = await get_call_transfer_manager()
|
||||
await manager.remove_transfer_context(transfer_id)
|
||||
except Exception as e:
|
||||
logger.error(f"[Cloudonix Transfer] Error cleaning up transfer context: {e}")
|
||||
logger.error(
|
||||
f"[Cloudonix Transfer] Error cleaning up transfer context: {e}"
|
||||
)
|
||||
|
||||
|
||||
class CloudonixHangupStrategy(HangupStrategy):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue