RelayCall

send_digits

View as MarkdownOpen in Claude

Send DTMF tones on the call. Use this to navigate IVR menus on outbound calls or to send tone signals.

This method emits calling.call.send_digits events. See Call Events for payload details.

Parameters

digits
strRequired

The DTMF digit string to send. Valid characters: 0-9, *, #, A-D, W (0.5s pause), w (1s pause).

control_id
str | NoneDefaults to None

Custom control ID. Auto-generated if not provided.

Returns

dict — Server response confirming the send_digits operation.

Example

from signalwire.relay import RelayClient
client = RelayClient(
project="your-project-id",
token="your-api-token",
contexts=["default"],
)
@client.on_call
async def handle_call(call):
await call.answer()
result = await call.send_digits("1w2")
print(f"Digits sent: {result}")
client.run()