Skip to main content

AI Features

SIPSIM offers powerful AI features to help you get more value from your calls. This guide covers call transcription and AI-generated summaries.

Required Scopes

FeatureReadWrite
Transcriptioncalls.transcription.readcalls.transcription.write
Summarycalls.summary.readcalls.summary.write
Settingssettings.readsettings.write

Call Transcription

Convert call recordings to text with speaker identification.

Trigger Transcription

To create a transcription for a call:

curl -X POST "https://app.sipsim.com/api/v2/calls/12345/transcription" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Processing Time

Transcription is processed asynchronously. For a 5-minute call, expect 30-60 seconds of processing time.

Get Transcription

Retrieve the transcription once it's ready:

curl "https://app.sipsim.com/api/v2/calls/12345/transcription" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Transcription Response

{
"status": 200,
"request_id": "...",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"speech_state": "speech_recognized",
"payload": [
{
"channel": 0,
"start": 0.0,
"end": 5.2,
"text": "Bonjour, société SIPSIM, comment puis-je vous aider ?"
},
{
"channel": 1,
"start": 5.5,
"end": 12.1,
"text": "Bonjour, j'appelle concernant ma commande numéro 12345."
}
]
}
}

Transcription Fields

FieldTypeDescription
speech_statestringState of transcription (see below)
payloadarrayArray of transcription segments

Speech States

StateDescription
speech_sent_to_recognitionTranscription is being processed
speech_recognizedTranscription completed successfully
speech_recognition_failedTranscription failed
speech_storedTranscription stored
speech_storing_failedStorage failed

Payload Segment Fields

FieldTypeDescription
channelintegerAudio channel (0 = first party, 1 = second party)
startfloatStart time in seconds
endfloatEnd time in seconds
textstringTranscribed text for this segment

Call Summaries

Generate AI-powered summaries of your calls.

Generate a Summary

curl -X POST "https://app.sipsim.com/api/v2/calls/12345/summary" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Prerequisite

A call must have a transcription before you can generate a summary. If the call doesn't have a transcription, create one first.

Get Summary

curl "https://app.sipsim.com/api/v2/calls/12345/summary" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Summary Response

{
"status": 200,
"request_id": "...",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"summary": "Customer called about order #12345. They reported a delivery delay and requested an update. The employee confirmed the order is scheduled for delivery tomorrow and offered a 10% discount for the inconvenience. Customer accepted and seemed satisfied.",
"summary_state": "processed",
"setting": {
"base_instructions": "Focus on action items and customer sentiment"
}
}
}

Summary Fields

FieldTypeDescription
summarystringAI-generated summary text (null while processing)
summary_statestringState: created, processed, failed
settingobjectSummary generation settings

Summary States

StateDescription
createdSummary generation started
processedSummary completed successfully
failedSummary generation failed

Custom Summary Instructions

You can customize how summaries are generated for a specific call:

curl -X PATCH "https://app.sipsim.com/api/v2/calls/12345/summary" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_instructions": "Focus on sales opportunities and customer objections. Include any pricing discussed."
}'

Account-Wide Summary Settings

Configure default summary instructions for all future summaries:

Get Current Settings

curl "https://app.sipsim.com/api/v2/settings/summary" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Update Settings

curl -X PATCH "https://app.sipsim.com/api/v2/settings/summary" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base_instructions": "Always include: 1) Main topic discussed, 2) Customer sentiment, 3) Action items, 4) Follow-up required (yes/no)"
}'

Complete Workflow Example

Process a call with transcription and summary:

import requests
import time

access_token = "YOUR_ACCESS_TOKEN"
base_url = "https://app.sipsim.com/api/v2"
headers = {"Authorization": f"Bearer {access_token}"}

def process_call_with_ai(call_id):
"""
Complete workflow: transcribe a call and generate a summary.
"""
# Step 1: Get call details
call_response = requests.get(f"{base_url}/calls/{call_id}", headers=headers)
call = call_response.json()["data"]

print(f"Processing call: {call_id}")
print(f" Duration: {call['duration_sec']}s")

# Step 2: Check/create transcription
trans_response = requests.get(f"{base_url}/calls/{call_id}/transcription", headers=headers)

if trans_response.status_code == 404:
print("Creating transcription...")
requests.post(f"{base_url}/calls/{call_id}/transcription", headers=headers)

# Poll for completion
for _ in range(30): # Max 2.5 minutes
time.sleep(5)
response = requests.get(f"{base_url}/calls/{call_id}/transcription", headers=headers)
if response.status_code == 200:
data = response.json()["data"]
if data.get("speech_state") == "speech_recognized":
print("Transcription complete!")
break
else:
raise TimeoutError("Transcription timeout")

# Step 3: Check/create summary
summary_response = requests.get(f"{base_url}/calls/{call_id}/summary", headers=headers)

if summary_response.status_code == 404:
print("Creating summary...")
requests.post(f"{base_url}/calls/{call_id}/summary", headers=headers)

# Poll for completion
for _ in range(12): # Max 1 minute
time.sleep(5)
response = requests.get(f"{base_url}/calls/{call_id}/summary", headers=headers)
if response.status_code == 200:
data = response.json()["data"]
if data.get("summary_state") == "processed":
print("Summary complete!")
break
else:
raise TimeoutError("Summary timeout")

# Step 4: Get final results
transcription = requests.get(f"{base_url}/calls/{call_id}/transcription", headers=headers).json()["data"]
summary = requests.get(f"{base_url}/calls/{call_id}/summary", headers=headers).json()["data"]

return {
"call": call,
"transcription": transcription,
"summary": summary
}

# Process a call
result = process_call_with_ai(12345)
print("\n=== Summary ===")
print(result["summary"]["summary"])

Best Practices

  1. Check before creating — GET the transcription/summary first; if 404, then create
  2. Implement polling — AI features are async; poll with reasonable intervals
  3. Handle timeouts gracefully — Long calls may take longer to process
  4. Use webhooks for production — Instead of polling, consider webhooks for completion notifications
  5. Customize instructions — Tailor summaries to your business needs

Next Steps