2.7 KiB
2.7 KiB
IVR Local Runbook
Use this runbook to validate both the preview IVR runtime and the live Asterisk-backed IVR staging path.
What Track 5 adds
ivr-servicefor IVR flow CRUD and DTMF runtime sessions- one active IVR flow per voice queue
routing-servicesupport forivr_session_id- admin-side IVR preview flow in
/admin
Preview baseline vs live IVR
- Preview baseline: use the
/adminIVR block to create flows, start sessions, send DTMF, and preview route overrides without telephony. - Live Asterisk IVR: call
7200on the lab PBX afterasterisk-bridge-serviceis configured withASTERISK_IVR_FASTAGI_*and the flow nodes have validprompt_audio_keyvalues.
Create a flow
- Open
http://localhost:8080/admin - Go to the
IVRblock - Set:
queue_identry_node_id(root)flow_json
- Click
Create flow
The flow JSON is validated before it is saved.
Start a session
- In the same
IVRblock, set:call_idqueue_id- optional
interaction_id
- Click
Start session
The response returns:
session_idcurrent_node_id- current node prompt metadata
Send DTMF
- Enter a single digit (
0-9) - Click
Send DTMF
If the transition reaches a terminal node:
- the session becomes
completed outcome_codeis setresolved_queue_idis setresolved_queue_codeis set- a
voice_eventwithevent_type="ivr.completed"is written
Preview route override
- Keep the completed
session_id - Click
Preview IVR route
This calls routing-service with ivr_session_id and shows:
original_queue_idresolved_queue_idivr_outcome_code
Demo seed
scripts/prepare_demo.ps1 now seeds:
- one demo IVR flow
- one completed demo IVR session
- one route preview stored in
.local_stack/demo-seed-summary.json
Backstage fields:
ivr_flow_idivr_session_idivr_outcome_codeivr_resolved_queue_id
Live Asterisk smoke
- Enable:
ASTERISK_BRIDGE_ENABLED=1ASTERISK_IVR_FASTAGI_ENABLED=1IVR_RUNTIME_TRUSTED_SERVICE_SUBJECTS=svc:asterisk-bridge
- Make sure
ASTERISK_QUEUE_MAP_JSONcontainsvoice_lab_ivr. - Provision the
prompt_audio_keysound files in Asterisk. - Call
7200and verify:- DTMF completes the IVR and transfers through
mvpcc-transfer - silence triggers
ivr.step.no_input - retry exhaustion abandons the IVR session and falls back to the human baseline
- DTMF completes the IVR and transfers through
Troubleshooting
404 No active IVR flow for queue- create or activate a flow for the target queue first
400 Digit must be a single character 0-9- send exactly one DTMF digit
400 IVR session is not completedon route preview- finish the session with a terminal node before previewing routing