RelayCall

clear_digit_bindings

View as MarkdownOpen in Claude

Clear all digit bindings, optionally filtered by realm.

Parameters

realm
str | NoneDefaults to None

If provided, only clear bindings in this realm. If omitted, all bindings are cleared.

Returns

dict — Server response confirming the bindings were cleared.

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()
# Bind some digit shortcuts
await call.bind_digit(
digits="*0",
bind_method="calling.transfer",
bind_params={"dest": "operator"},
realm="shortcuts",
)
# Later, remove all shortcut bindings
result = await call.clear_digit_bindings(realm="shortcuts")
print(f"Bindings cleared: {result}")
client.run()