[asterisk-users] Accumulated call time
Geoff Lane
geoff at gjctech.co.uk
Wed Feb 18 07:36:30 CST 2009
Hi All,
Asterisk 1.4.12 CentOS 5
My ISP account includes nearly 500 minutes of VOIP calls per month but
the service is expensive for unbundled minutes. So I'm trying to find
a way to keep an accumulated total of calls made through that trunk so
that I can automatically switch to a lower-cost provider when my
bundled minutes are used. The plan is to store the accumulated time in
AstDB and reset this with a cron job at the beginning of each period.
I understand that the Dial() application sets two variables -
DIALEDTIME and ANSWEREDTIME - to the total time the Dial() application
ran and the time since the call was answered respectively. However, I
can't find a way to access these. I've tried the following:
exten => s,1,Dial(${rgMain}/${EXTEN},${RINGTIME},t)
exten => s,n,Log(NOTICE, Call to ${EXTEN} lasted ${DIALEDTIME})
However the expected notice does not appear in
/var/log/asterisk/messages, which is where other notices generated
with the Log() application do.
Can someone point the way?
TIA,
--
Geoff
More information about the asterisk-users
mailing list