Making Your First Call: Complete Walkthrough
A detailed step-by-step guide to creating your first AI-powered call, from agent creation to call analysis. Perfect for users who want to understand every aspect of the process.
What You'll Build
In this tutorial, you'll create a customer service agent that can handle basic inquiries, make a live test call, and analyze the results to improve future interactions.
You'll Learn:
- ✓ Advanced agent configuration
- ✓ Phone number formatting
- ✓ Call monitoring techniques
- ✓ Performance analysis
- ✓ Troubleshooting common issues
Prerequisites:
- • Active Kalem account
- • Basic familiarity with APIs
- • Phone number for testing
- • 15 minutes of focused time
Phase 1: Designing Your Agent
Understanding Agent Roles
Before creating your agent, it's important to define its role and capabilities. Let's design a customer service agent for a fictional company.
🏢 Company Context
- • Company: "TechFlow Solutions"
- • Service: Software consulting
- • Goal: Follow up on demo requests
- • Tone: Professional but friendly
🤖 Agent Capabilities
- • Schedule follow-up meetings
- • Answer basic questions
- • Collect feedback
- • Qualify leads
🎯 Conversation Goals
- • Confirm demo interest
- • Understand timeline
- • Gather requirements
- • Schedule next steps
Complete Agent Instructions
You are Sarah, a customer success representative from TechFlow Solutions, calling to follow up on a recent demo request for our software consulting services.
INTRODUCTION:
"Hi, this is Sarah from TechFlow Solutions. I'm calling about your recent inquiry regarding our software consulting demo. Do you have a couple of minutes to chat?"
KEY OBJECTIVES:
1. Confirm their continued interest in our services
2. Understand their specific needs and timeline
3. Gather project requirements and budget range
4. Schedule a detailed demo or consultation call
CONVERSATION FLOW:
- Always start with the introduction above
- If they're interested, ask: "What specific challenges are you looking to solve with software consulting?"
- Follow up with: "What's your timeline for implementing a solution?"
- If appropriate, ask: "What's your budget range for this project?"
- Close with scheduling: "I'd love to set up a detailed demo. What days work best for you?"
HANDLING OBJECTIONS:
- If busy: "I understand you're busy. Would there be a better time for me to call back?"
- If not interested: "I understand. May I ask what changed since your initial inquiry?"
- If already found solution: "That's great! How has that been working for you?"
IMPORTANT GUIDELINES:
- Keep the conversation natural and conversational
- Listen actively and respond to their specific comments
- Don't rush through questions - let them talk
- Be empathetic if they express concerns or challenges
- Maximum call duration: 4 minutes
- If they want detailed technical info, offer to connect them with a specialist
- Always end professionally: "Thank you for your time. Have a great day!"
VOICE & TONE:
- Speak clearly and at a moderate pace
- Sound genuinely interested in helping
- Be professional but not robotic
- Show enthusiasm when they express interest
- Remain patient and understanding throughout
Phase 2: Creating Your Agent
Step-by-Step Agent Creation
1. Basic Agent Information
2. Advanced Configuration
Prevents calls from running too long
Comfortable listening pace
3. Test Configuration Before Saving
Before saving your agent, use the voice preview feature to ensure the voice and tone match your expectations.
"Hi, this is Sarah from TechFlow Solutions. I'm calling about your recent inquiry regarding our software consulting demo. Do you have a couple of minutes to chat?"
Phase 3: Making Your First Call
Preparing Your Phone Number
Proper phone number formatting is crucial for successful calls. The Kalem API requires numbers in E.164 international format.
Correct Formats
Common Mistakes
Quick Conversion Guide
US/Canada: Remove formatting, add +1 → +1234567890
UK: Remove leading 0, add +44 → +44207123456
Australia: Remove leading 0, add +61 → +61298765432
Making the API Call
Complete API Request Example
curl -X POST "https://kalem.me/api/v1/call" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "X-Request-ID: first-call-$(date +%s)" \
-d '{
"agent_id": YOUR_AGENT_ID,
"to": "+1234567890",
"from": "+1987654321",
"record": true,
"webhook_url": "https://your-domain.com/webhook/calls",
"metadata": {
"campaign": "first_call_tutorial",
"source": "documentation",
"test_call": true
}
}'
Node.js Implementation
const axios = require('axios');
async function makeFirstCall() {
const callData = {
agent_id: YOUR_AGENT_ID, // Replace with your actual agent ID
to: '+1234567890', // Replace with your phone number
from: '+1987654321', // Optional: your caller ID
record: true,
webhook_url: 'https://your-domain.com/webhook/calls', // Optional
metadata: {
campaign: 'first_call_tutorial',
source: 'documentation',
test_call: true,
timestamp: new Date().toISOString()
}
};
try {
console.log('🚀 Initiating call...');
console.log('📞 Calling:', callData.to);
console.log('🤖 Using agent ID:', callData.agent_id);
const response = await axios.post('https://kalem.me/api/v1/call', callData, {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Content-Type': 'application/json',
'X-Request-ID': `first-call-${Date.now()}`
},
timeout: 10000 // 10 second timeout
});
const call = response.data.data;
console.log('✅ Call initiated successfully!');
console.log('📋 Call Details:');
console.log(` • Call ID: ${call.id}`);
console.log(` • Status: ${call.status}`);
console.log(` • Agent: ${call.agent_id}`);
console.log(` • To: ${call.to}`);
console.log(` • Created: ${call.created_at}`);
// Monitor call status
await monitorCall(call.id);
return call;
} catch (error) {
console.error('❌ Error making call:');
if (error.response) {
// API returned an error response
console.error(` • Status: ${error.response.status}`);
console.error(` • Message: ${error.response.data.message}`);
if (error.response.data.errors) {
console.error(` • Errors:`, error.response.data.errors);
}
} else if (error.request) {
// Request was made but no response received
console.error(' • No response received from API');
console.error(' • Check your internet connection and API endpoint');
} else {
// Something else happened
console.error(` • Error: ${error.message}`);
}
throw error;
}
}
async function monitorCall(callId) {
console.log('👀 Monitoring call status...');
for (let i = 0; i < 10; i++) { // Check status 10 times
try {
await new Promise(resolve => setTimeout(resolve, 3000)); // Wait 3 seconds
const response = await axios.get(`https://kalem.me/api/v1/call/${callId}`, {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const call = response.data.data;
console.log(` 📊 Status update: ${call.status}`);
if (['completed', 'failed', 'no_answer', 'busy'].includes(call.status)) {
console.log('🏁 Call finished!');
console.log(` • Final status: ${call.status}`);
if (call.duration) {
console.log(` • Duration: ${call.duration} seconds`);
}
if (call.recording_url) {
console.log(` • Recording: ${call.recording_url}`);
}
break;
}
} catch (error) {
console.error(` ⚠️ Error checking status: ${error.message}`);
}
}
}
// Run the function
makeFirstCall()
.then(call => {
console.log('🎉 Tutorial completed successfully!');
console.log(`Visit your dashboard to review call ID: ${call.id}`);
})
.catch(error => {
console.error('💥 Tutorial failed. Please check the errors above.');
});
💡 Pro Tip: Real-time Monitoring
While the API call initiates the call, you can monitor its progress in real-time through:
- • Dashboard: Live status updates in the calls section
- • API: Polling the GET /call/{id} endpoint
- • Webhooks: Real-time status notifications (advanced)
Phase 4: Analyzing Your Call
Dashboard Analysis Tools
🎧 Call Recording Review
- • Listen to the full conversation
- • Note the agent's tone and pacing
- • Identify areas for improvement
- • Check for natural conversation flow
📝 Transcript Analysis
- • Review conversation accuracy
- • Check for missed cues or responses
- • Analyze sentiment and engagement
- • Identify successful conversation patterns
📊 Key Performance Metrics
Optimization Recommendations
🔧 Common Optimization Areas
Agent Instructions
- • Make instructions more specific
- • Add handling for common objections
- • Include pronunciation guides
- • Refine conversation goals
Voice Settings
- • Adjust speech rate if too fast/slow
- • Try different voice personalities
- • Fine-tune pause durations
- • Optimize interruption handling
📋 Post-Call Action Items
Troubleshooting Common Issues
📞 Call Not Connecting or Failing
Common Causes:
- • Incorrect phone number format
- • Invalid agent ID
- • Insufficient account balance
- • Network connectivity issues
Solutions:
- • Verify E.164 format (+1234567890)
- • Check agent ID in dashboard
- • Review billing section for credits
- • Test API connectivity first
🎵 Poor Audio Quality or Robotic Voice
Optimization Steps:
- Try different voice personalities in agent settings
- Adjust speech rate (0.8x - 1.2x recommended range)
- Enable enhanced audio processing
- Add natural pauses in agent instructions using commas and periods
- Use conversational language rather than formal business speak
🤖 Agent Not Following Instructions Properly
Instruction Optimization:
- • Be more specific with instructions
- • Use clear, direct language
- • Break complex instructions into smaller steps
- • Provide examples of desired responses
- • Test with shorter, focused conversations first
🎯 Next Steps & Advanced Features
Congratulations! You've Made Your First Call
You now have hands-on experience with the complete Kalem workflow. Here's what to explore next: