Webdialer Client¶
The WebdialerClient provides click-to-call functionality via the
UCM Webdialer SOAP API — initiate calls, end calls, and query device lines.
Quick Example¶
from axltoolkit import WebdialerClient
wd = WebdialerClient(
username="webdialer_user",
password="secret",
server_ip="ucm-pub.example.com",
tls_verify=True,
)
# Make a call
result = wd.make_call(
user="jsmith",
device="SEPAC7E8AB697E8",
line="1001",
destination="1002",
)
# End the call
wd.end_call(user="jsmith", device="SEPAC7E8AB697E8", line="1001")
Class Reference¶
axltoolkit.webdialer.WebdialerClient
¶
WebdialerClient(username: str, password: str, server_ip: str, *, tls_verify: Union[bool, str] = True, timeout: int = 10, max_retries: int = 3)
Bases: BaseClient
Client for the Cisco UCM Webdialer SOAP API.
Provides click-to-call and call control features through the Webdialer service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
username
|
str
|
Webdialer-enabled user name. |
required |
password
|
str
|
Password. |
required |
server_ip
|
str
|
UCM server IP address or FQDN. |
required |
tls_verify
|
Union[bool, str]
|
TLS verification setting (default |
True
|
timeout
|
int
|
Request timeout in seconds (default 10). |
10
|
max_retries
|
int
|
Retry count for transient failures (default 3). |
3
|
make_call
¶
Initiate a call via Webdialer.
Places a call from the specified device/line to the given destination number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The UCM end user ID. |
required |
device
|
str
|
The device name to originate the call from
(e.g. |
required |
line
|
str
|
The directory number to use (e.g. |
required |
destination
|
str
|
The number to call. |
required |
**profile_kwargs
|
Additional user profile options passed to
:meth: |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The Webdialer response dict with call result information. |
Raises:
| Type | Description |
|---|---|
WebdialerError
|
If the call cannot be placed. |
Example::
result = client.make_call(
user="jsmith",
device="SEPAC7E8AB697E8",
line="1001",
destination="1002",
)
end_call
¶
End the active call on a device via Webdialer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The UCM end user ID. |
required |
device
|
str
|
The device name. |
required |
line
|
str
|
The directory number. |
required |
**profile_kwargs
|
Additional user profile options. |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The Webdialer response dict. |
Raises:
| Type | Description |
|---|---|
WebdialerError
|
If the call cannot be ended. |
get_device_lines
¶
Get the lines available on a device for a user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The UCM end user ID. |
required |
device
|
str
|
The device name. |
required |
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The Webdialer response dict with line information. |
Raises:
| Type | Description |
|---|---|
WebdialerError
|
If the query fails. |
get_port_number
¶
Get the Webdialer SOAP service port number.
Used by clients that need to discover the configured Webdialer port (which may differ from the default 8443 depending on UCM configuration).
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The Webdialer response dict containing the port number. |
Raises:
| Type | Description |
|---|---|
WebdialerError
|
If the query fails. |
Example::
info = client.get_port_number()
print(info)
get_call_status
¶
Get the current call status for a user/device/line.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
user
|
str
|
The UCM end user ID. |
required |
device
|
str
|
The device name. |
required |
line
|
str
|
The directory number. |
required |
**profile_kwargs
|
Additional user profile options passed to
:meth: |
{}
|
Returns:
| Type | Description |
|---|---|
Dict[str, Any]
|
The Webdialer response dict with the current call state |
Dict[str, Any]
|
(idle, ringing, connected, etc.). |
Raises:
| Type | Description |
|---|---|
WebdialerError
|
If the query fails. |
Example::
status = client.get_call_status(
user="jsmith",
device="SEPAC7E8AB697E8",
line="1001",
)