RELAYCall

clear_digit_bindings

View as MarkdownOpen in Claude

Clear all digit bindings, optionally filtered by realm.

Parameters

realm
Optional[str]

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

Returns

dict — Server response confirming the bindings were cleared.

Example

1from signalwire.relay import RelayClient
2
3client = RelayClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7 contexts=["default"],
8)
9
10@client.on_call
11async def handle_call(call):
12 await call.answer()
13
14 # Bind some digit shortcuts
15 await call.bind_digit(
16 digits="*0",
17 bind_method="calling.transfer",
18 bind_params={"dest": "operator"},
19 realm="shortcuts",
20 )
21
22 # Later, remove all shortcut bindings
23 result = await call.clear_digit_bindings(realm="shortcuts")
24 print(f"Bindings cleared: {result}")
25
26client.run()