Record and Transcribe Calls

Record a call with startRecording@v2, get the transcript when it is ready, extract the intent with llm@v1 (no API key needed) and push everything to your platform.

👍

One action records the whole conversation. When the recording and its transcript are ready, your scenario runs again with the transcript in hand: push it to your CRM, email a summary, or ask an LLM what the call was about.

⚙️ How It Works

  1. startRecording@v2 starts recording the call. It returns immediately: the next actions run while the call is recorded.
  2. The recording stops when the call ends (or when stopRecording@v2 runs).
  3. Callr builds the recording file and, if enabled, its transcript.
  4. The actions listed in events.ready run after the call, with the recording, chat and chat_text variables available.
📘

events.ready runs offline, after the caller has hung up. It accepts the same actions as the hangup branch: fetch@v3, llm@v1, email@v1, sms@v1, javascript@v1, log@v1… but no audio action.


🚀 Record a Forwarded Call

Announce the recording, record, forward the call. When the recording is ready, push it to your server.

description: Record a forwarded call and push the recording to my server

compat:
  version: "2025-09-01"

defaults:
  language: en-US

variables:
  $url: https://api.example.com/callr/recordings
  $dial: null

branches:
  inbound-call:
    actions:
      - action: play@v3
        params:
          tts:
            text: This call may be recorded for quality purposes.

      - action: startRecording@v2
        params:
          transcription:
            enabled: true
            language: en-US
        events:
          ready:
            - action: fetch@v3
              params:
                url: ${{ $url }}
                method: POST
                headers:
                  content-type: application/json
                body: |
                  {
                    "call": ${{ JSON.stringify(call) }},
                    "recording": ${{ JSON.stringify(recording) }},
                    "transcript": ${{ JSON.stringify(chat_text) }}
                  }

      - action: dial@v2
        params:
          targets:
            - number: "+33199001020"
              timeout: 30
        result: $dial

      - action: hangup@v1

📦 What You Get in events.ready

VariableContent
recordingThe Recording object of the REST API: sid, url (MP3), duration, size, callee, caller, transcription…
chatThe transcript as a list of turns: { from: leg_a or leg_b, display: "…", offset }, in conversation order
chat_textThe same transcript as plain text, ready for an LLM prompt
transcription_leg_aWords spoken by the caller (leg A) only
transcription_leg_bWords spoken by the called party (leg B) only

The full recording object is documented in Pre-defined Variables. Recordings are also listed, downloaded and deleted with the Recordings API.

ℹ️

A transcript is generated for each feed (leg A, leg B). chat merges them in conversation order.


✨ Extract the Intent with llm@v1

Transcripts are long and nobody reads them. Ask an LLM for the few fields your business cares about: intent, outcome, next step. llm@v1 asks an AI model with no API key needed (Callr bills the tokens per model: see the AI section of your rates, Billing > Pricing in the Console), and jsonSchema forces a JSON answer of the shape you describe, ready in $ai.json to push as-is. The default model of your account answers (Account > Preferences); add model: to choose another one, for example claude-sonnet-5-5, gpt-6.1-terra or mistral-large-latest. Your own contract with another provider? Call its API with fetch@v3 and keep its key in a secret of the account (Secrets button of the Actions page): authorization: Bearer ${{ secrets.NAME }}.

description: Record, transcribe, extract the intent with Callr AI and push to my CRM

compat:
  version: "2025-09-01"

defaults:
  language: en-US

variables:
  $url: https://api.example.com/callr/calls
  $dial: null
  $ai: null
  $intent: null

branches:
  inbound-call:
    actions:
      - action: play@v3
        params:
          tts:
            text: This call may be recorded for quality purposes.

      - action: startRecording@v2
        params:
          transcription:
            enabled: true
            language: en-US
        events:
          ready:
            # 1. Ask the AI: no API key needed, Callr bills the tokens.
            #    The default model of your account answers (Account > Preferences),
            #    add model: claude-sonnet-5-5 to choose another one.
            - action: llm@v1
              params:
                system: You classify phone calls to a company, from their transcript. Give the intent of the call (sales, support, billing or other), a one-sentence summary and whether the caller needs a callback.
                prompt: ${{ chat_text }}
                jsonSchema:
                  type: object
                  additionalProperties: false
                  required: [intent, summary, callback_needed]
                  properties:
                    intent:
                      type: string
                      enum: [sales, support, billing, other]
                    summary:
                      type: string
                      description: One sentence
                    callback_needed:
                      type: boolean
                timeout: 60
              result: $ai

            # 2. Read the answer, with a fallback if the AI failed
            - action: javascript@v1
              params:
                code: |
                  $intent = ($ai?.ok && $ai?.json) || { error: $ai?.error || "no answer" }

            # 3. Push the call, the recording and the intent
            - action: fetch@v3
              params:
                url: ${{ $url }}
                method: POST
                headers:
                  content-type: application/json
                body: |
                  {
                    "call": ${{ JSON.stringify(call) }},
                    "recordingUrl": ${{ JSON.stringify(recording.url) }},
                    "duration": ${{ JSON.stringify(recording.duration) }},
                    "intent": ${{ JSON.stringify($intent) }}
                  }

      - action: dial@v2
        params:
          targets:
            - number: "+33199001020"
              timeout: 30
        result: $dial

      - action: hangup@v1

Your server receives something like:

{
  "call": { "fromNumber": "+33639980042", "toNumber": "+33939140303", "...": "..." },
  "recordingUrl": "https://media.callr.com/recordings/<ACCOUNT-SID>/<RECORDING-SID>.mp3",
  "duration": 184,
  "intent": {
    "intent": "support",
    "summary": "The caller cannot log in since the last update and wants a password reset.",
    "callback_needed": true
  }
}
💡

Ask several questions at once and get a richer object: see Extract Call Data with AI for a complete, email-based version with a list of questions.


🎚️ Options

ParameterDefaultDescription
feedsallWhat to record: all (both parties), leg_a (caller only), leg_b (called party only).
transcription.enabledtrueGenerate a transcript.
transcription.languagedefaults.languageLanguage of the conversation (en-US, fr-FR…). Improves accuracy.
🚧

Recording a call is regulated in most countries: announce it, and check what applies to you and to the called party. Recordings contain personal data: delete them with the Recordings API when you no longer need them.


💡 Going Further

  • Voicemail messages: to record a message rather than a conversation, use record@v1 + saveRecordingFile@v1. See Voicemail & Answering Machine Detection.
  • Email the summary: replace fetch@v3 with email@v1 in events.ready, with ${{ $intent.summary }} in the body.
  • Record outbound calls too: startRecording@v2 works the same in an answerOnBranch branch of a Broadcast Call.
  • Push to Excel, Google Sheets, HubSpot…: see Push Data to Your Platform.

Did this page help you?