[Asterisk-Users] Warn before Absolute Timeout

Matthew Boehm mboehm at cytelcom.com
Wed Sep 15 08:15:33 MST 2004


I was looking for this as well for use with my own prepaid callingcard app.
I have updated the Wiki to include some extra options that I found inside
the app_dial.c source.

http://www.voip-info.org/tiki-index.php?page=Asterisk+cmd+Dial

My additions are right underneath the L description.

example:

exten => 79,1,SetVar(LIMIT_PLAYAUDIO_CALLEE=yes)
exten => 79,2,SetVar(LIMIT_CONNECT_FILE=timeleft)
exten => 79,3,Dial(SIP/3001,15,TtL(300000:270000:10000))

As my wiki update states 'timeleft' is a built-in macro in the source to say
"You have [XX Minutes] YY seconds".
My example limits the call to 5 minutes, when there is 4 min 30 sec left in
the call, it begins warning BOTH callers every 10 seconds.

What kinda stinks is that after the voice finishes, you actually have less
time. So if she says "You have 10 seconds" you really only have about 6.

If you use the 'timeleft' macro, you might get an error in the console
telling you that 'seconds' file doesn't exist. I have already submitted a
patch to change this to 'queue-seconds' and 'queue-minutes'.  If you don't
want to recompile * then you can simply make a sym-link or copy them.

Matthew

----- Original Message ----- 
From: "Darren Wiebe" <darren at hagenhomes.com>
To: "Nicolás Gudiño" <asternic at gmail.com>; "Asterisk Users Mailing List -
Non-Commercial Discussion" <asterisk-users at lists.digium.com>
Sent: Wednesday, September 15, 2004 9:06 AM
Subject: Re: [Asterisk-Users] Warn before Absolute Timeout


> Thanks, that looks great.  I was not aware of the -L option but it will
> work just fine.  Once I get it added, unless somebody else comes up with
> a patch first, I will try to get it submitted to astcc.
>
> Thanks,
> Darren Wiebe
> darren at hagenhomes.com
>
> Nicolás Gudiño wrote:
>
> >Hello,
> >
> >On Tue, 14 Sep 2004 19:13:37 -0600, Darren Wiebe <darren at hagenhomes.com>
wrote:
> >
> >
> >>I have found this patch
> >>http://bugs.digium.com/bug_view_page.php?bug_id=0000773 which warns the
> >>caller before it hangs up on an absolute timeout.  This patch references
> >>another patch but does not link to it.  Does anybody know what the
> >>proper way to do this is.  This is for astcc and I would like to warn
> >>the user 1 minute before they are disconnected.
> >>
> >>
> >>
> >
> >Forget that ancient ugly patch (that I wrote)
> >
> >The warn before hangup is now implemented in the dial application
> >(option L). Someone wrote an enhancement to astcc to use that option.
> >I do not know if it was submited to cvs ... maybe it is and you do not
> >need to do anything. If its not, then you will have to modify the Dial
> >command in astcc to use the L option. There is no need to apply
> >patches to Asterisk itself. Best regards,
> >
> >
> >
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list