I have written a handful of AGI Perl scripts, so I am familiar with the general procedure, but my current application is different.
My goal is to give my Asterisk users access to a POTS line in a foreign country, in which there is no flat rate. The closest rate available is unlimited number of calls and minutes after 7pm. or something. The gateway is an SPA-3102. My plan is to write an AGI script that catches all calls to that FXO extension, checks the time of the day and day of the week (maybe it is a non-weekend holiday so the call may go thu). If they are trying to call at an expensive time, a recording will tell them to call later and hang up. So far, I can program this, as it is just like the IVRs that I have written in the past.
I need help coding the event in which the call is allowed to continue. How do I program that part? How can I ‘exec()’ the remainder of the call?
-Ramon F Herrera