---
title: More on Passthru Applet
slug: exotel-agentstream/more-on-passthru-applet
docTags: 
createdAt: 2025-09-27T08:48:26.784Z
---

### Best Practices

- Position Passthru immediately after Stream or Voicebot Applets.
- Backend should handle both flat and JSON query formats.
- Trigger fallback based on Stream\[DetailedStatus].
- Actively monitor concurrency limits.
- Log StreamSID, RecordingUrl, and detailed errors for debugging and auditing.
- Clearly interpret and handle disconnect causes (DisconnectedBy).
- Passthru backend responses must comply with synchronous (HTTP codes) or asynchronous processing models appropriately.

**Use Cases**

- Real-time monitoring of stream health
- Dynamic routing based on real-time stream conditions
- Enhanced debugging through detailed error reporting
- Optimised concurrency and call management
- Graceful error handling and escalation mechanisms

### Deployment Strategy

Follow structured rollout:

1. **Dev Environment**: Validate passthru logic with mock logs.
2. **QA/Staging**: Test real call scenarios thoroughly.
3. **Canary Release (Prod)**: Roll out feature gradually, monitoring closely.
4. **Full Release**: Expand to all users upon successful canary release.

Ensure rollback capabilities via feature flags and previous stable versions.

### Summary

The Passthru Applet for AgentStream significantly enhances standard passthru functionality by providing extensive stream metadata, failure reasons, and real-time observability. Leverage these capabilities to:

- Monitor and optimize streaming performance
- Facilitate precise error handling and debugging
- Enable intelligent and dynamic routing decisions

Implement these advanced passthru mechanisms to build robust, observable, and scalable voice-streaming integrations with Exotel APIs.
