Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/phonic/conversations/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from ..core.request_options import RequestOptions
from .requests.conversations_sip_outbound_call_request_sip import ConversationsSipOutboundCallRequestSipParams
from ..requests.outbound_call_config import OutboundCallConfigParams
from .raw_client import AsyncRawConversationsClient, RawConversationsClient
from .reconnectable_socket_client import ReconnectableAsyncConversationsSocketClient, ReconnectableConversationsSocketClient
Expand Down Expand Up @@ -519,6 +520,7 @@ def sip_outbound_call(
sip_auth_password: typing.Optional[str] = None,
config: typing.Optional[OutboundCallConfigParams] = OMIT,
dry_run: typing.Optional[bool] = OMIT,
sip: typing.Optional[ConversationsSipOutboundCallRequestSipParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConversationsSipOutboundCallResponse:
"""
Expand Down Expand Up @@ -546,6 +548,9 @@ def sip_outbound_call(
dry_run : typing.Optional[bool]
If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null.

sip : typing.Optional[ConversationsSipOutboundCallRequestSipParams]
SIP trunk settings for the outbound trunk created for this call.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -575,6 +580,7 @@ def sip_outbound_call(
sip_auth_password=sip_auth_password,
config=config,
dry_run=dry_run,
sip=sip,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -1187,6 +1193,7 @@ async def sip_outbound_call(
sip_auth_password: typing.Optional[str] = None,
config: typing.Optional[OutboundCallConfigParams] = OMIT,
dry_run: typing.Optional[bool] = OMIT,
sip: typing.Optional[ConversationsSipOutboundCallRequestSipParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ConversationsSipOutboundCallResponse:
"""
Expand Down Expand Up @@ -1214,6 +1221,9 @@ async def sip_outbound_call(
dry_run : typing.Optional[bool]
If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null.

sip : typing.Optional[ConversationsSipOutboundCallRequestSipParams]
SIP trunk settings for the outbound trunk created for this call.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -1251,6 +1261,7 @@ async def main() -> None:
sip_auth_password=sip_auth_password,
config=config,
dry_run=dry_run,
sip=sip,
request_options=request_options,
)
return _response.data
Expand Down
15 changes: 15 additions & 0 deletions src/phonic/conversations/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from ..errors.too_many_requests_error import TooManyRequestsError
from ..errors.unauthorized_error import UnauthorizedError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
from .requests.conversations_sip_outbound_call_request_sip import ConversationsSipOutboundCallRequestSipParams
from ..requests.outbound_call_config import OutboundCallConfigParams
from ..types.basic_error import BasicError
from ..types.error import Error
Expand Down Expand Up @@ -1258,6 +1259,7 @@ def sip_outbound_call(
sip_auth_password: typing.Optional[str] = None,
config: typing.Optional[OutboundCallConfigParams] = OMIT,
dry_run: typing.Optional[bool] = OMIT,
sip: typing.Optional[ConversationsSipOutboundCallRequestSipParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ConversationsSipOutboundCallResponse]:
"""
Expand Down Expand Up @@ -1285,6 +1287,9 @@ def sip_outbound_call(
dry_run : typing.Optional[bool]
If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null.

sip : typing.Optional[ConversationsSipOutboundCallRequestSipParams]
SIP trunk settings for the outbound trunk created for this call.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -1304,6 +1309,9 @@ def sip_outbound_call(
object_=config, annotation=OutboundCallConfigParams, direction="write"
),
"dry_run": dry_run,
"sip": convert_and_respect_annotation_metadata(
object_=sip, annotation=ConversationsSipOutboundCallRequestSipParams, direction="write"
),
},
headers={
"content-type": "application/json",
Expand Down Expand Up @@ -2602,6 +2610,7 @@ async def sip_outbound_call(
sip_auth_password: typing.Optional[str] = None,
config: typing.Optional[OutboundCallConfigParams] = OMIT,
dry_run: typing.Optional[bool] = OMIT,
sip: typing.Optional[ConversationsSipOutboundCallRequestSipParams] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ConversationsSipOutboundCallResponse]:
"""
Expand Down Expand Up @@ -2629,6 +2638,9 @@ async def sip_outbound_call(
dry_run : typing.Optional[bool]
If true, validates the outbound call setup without placing a call. Returns HTTP 200 with `conversation_id` and `twilio_call_sid` set to null.

sip : typing.Optional[ConversationsSipOutboundCallRequestSipParams]
SIP trunk settings for the outbound trunk created for this call.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -2648,6 +2660,9 @@ async def sip_outbound_call(
object_=config, annotation=OutboundCallConfigParams, direction="write"
),
"dry_run": dry_run,
"sip": convert_and_respect_annotation_metadata(
object_=sip, annotation=ConversationsSipOutboundCallRequestSipParams, direction="write"
),
},
headers={
"content-type": "application/json",
Expand Down
Loading