Skip to content

Commit 277b46d

Browse files
feat: Fix Conversation Relay expected webhook
1 parent 5cb134d commit 277b46d

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1041
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-d8306e4a36032fb42b9b09fcbf6013017b5f6af52258606405fa9e4c33c7209a.yml
3-
openapi_spec_hash: 2024bf921691c750c845c8bed97cf0a8
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-a5fcd0749eaf183022565d79a8386faaf94fda529abc2d18bc8806de15f920a4.yml
3+
openapi_spec_hash: ba27a057456ddf456a415ef046d806da
44
config_hash: d117d1cbee49ad6ca09249c2f027a5bf

src/telnyx/resources/calls/actions.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,9 @@ def start_conversation_relay(
21012101
21022102
**Expected Webhooks:**
21032103
2104-
- `conversation_relay.disconnected`
2104+
- `call.conversation.ended` - Sent when the Conversation Relay session ends. If
2105+
the customer WebSocket disconnects, the webhook payload `reason` is
2106+
`customer_disconnect`.
21052107
21062108
Args:
21072109
conversation_relay_url: WebSocket URL for your Conversation Relay server. Must start with `ws://` or
@@ -5939,7 +5941,9 @@ async def start_conversation_relay(
59395941
59405942
**Expected Webhooks:**
59415943
5942-
- `conversation_relay.disconnected`
5944+
- `call.conversation.ended` - Sent when the Conversation Relay session ends. If
5945+
the customer WebSocket disconnects, the webhook payload `reason` is
5946+
`customer_disconnect`.
59435947
59445948
Args:
59455949
conversation_relay_url: WebSocket URL for your Conversation Relay server. Must start with `ws://` or

src/telnyx/types/call_conversation_ended.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ class Payload(BaseModel):
4545
llm_model: Optional[str] = None
4646
"""The large language model used during the conversation."""
4747

48+
reason: Optional[str] = None
49+
"""Reason the conversation ended.
50+
51+
For Conversation Relay, `customer_disconnect` indicates that the customer
52+
WebSocket disconnected.
53+
"""
54+
4855
stt_model: Optional[str] = None
4956
"""The speech-to-text model used in the conversation."""
5057

0 commit comments

Comments
 (0)