azure.communication.phonenumbers.siprouting.aio package¶
-
class
azure.communication.phonenumbers.siprouting.aio.
SipRoutingClient
(endpoint: str, credential: AsyncTokenCredential, **kwargs: Any)[source]¶ A client to interact with the SIP routing gateway asynchronously. This client provides operations to retrieve and update SIP routing configuration.
- Parameters
endpoint (str) – The endpoint url for Azure Communication Service resource.
credential (AsyncTokenCredential) – The credentials with which to authenticate.
- Keyword Arguments
api_version (str) – Api Version. Default value is “2021-05-01-preview”. Note that overriding this default value may result in unsupported behavior.
-
classmethod
from_connection_string
(conn_str: str, **kwargs: Any) → SipRoutingClient[source]¶ Factory method for creating client from connection string.
- Parameters
conn_str (str) – Connection string containing endpoint and credentials
- Returns
The newly created client.
- Return type
SipRoutingClient
-
async
get_trunk
(trunk_fqdn: str, **kwargs: Any) → Optional[SipTrunk][source]¶ Retrieve a single SIP trunk.
-
async
list_routes
(**kwargs: Any) → Iterable[SipTrunkRoute][source]¶ Retrieves an iterable of currently configured SIP routes.
- Returns
Current SIP routes configuration.
- Return type
Iterable[SipTrunkRoute]
- Raises
~azure.core.exceptions.HttpResponseError
-
async
list_trunks
(**kwargs: Any) → Iterable[SipTrunk][source]¶ Retrieves an iterable of currently configured SIP trunks.
- Returns
Current SIP trunks configuration.
- Return type
Iterable[SipTrunk]
- Raises
~azure.core.exceptions.HttpResponseError
-
async
set_routes
(routes: List[SipTrunkRoute], **kwargs: Any) → None[source]¶ Overwrites the list of SIP routes.
- Parameters
routes (List[SipTrunkRoute]) – New list of routes to be set.
- Returns
None
- Return type
- Raises
~azure.core.exceptions.HttpResponseError, ValueError