mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-28 08:49:42 +02:00
feat: add asterisk ARI websocket interface (#159)
* chore: remove old files * feat: ari outbound dialing * feat: add websocket configuration for ARI * feat: handling inbound calls * delete ext channel from redis on stasis end * fix: add lock in workflow run update, refactor _handle_stasis_start * chore: update submodule --------- Co-authored-by: Sabiha Khan <sabihak89@gmail.com>
This commit is contained in:
parent
ee4a874e54
commit
7552b6c819
37 changed files with 2076 additions and 4172 deletions
|
|
@ -89,6 +89,42 @@ class CloudonixConfigurationResponse(BaseModel):
|
|||
from_numbers: List[str]
|
||||
|
||||
|
||||
class ARIConfigurationRequest(BaseModel):
|
||||
"""Request schema for Asterisk ARI configuration."""
|
||||
|
||||
provider: str = Field(default="ari")
|
||||
ari_endpoint: str = Field(
|
||||
..., description="ARI base URL (e.g., http://asterisk.example.com:8088)"
|
||||
)
|
||||
app_name: str = Field(
|
||||
..., description="Stasis application name registered in Asterisk"
|
||||
)
|
||||
app_password: str = Field(..., description="ARI user password")
|
||||
ws_client_name: str = Field(
|
||||
default="",
|
||||
description="websocket_client.conf connection name for externalMedia (e.g., dograh_staging)",
|
||||
)
|
||||
inbound_workflow_id: Optional[int] = Field(
|
||||
default=None, description="Workflow ID for inbound calls"
|
||||
)
|
||||
from_numbers: List[str] = Field(
|
||||
default_factory=list,
|
||||
description="List of SIP extensions/numbers for outbound calls (optional)",
|
||||
)
|
||||
|
||||
|
||||
class ARIConfigurationResponse(BaseModel):
|
||||
"""Response schema for ARI configuration with masked sensitive fields."""
|
||||
|
||||
provider: str
|
||||
ari_endpoint: str
|
||||
app_name: str
|
||||
app_password: str # Masked
|
||||
ws_client_name: str = ""
|
||||
inbound_workflow_id: Optional[int] = None
|
||||
from_numbers: List[str]
|
||||
|
||||
|
||||
class TelephonyConfigurationResponse(BaseModel):
|
||||
"""Top-level telephony configuration response."""
|
||||
|
||||
|
|
@ -96,3 +132,4 @@ class TelephonyConfigurationResponse(BaseModel):
|
|||
vonage: Optional[VonageConfigurationResponse] = None
|
||||
vobiz: Optional[VobizConfigurationResponse] = None
|
||||
cloudonix: Optional[CloudonixConfigurationResponse] = None
|
||||
ari: Optional[ARIConfigurationResponse] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue