# Stop Runaway Calls: Set a Max Call Duration on Your AI Voice Agent's SIP Trunk

> Set a max call duration on your SIP trunk so a stuck AI voice agent can't run up minutes. Why runaway calls happen, how to choose a limit, and how to set it per trunk on Edesy, up to 60 minutes.

Source: https://edesy.in/blog/sip-trunk-max-call-duration-ai-voice-agent-2026

**A max call duration is a cap on how long one call through your SIP trunk may last; when a call hits it, the trunk ends the call for both sides.** For an AI voice agent it is the last line of defence against runaway calls: a bot loop, a voicemail the agent keeps talking to, or a hang-up that never gets sent. On Edesy you set it per trunk, in minutes, up to the platform maximum of 60 minutes.

> **Set it now:** [Open your trunk in the Voice app](https://voice-app.edesy.in/?utm_source=edesy.in&utm_medium=blog&utm_campaign=sip-trunk-max-call-duration-ai-voice-agent-2026) and fill in the Call limits card.

## How runaway calls happen

A human agent hangs up when the conversation is over. A voice agent hangs up only when its code tells it to. When that signal doesn't come, the call carries on, and every extra minute is billed.

| Cause | What it looks like | How long it can run |
|---|---|---|
| Bot talks to bot | Your agent calls a number answered by another IVR or assistant, and they keep prompting each other | Until something cuts it |
| Voicemail loop | The agent treats a voicemail greeting as a person, waits, re-prompts, waits again | Until the voicemail system gives up |
| Silence handling bug | The caller has gone, but the line stays open and the agent keeps asking "Are you still there?" | Until a timeout, if there is one |
| Lost hang-up | Your agent platform crashes or loses its connection mid-call and never sends the end of call | Until the other side hangs up |
| Hold music | The callee puts the agent on hold and forgets | As long as the hold lasts |

Each one is rare. Across thousands of calls a day, rare happens every day. One forgotten 60-minute call costs more than a hundred normal 30-second ones.

## Why set the cap on the trunk, not only in the agent

Most voice agent platforms have their own maximum call length, and you should set it. But that limit lives in the same software that may be the thing failing. If the agent process crashes or loses its media connection, its own timer goes with it.

A trunk-level limit is enforced by the telephony side, independent of your agent. It works the same whether you run a hosted voice agent platform, your own stack, or a PBX.

| Where the limit lives | Survives an agent crash? | Covers every platform on the trunk? |
|---|---|---|
| Agent prompt or flow ("end after N turns") | No | No |
| Agent platform's max call length | No, if the platform is the problem | Only that platform |
| SIP trunk max call duration | Yes | Yes, every call through the trunk |

Use both: the agent's limit for normal behaviour, the trunk's limit as the backstop.

## Choosing the limit

Pick a number a little above your longest **normal** call. Look at your call logs for the 99th-percentile duration, or just the longest calls you consider healthy.

| Agent's job | Typical call | Suggested trunk limit |
|---|---|---|
| COD or order confirmation | Under 1 minute | 5 minutes |
| Appointment booking or reminder | 2 to 5 minutes | 10 to 15 minutes |
| Lead qualification | 3 to 8 minutes | 15 to 20 minutes |
| Customer support | 5 to 15 minutes | 30 minutes |
| Long consultations | Up to an hour | Leave at 60 (platform maximum) |

If different agents need very different limits, give them separate trunks. Limits are per trunk.

## How to set it on Edesy

1. Open the trunk in the [Voice app](https://voice-app.edesy.in/?utm_source=edesy.in&utm_medium=blog&utm_campaign=sip-trunk-max-call-duration-ai-voice-agent-2026).
2. Find the **Call limits** card.
3. Enter **Maximum call duration (minutes)**, a whole number from 1 to 60.
4. Save. Leave it empty to use the platform maximum of 60 minutes.

Or with the API, in seconds:

```bash
curl -X PATCH https://voice-api.edesy.in/v1/trunks/TRUNK_ID \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"max_call_duration_sec": 900}'
```

`0` means the platform maximum. Full reference: [Channels and Limits](https://edesy.in/docs/sip-trunking/termination-trunks/channels-and-limits).

### What happens at the limit

The limit applies to outbound calls through the trunk. When a call reaches it, Edesy ends the call with a normal SIP hang-up (BYE) to both sides, so your agent platform sees a clean end of call and can log it.

A call can also end earlier if your prepaid wallet only covers a shorter call. For long calls, keep the balance topped up.

## The other limit: concurrent calls

The same trunk has a **max concurrent calls** setting, from 1 to 10,000 (default 50). It caps how many calls run at once. A call over the cap is declined before it is placed, so it costs nothing. Together the two limits bound your worst case: concurrent calls x max duration x Rs 0.50 per minute.

| Setting | Caps | Default |
|---|---|---|
| Max concurrent calls | Calls at the same time | 50 |
| Max call duration | Length of one call | 60 minutes |

Example: 20 concurrent calls with a 15-minute cap can't use more than 300 minutes in any 15-minute window: Rs 150 plus GST at Rs 0.50 per minute.

## What it costs

| Item | Price (excl. 18% GST) |
|---|---|
| SIP trunk calls | Rs 0.50 per minute, 60-second pulse |
| Unanswered calls | Free |
| Setting call limits | Free |
| Number rental | From Rs 449 a month |

See [SIP trunking pricing](https://edesy.in/sip-trunking/pricing), all [SIP trunking features](https://edesy.in/sip-trunking/features), and the [SIP trunk for AI voice agents](https://edesy.in/sip-trunk-for-ai-voice-agents) guide. If you are wiring up a new agent, start with [Connect Your Own SIP Trunk to an AI Voice Agent](https://edesy.in/blog/connect-your-own-sip-trunk-to-ai-voice-agent-2026) and the [AI voice agent SIP docs](https://edesy.in/docs/sip-trunk-for-ai-voice-agents).

## FAQ

### What is a max call duration on a SIP trunk?

A cap on how long one call through the trunk may last. When a call reaches it, the trunk provider ends the call for both sides, whatever your PBX or voice agent is doing.

### Why does an AI voice agent need one?

Agents can get stuck: a loop between two bots, a voicemail greeting the agent keeps answering, or a bug that never sends the hang-up. Without a cap, those calls keep billing minutes until someone notices.

### What is the longest call an Edesy SIP trunk allows?

60 minutes, the platform maximum. You can set a lower limit per trunk, in minutes, on the trunk page's Call limits card.

### What limit should I choose?

A little above your longest normal call. If your agent's calls usually take 3 to 5 minutes, 10 or 15 minutes catches runaway calls without cutting real ones.

### Is a call that hits the limit charged?

Yes, for the minutes it was connected, at the normal rate of Rs 0.50 per minute on Edesy SIP trunks, plus 18% GST. The limit stops the minutes that would have come after.
