/** * Campaign outbound that starts on the 200 OK (`outboundCallMode: 'on_answer'`). * * This is the default: omit the second argument of `defineScript` and you get * the same timing. The host dials first and holds the script until answer. * Busy / no-answer / 4xx never reach this handler. * * Talk on `channel`. Do not `makeCall()` the campaign number — the host * already did. Billing stays on the 200 OK. */ import { defineScript, getScriptPhase } from '@voctiv/agent-sdk'; export default defineScript(async ({ channel, context }) => { // Live outbound: always 'online'. Headless before_call / after_call_* still apply. if (getScriptPhase(context) !== 'online') return; await channel.audio.say('Hello!'); });