asteriskasterisk-ari

Increasing timeout on channel originate


Using ARI (C#, AsterNET), I'm creating a channel via the Originate command:

   var channel = client.Channels.Originate($"SIP/{number}@{destination}", app: appName, callerId: CLI, timeout: timeout);

This works fine; however,timeout starts from when the channel is created, and in reality I'd like to timeout to only be enforced once the channel starts ringing.

Is there any way (via ARI) to manipulate the timeout setting once the channel is created - so I could, for example, create the channel with an arbitrary timeout, and then (re)set the timeout once the channel state has changed to RINGING?


Solution

  • There is no way do timeout based on ringing in asterisk.

    Not in dialplan, not in ARI or AMI or AGI. No at all.

    Only complex things like listen for event and manualy hangup channels.