Extract Call Data with AI

ℹ️

You can combine Callr Actions with services like OpenAI, Claude, or Mistral to extract structured insights from real phone calls — as soon as the call ends.

This enables you to:

  • Auto-summarize conversations
  • Detect the call's purpose
  • Extract key outcomes (e.g., appointment set or not)
  • Push AI-generated data to your backend or CRM
  • Send call reports via email to your team

No batch jobs — all handled live at the end of the call.

⚙️ How It Works


Step 1 – The call is recorded

The full conversation is captured for transcription and analysis.

Step 2 – Analyzed with AI

The transcript along with your questions is sent to an LLM to get structured answers.

Step 3 – Pushed to your tools

The results are delivered to your CRM, backend, or notification channels.



🧪 Example Scenario: Call Forwarding with AI Analysis

The example below shows how to:

  1. Record and transcribe the call using startRecording@v2
  2. Reformat the transcript for a clean AI prompt
  3. Send the prompt to an AI model with llm@v1 (no API key needed) and ask custom questions
  4. Store or email the AI responses
  5. Push the full dataset (transcription + AI) to your backend

This works for any Inbound Call, including those that are forwarded or answered by an AI agent.

The AI step is llm@v1: no API key needed, Callr bills the tokens per model (see the AI section of your rates, Billing > Pricing in the Console). Without model, the default model of your account answers (Account > Preferences). jsonSchema makes the answers a structured value, read in $aiResult.json.

description: >
  Call forwarding with transcriptions
  and AI-based data extraction

variables:
  $dial: null
  $aiResult: null
  $aiAnswers: {}
  $aiAnswersText: ""
  $text: ""
  $A: null
  $B: null
  $system: ""
  $prompt: ""

  # MODIFIABLE VARIABLES BELOW
  $url: null # e.g., https://api.example.com/callr
  $aiQuestions:
    - What is the reason for the call in less than 6 words?
    - What is the summary of the conversation in a few short sentences?
    - Was an appointment set up between the caller and the callee?
    - Did the caller reach voicemail?
  $dialTargets:
    - number: "+33199001020"
      timeout: 20
    - number: "+33639980010"
      timeout: 20
  $emails:
    - [email protected]
    - [email protected]

compat:
  version: "2025-09-01"

defaults:
  language: en-US
  voice: en-US-Andrew:DragonHDLatest

branches:
  inbound-call:
    actions:
      - action: play@v3
        params:
          tts:
            text: >
              Hello, this call may be recorded for statistical and security purposes.

      - action: startRecording@v2
        events:
          ready:
            - action: javascript@v1
              params:
                code: |
                  let caller = call.fromNumber
                  let callee = scenario.name
                  let text = ""

                  if ($dial?.cdr?.callee) callee = $dial.cdr.callee
                  if (!caller) caller = "The caller"
                  for (const line of chat) {
                    const who = line.from === 'leg_a' ? caller : callee
                    text += who + ": «" + line.display + " »\r\n"
                  }
                  return { $text: text, $A: caller, $B: callee }

            - action: javascript@v1
              params:
                code: |
                  const system = [
                    `You are given a transcript of a conversation between "${$A}" (caller) and "${$B}" (callee). The transcript is:`,
                    $text,
                    `Answer the following questions strictly based on this transcript. Do not add any details that are not present.`,
                    `If the transcript does not provide enough information for a question, answer with '-' only. Keep your answers short and concise.`
                  ].join('\n')
                  const prompt = '- ' + $aiQuestions.join('\n- ')
                  return { $system: system, $prompt: prompt }

            # No API key needed, Callr bills the tokens
            # The default model of your account answers, add
            # model: claude-sonnet-5-5 to choose another one
            - action: llm@v1
              params:
                system: ${{ $system }}
                prompt: ${{ $prompt }}
                jsonSchema:
                  type: object
                  additionalProperties: false
                  required: [answers]
                  properties:
                    answers:
                      type: array
                      description: "One short answer per question, in the order of the questions ('-' if unknown)"
                      items:
                        type: string
                timeout: 60
              result: $aiResult

            - action: javascript@v1
              params:
                code: |
                  $aiAnswers = {}
                  if ($aiResult?.ok && Array.isArray($aiResult?.json?.answers)) {
                    $aiResult.json.answers.forEach((answer, index) => {
                      $aiAnswers[`Q${index + 1}`] = answer
                    })
                  }
                  $aiAnswersText = $aiQuestions
                    .map((question, index) => {
                      const answerKey = `Q${index + 1}`
                      return `"${question}"\r\n\t=> ${$aiAnswers?.[answerKey] ?? '-'}`
                    }).join('\r\n')
                  if (!$aiResult?.ok) {
                    $aiAnswersText = 'AI analysis unavailable\r\n\r\n' + $aiAnswersText
                  }

            - if: $url
              action: fetch@v3
              params:
                method: POST
                url: ${{ $url }}
                headers:
                  Content-Type: application/json
                  # If your server requires a header
                  # Authorization: Bearer ${{ secrets.WEBHOOK_TOKEN }}
                body: |
                  {
                    "run": ${{ JSON.stringify(run) }},
                    "call": ${{ JSON.stringify(call) }},
                    "scenario": ${{ JSON.stringify(scenario) }},
                    "recordingURL": ${{ JSON.stringify(recording?.url) }},
                    "transcription": ${{ JSON.stringify(recording?.transcription) }},
                    "chat": ${{ JSON.stringify(chat) }},
                    "ai": ${{ JSON.stringify($aiAnswers) }}
                  }

            - if: $emails?.length > 0
              action: email@v1
              params:
                subject: Call summary from ${{ call.fromNumber }}
                text: |
                  Hello,

                  Call from ${{ call.fromNumber }}. Duration: ${{ recording.duration }}s.

                  Audio recording: ${{ recording.url }}

                  AI Analysis:
                  ${{ $aiAnswersText }}

                  Transcription:
                  ${{ $text }}

                to: ${{ $emails }}

      - action: dial@v2
        params:
          targets: ${{ $dialTargets }}
          answerOnBranch: outbound
        result: $dial

      - if: "!$dial?.ok"
        action: play@v3
        params:
          tts:
            text: Sorry, we are not available at the moment.

  outbound:
    actions:
      - action: play@v3
        params:
          tts:
            text: >
              This call may be recorded for statistical and security purposes.
      - action: bridge@v3

