[Asterisk-Users] Limit call length, whisper time remaining?

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Fri May 16 08:26:35 MST 2003


On Friday 16 May 2003 09:50 am, Michael Manousos wrote:
> Florian Overkamp wrote:
> > At 16:30 16-5-2003 +0300, you wrote:
> >> This one will set a time limit on the current active channel.
> >> What if you want to set a limit on an outgoing call
> >> (the one that is spawned with "Dial") without a restriction
> >> on the current channel?
> >
> > Doesnt matter, now does it. Asterisk has no sense of what is in-
> > or outbound, so if you program your extension logic to set the
> > time limit before the outbound dial is made, there is no problem,
> > or am I missing something ?
>
> Ok, let me put it like this:
> I want to initiate a call from inside the dial plan
>
> ...
> exten => 1,10,Dial(SOMETHING)     ; This will spawn a new chan.
> ...
>
> without setting a timelimit on the current channel.
> If I use the "AbsoluteTimeout" app, the current channel will
> be hang up and therefore any channel spawned by "Dial".
> That means that you can't force a timelimit on a spawned
> channel without closing the current channel as well.

Well, unfortunately for you, the Dial command will return -1 when the
remote channel is hung up.  The PBX will in turn hangup the
current channel when it sees that return value.  You'd need
to change the behavior of the Dial command to return a different
value (without screwing up systems that are already working), or you'd
need to introduce a new TimedDial application to do what you want.

-Tilghman




More information about the asterisk-users mailing list