Repository navigation
Add the Let callers leave voicemail guide - #992
Devon-White wants to merge 2 commits into
Conversation
Cover straight-to-voicemail and forward-then-voicemail on SWML (served by the Server SDKs), Relay, cXML, and Call Flow Builder, and how each delivers the recording's URL. Link machine detection for leaving a message on an outbound call. Add the voice overview card and the root llms.txt entry.
|
Nice work, Devon. The SWML and Relay content holds up. I checked the fields, defaults, event states, and SDK calls and found one small bug. The two things I'd change before merging are structural. The cXML approach should come off this page, and the page should use the approach-first headings that the sibling voice guides use. Structure and conventions1. Drop cXML from the page. The platform voice guides stay SWML-native, and none of the other capability guides in
The cXML assignment step is also the only place the page shows the Server SDKs and a 2. Use approach-first headings, not tabs per approach. "Choose an approach" sets the page up as approach-first. The rule for that layout is one Suggested outline: Rewrite the "Choose an approach" paragraph (lines 44-46) to match: "pick one and follow only its section", as Technical3. The Python SWML status handler can raise on an error event (lines 174 and 726). The state = params.get("state")
if state == "finished":
print(f"New voicemail on call {params['call_id']}: {params['url']} ({params['duration']} s)")
elif state == "no_input":Everything else I checked is right:
Other4. Link the new guide from its siblings. The rule's "Ships with the page" list asks for this. 5. First-mention links. "Resource" (line 45) should link to 6. Please run the Call Flow Builder flow once in the Dashboard. I couldn't check the node's runtime behavior. The Voicemail Recording reference opens with "This node uses the asynchronous recording method". If that were true, the goodbye node would play during the message, not after it. The same page's example says the nodes after it run once the caller finishes, so the reference probably just contradicts itself. Still, a test call that confirms the goodbye plays after Nav, links, and anchors are fine. The voice folder is folder-driven, so no yml change is needed. Every link definition and |
- Remove the cXML approach: link definitions, approach bullet, settings column, the three cXML tabs, troubleshooting bullet, table row, Record verb card, and cXML in the description (page and llms.txt). - Replace per-step approach tabs with one section per approach (SWML, WebSocket (Relay), Call Flow Builder), each with the same two tasks. - Read the SWML status event's state with params.get so a calling.error event doesn't raise in the Python handlers. - Link Resource and WebSocket (Relay) on first mention.
Closes #903
Refs #765
Summary
/docs/platform/voice/voicemail), concept-first with one tab per approach inside each step, in SDK-first order: SWML served by the Server SDKs, WebSocket (Relay), cXML, Call Flow Builder.connect'sresultbranch, Relay usescalling.call.connectevents, and cXML uses the<Dial>actionwithDialCallStatus.fern/llms.txtbullet after Forward calls, using the page's description.Behavior verified against source
record:terminators#,beepfalse,end_silence_timeout5 s,initial_timeout4 s. These match therecordreference.status_urlpostscalling.call.recordevents with statesrecording, thenfinishedorno_input.no_input.record_urlis set even when nothing was captured, which is why the guide tells readers to check the event state.playanswers the call by default.connect:connect_resultisconnectedorfailed.resultgiven as an object runs as aswitchonconnect_result. The guide covers both cases so no "no matching case" warning fires.calling.recordaudio whitelist includesbeep,initial_timeout,end_silence_timeout,max_length, andterminators.signalwire-sdkand@signalwire/sdkare both 3.15.3):call.record()returns aRecordAction.wait()resolves onfinishedorno_input, and the event params carryurlandduration.play_tts/playTTS,connect, andConnectEvent.connect_statematch the samples.SWMLService.as_router()/getApp()is used.phone_numbers.set_cxml_webhook/setCxmlWebhooksetscall_handler: laml_webhooksandcall_request_url.<Record>withoutactionre-requests the current document, so the caller hears the greeting again. Every sample setsaction.actionrequest carriesRecordingUrl,RecordingDuration, andDigitsplus the call's standard parameters. For an empty recording it carries noRecordingUrl.<Dial>withoutactioncontinues to the next verb whatever the outcome.DialCallStatusiscompleted,busy,no-answer, orfailed.actionURLs resolve against the current document's URL.%{record_url}come from the existing node reference pages.Notes for reviewers
<Dial>continues to the next verb after a completed call too. A<Record>withoutactionloops back to the greeting. Both cXML samples are small FastAPI and Hono servers rather than a hosted cXML script.set_cxml_webhook, orPUTphone number. I couldn't confirm the Dashboard labels for assigning a cXML webhook, so the Dashboard steps aren't shown for cXML. The cXML entry route accepts GET and POST, so it works whichever request method the number uses.call.record()type gap. The type doesn't listmax_length, though the backend accepts it. The TypeScript Relay samples pass the audio settings through a variable, as the Record calls guide does, with a comment.actionrequest or SWMLrecord_urlis available. The guide tells SWML readers to rely on thefinishedevent.RecordingUrl. The verification step only promisesNo messagefor SWML and Relay.initial_timeout, so the guide doesn't map or set it.regular voicemailfor Detect machines, so the new card usesregular inbox.fern-checkfails only on "Missing redirects check skipped: could not reach FDR (FDR returned 403)". This is environmental.Verification
pyflakes.calling.call.recordPOSTs print the URL./incoming,/dial-result(no-answerandcompleted), and/recorded, with and withoutRecordingUrl.tsc --strictagainst@signalwire/sdk3.15.3. The SWML and cXML servers also ran locally with the same checks as Python.tsx.bash -n.slug:, and every#anchorchecked against the target heading.yarn fern-md-checkpasses.yarn fern-checkfails only on the FDR 403 above.Preview