mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-04 10:52:17 +02:00
feat: telephony call transfer (#155)
* transfer call * fix: ignore completed call status * chore: refactor telephony * chore: refactor pipecat engine custom tools and other telephony services * chore: code refactor * chore: put back office ambient sound files * chore: remove transport from engine * fix: fix alembic revision * chore: remove set_transferring_call from engine * fix: send OutputAudio frame and let transport chunk it * fix: reinstate docker compose * chore: remove unused transfer-twmil route for caller * chore: update pipecat submodule --------- Co-authored-by: Abhishek Kumar <abhishek@a6k.me>
This commit is contained in:
parent
5d14d17ceb
commit
c711920165
30 changed files with 1965 additions and 128 deletions
|
|
@ -309,3 +309,46 @@ class TelephonyProvider(ABC):
|
|||
Tuple of (Response, media_type) - Response object and content type
|
||||
"""
|
||||
pass
|
||||
|
||||
# ======== CALL TRANSFER METHODS ========
|
||||
|
||||
@abstractmethod
|
||||
async def transfer_call(
|
||||
self,
|
||||
destination: str,
|
||||
transfer_id: str,
|
||||
conference_name: str,
|
||||
timeout: int = 30,
|
||||
**kwargs: Any,
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
Initiate a call transfer to a destination number.
|
||||
|
||||
Args:
|
||||
destination: The destination phone number (E.164 format)
|
||||
transfer_id: Unique identifier for tracking this transfer
|
||||
conference_name: Name of the conference to join the destination into
|
||||
timeout: Transfer timeout in seconds
|
||||
**kwargs: Provider-specific additional parameters
|
||||
|
||||
Returns:
|
||||
Dict containing:
|
||||
- call_sid: Provider's call identifier
|
||||
- status: Transfer initiation status
|
||||
- provider: Provider name
|
||||
|
||||
Raises:
|
||||
NotImplementedError: If provider doesn't support transfers
|
||||
ValueError: If provider configuration is invalid
|
||||
"""
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def supports_transfers(self) -> bool:
|
||||
"""
|
||||
Check if this provider supports call transfers.
|
||||
|
||||
Returns:
|
||||
True if provider supports call transfers, False otherwise
|
||||
"""
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue