make-call.ts — tsimport { Firetell } from '@firetell/firetell-node-sdk';​const firetell = new Firetell({domain: 'yourcompany.firetell.app',secretKey: process.env.FIRETELL_SECRET_KEY!,});​const call = await firetell.calls.make({from: { number: '+14155550100', name: 'Order Alerts' },to: { number: '+12125550123', name: 'John Doe' },actions: [{ action: 'tts', params: { text: 'Your package #FT10294 is arriving shortly.' } },{ action: 'connect_team', params: { team_id: 'team_customer_care', timeout: 30 } },],});
| Action | Purpose | Typical Trigger |
|---|---|---|
| play | Play an uploaded workspace audio file | Compliance notices & greetings |
| tts | Speak dynamic text via Text-to-Speech | OTP codes & custom alerts |
| ivr | Collect DTMF keypad input from callers | Menu branching & confirmation |
| to_operator | Forward call to an external PSTN number | Number masking & external escalation |
| connect_agent | Ring a specific workspace agent | Dedicated account owner routing |
| connect_team | Ring an agent queue by team_id | VIP support & sales queues |
| connect_voice_agent | Hand conversation to Firetell AI Voice Agent | 24/7 autonomous CS & scheduling |
| connect_sip | Ring a configured SIP account / desk phone | Office hardware extensions |
| recording | Capture dual-channel call recording | Auditing & Zero-Retention backup |
| voicemail | Route caller to voicemail recording | After-hours message drop |
| stream | Fork 16-bit LE PCM audio over WebSocket | Custom AI bots & real-time analytics |
| disconnect | Terminate the call cleanly with SIP cause | End sequence after playback |
| Webhook Event | When Firetell Dispatches It |
|---|---|
| call.created | When a new inbound or outbound call enters the system |
| call.answered | When the called party or action answers the channel (ACTIVE) |
| call.ended | On hangup or failure, including duration, status, and hangup cause |
| call.recording.ready | When MP3 processing finishes, delivering a 2-hour presigned S3 URL |
| call.transcription.completed | When dual-channel transcript lines and extracted entities finish |
| message.received | Immediately when an inbound SMS or MMS hits your number |