Webhook Overview
access911 integrates with ElevenLabs AI voice agents to process real emergency calls. The webhook system captures call transcripts, extracts emergency metadata, and stores the information in AWS services for real-time dashboard updates.ElevenLabs Configuration
Voice Agent Setup
- Create ElevenLabs Account: Sign up at ElevenLabs
- Create AI Voice Agent: Set up a voice agent for emergency call handling
- Configure Data Collection: Set up fields to collect emergency metadata
- Set Webhook URL: Point webhook to DispatchAI endpoint
Data Collection Fields
Configure your ElevenLabs agent to collect these fields during calls:Webhook Endpoint
Endpoint URL
Webhook Configuration
Set up your ElevenLabs agent webhook with these settings:- Event Type:
post_call_transcription - Method: POST
- Content-Type: application/json
- Secret: Optional webhook secret for verification
Webhook Payload
Incoming Webhook Structure
Webhook Processing
The webhook handler processes incoming calls:Data Storage
DynamoDB Storage
Emergency calls are stored in DynamoDB with this structure:S3 Storage
Full webhook payloads are stored in S3 for audit and analysis:Security
Webhook Signature Verification
Optional webhook signature verification for security:Environment Variables
Configure these environment variables:Error Handling
Webhook Error Responses
The webhook handler returns appropriate HTTP status codes:- 200 OK: Webhook processed successfully
- 400 Bad Request: Invalid webhook payload
- 401 Unauthorized: Invalid webhook signature
- 500 Internal Server Error: Processing error
Error Logging
Comprehensive error logging for debugging:Testing
Local Testing
Test webhook integration locally:Webhook Validation
Validate webhook configuration:Monitoring
Webhook Metrics
Monitor webhook performance:- Incoming Requests: Number of webhook requests received
- Processing Time: Time to process each webhook
- Success Rate: Percentage of successfully processed webhooks
- Error Rate: Number of failed webhook processing attempts
Dashboard Updates
Webhook processing triggers real-time dashboard updates:- Call Appears: New emergency call appears on map
- Status Updates: Call status updates in real-time
- Queue Updates: Call queue refreshes automatically
- History Updates: Call history updates immediately
Best Practices
Security
Security
Always use webhook signature verification in production environments.
Performance
Performance
Process webhooks quickly to ensure real-time dashboard updates.
Data Integrity
Data Integrity
Store both summarized and full payload data for audit trails.
Monitoring
Monitoring
Monitor webhook performance and error rates continuously.
Troubleshooting
Common Issues
Webhook Not Receiving
Webhook Not Receiving
Check ElevenLabs webhook configuration and endpoint URL.
Storage Issues
Storage Issues
Verify AWS credentials and DynamoDB/S3 permissions.
Slow Processing
Slow Processing
Check Lambda function timeout and memory configuration.
Signature Errors
Signature Errors
Verify webhook secret configuration and signature format.
Production Use: Ensure proper security configuration and monitoring before deploying to production emergency response systems.