Skip to content

Demo API App

Overview

The Demo API app serves as an educational app for understanding how Call Telemetry apps integrate with the policy engine. This simple app returns static data consistently, allowing you to focus on learning the app workflow and policy integration patterns without external dependencies.

This app supports both real-time and post-call processing modes, making it ideal for testing your Call Telemetry infrastructure and validating app integration with your call policies.

Prerequisites

App Functionality

The Demo API app is simple and static. It does not make external API calls, process call data, or perform complex operations. It returns the same static response every time, which serves as a testing tool:

  • Policy Testing: Validates that your app pipeline is functioning correctly
  • Apps Learning: Demonstrates basic app structure without external complexity
  • Baseline Testing: Provides consistent behavior for testing Call Telemetry updates or configuration changes

Setting Up the Demo API App

This assumes you have a working Call Telemetry installation with CURRI API integration. If you haven't set that up yet, please refer to the Call Telemetry Setup Guide.

Create the App

  • From the sidebar, expand Policies.
  • Click on Apps.
  • Select the Demo API app from the catalog.
  • Choose Demo API under either the Realtime or Post Call tab.
  • Click Create App to create a new App.

Configure Your App

Fill in the basic details:

  • Name: The name should be a slug format like demo_api_test
  • Description: Whatever helps you remember what this is for
  • Enabled: Make sure this is checked

The configuration is empty because this app does not require any parameters.

  • Click Save to create the app.

Create or Select a Call Policy

Before associating your app, you need a policy configured with Cisco CallManager. If you haven't created policies before, review the Policy Configuration Guide for detailed steps.

  1. Navigate to Policies -> Policies from the sidebar.
  2. Select an existing policy that's registered with your Cisco CallManager, or create a new one.

Create a Policy Rule

Rules define when your app will execute based on call patterns:

  1. Within your selected policy, you can use the default rule, but for this we will make a specific rule. Click Add Rule.
  2. Configure the rule trigger pattern using regular expressions:
    • Use .* to match all calls for testing
    • Use specific patterns like ^1234$ to match exact numbers
  3. Give your rule a descriptive name like "Demo API Test Rule".

TIP

Reference Rule Triggers to learn more about pattern matching

Associate the Demo API App to your Rule Trigger

Connect your Demo API app to the rule so it executes during call processing:

  1. Open your newly created rule.
  2. In the Apps section, click Associate App.
  3. Select your Demo API app from the available apps list.
  4. Set the execution order (0-100) if you have multiple apps on the same rule.

App Execution Order

Apps execute in order from 0 to 100. If you're testing with just the Demo API app, the order doesn't matter. For complex workflows with multiple apps, plan your sequence carefully so that data dependencies are respected.

Testing Your Setup

Using Call Tests for Validation

Call Telemetry includes a built-in call testing feature that simulates calls without involving actual phones or CallManager routing. This allows you to validate your app and policy configuration without live traffic load, even without a CallManager connection.

  1. Navigate to Call Tests:

    • From the main dashboard, click Call Tests in the sidebar.
    • This feature simulates the exact CURRI API request/response cycle.
  2. Configure Test Parameters:

    • Calling Number: Enter a number that matches your rule pattern
    • Called Number: Enter the destination number
    • Policy: Select the policy containing your Demo API app
    • Direction: Choose the appropriate call direction (usually inbound)
  3. Execute the Test:

    • Click Run Test to simulate the call
    • The system will process your call through the policy engine
    • All associated apps will execute in the configured order

Interpreting Test Results

The Demo API app will return this consistent response structure:

json
{
  "result": "success",
  "data": {
    "name": "example data"
  },
  "debug": {
    "data": {
      "name": "example data"
    },
    "status": "200"
  },
  "message": "Got data from Demo API server.",
  "provider_message": "Host Demo Data - returned a 200."
}

Debugging and Monitoring

Call Event Logs

After running a test, you can monitor the complete call processing workflow:

  1. Event Timeline: Review the sequence of policy processing events
  2. App Execution: Verify that your Demo API app executed successfully
  3. Response Data: Examine the app response data structure
  4. Processing Time: Monitor app execution performance

Understanding App Response Fields

  • result: Always "success" for the Demo API app
  • data: Contains the static response data ({"name": "example data"})
  • debug: Internal processing information and status codes
  • message: Human-readable description of the app execution
  • provider_message: Technical status from the app provider

Troubleshooting Common Issues

App Not Executing:

  • Check that your test calling number matches the rule trigger pattern
  • Ensure the app is properly associated with the rule

No Response Data:

  • Review the call test results for any error messages

Demo API App Use Cases

Perfect for Learning

The Demo API app teaches you the essential workflow:

  1. How to create apps in Call Telemetry
  2. How to associate apps with policy rules
  3. How to test app execution
  4. What a typical app response looks like

Great for Testing Infrastructure

When you're setting up a new Call Telemetry environment or testing changes, the Demo API app gives you confidence that your basic app pipeline is working without external dependencies that might fail.

Starting Point for Real Apps

Once you understand how the Demo API app works, you can use it as a template for building real apps that do actual work.

What the Demo API does NOT Do

Let's also talk about what the Demo API app doesn't do:

  • ❌ Make external API calls
  • ❌ Process your call data
  • ❌ Change call behavior based on conditions
  • ❌ Demonstrate error handling
  • ❌ Show authentication patterns
  • ❌ Provide dynamic responses

If you need any of these capabilities, check out our other apps like CRM Integration or E911 Phone Discovery.

Moving Beyond Demo

Ready to build something real? Here's how to level up:

  1. Start with a real use case - What do you actually want to do with call data?
  2. Check out working examples - Look at our CRM Webhook integration for external API patterns
  3. Add real configuration - Replace the simple "enabled" checkbox with actual parameters
  4. Implement error handling - Real apps need to handle failures gracefully
  5. Test thoroughly - Unlike the Demo API, real apps can fail in interesting ways

The Demo API app might seem overly simple, but it's an excellent way to understand how Call Telemetry apps work before you dive into more complex integrations. Once you've got the basics down, you'll be ready to build apps that do real work with your call data.