🔁 Customize It for Your Workflow

You can:

  • Choose the model: add model to llm@v1 (for example claude-sonnet-5-5, gpt-6.1-terra or mistral-large-latest, the models of the AI section of your rates), or call any other LLM API with fetch@v3
  • Keep any API key or token (the key of another LLM API called with fetch@v3, a webhook token) in a secret NAME of the account (Secrets button of the Actions page) and write ${{ secrets.NAME }} where it is used
  • Customize the prompt and questions to extract any data relevant to your business
  • Push data to multiple systems — CRM, Slack, Notion, analytics — all via fetch@v3
  • Send results to a manager or team with email@v1
  • It can be used with Click-to-Call and Outbound Calls too!

🏭 Use Cases by Industry

Voice AI isn't just about summarization — it's about automating insights that were previously locked inside conversations. Here's how different industries can use this scenario:


🏠 Real Estate

  • Extract property location, type (house, apartment, etc.), and budget
  • Identify if the caller is buying, renting, or selling
  • Detect urgency (e.g., "moving next month")
  • Generate a lead summary for agents automatically

Example Questions:

  • What city or area is mentioned in the call?
  • What kind of property is the caller looking for?
  • What is their estimated budget?

🏥 Healthcare

  • Extract appointment intent, preferred time, or reschedule requests
  • Detect if the call is about a new patient intake or a follow-up
  • Flag emergency language (e.g. “urgent”, “pain”, “as soon as possible”)

Example Questions:

  • Was the caller trying to book an appointment?
  • What kind of medical issue or department was mentioned?
  • Was a date or time proposed?

🧑‍⚖️ Legal Services

  • Identify case types (divorce, immigration, contract dispute, etc.)
  • Extract jurisdiction or opposing party names
  • Determine next action (e.g. sending documents, scheduling a meeting)

Example Questions:

  • What type of legal issue is being discussed?
  • Was a deadline or court date mentioned?
  • Did the caller request a consultation?

🛍️ E-commerce & Retail

  • Identify product interest or order issues
  • Capture order numbers, delivery complaints, or return requests
  • Flag escalation phrases (e.g. “I want a refund”, “this is unacceptable”)

Example Questions:

  • Is this call about an existing order?
  • Was a product name or issue mentioned?
  • Did the caller request a return, exchange, or refund?

🏦 Financial Services

  • Detect loan or account inquiries
  • Identify fraud mentions or credit card issues
  • Capture interest in insurance, investments, or mortgage refinancing

Example Questions:

  • What product or service is the caller asking about?
  • Did the caller mention a transaction or amount?
  • Was an issue with a payment, card, or loan mentioned?

📞 Contact Centers

  • Extract intent automatically from every call
  • Identify reasons for call drops or dissatisfaction
  • Classify calls by topic or urgency for downstream routing

Example Questions:

  • What is the primary reason for the call?
  • Was the issue resolved?
  • Did the caller express frustration or satisfaction?

Did this page help you?