Answeredtime <> dial l

Hi everybody,

I have some strange behaviour in my agi script, maybe you can help me there.

I call the DIAL() application with the parameter L(60000:30000:10000) to limit the calltime to 1min because that is what the prepaid balance allows.
After the call is finished, I get the actual answered time through the channel variable ${ANSWEREDTIME}. When the call was forced to hang up after 60000ms because of the L parameter, ANSWEREDTIME returns sometimes 60s - most of the times 61s! That ruins my balance calculationā€¦

Am I doing something wrong or do I have to expect that kind of behaviour? Is there something I can do to prevent this problem?

Here is my CLI output when that happens:

AGI Script Executing Application: (DIAL) Options: (SIP/somenumber@context|90|M(setincall^8404)HL(60000:60000:30000))
-- Limit Data for this call:
> timelimit = 60000
> play_warning = 60000
> play_to_caller = yes
> play_to_callee = no
> warning_freq = 30000
> start_sound = (null)
> warning_sound = beep
> end_sound = (null)
-- Called somenumber@context
-- SIP/callshop84-081defa0 answered SIP/8404-081db6b8
-- Executing [s@macro-setincall:1] AGI("SIP/callshop84-081defa0", "setincall.agi|8404") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/setincall.agi
-- AGI Script setincall.agi completed, returning 0
-- <SIP/8404-081db6b8> Playing 'beep' (language 'en')
-- <SIP/8404-081db6b8> Playing 'beep' (language 'en')
-- AGI Script callshop.agi completed, returning 0

Thank you peopleā€¦

[/code]