From: [email protected] [mailto:[email protected]] On Behalf Of Harel Cohen Subject: [asterisk-users] perform tasks outside a dial-plan (not during acall)
Can the Asterisk do "things" not during a call? For example I would like to change my dial plan during certain hours\dates or I would like to check some information in the astdb (e.g. counters of al sort) and handle it as required and so on. All of this is not call-related therefore I don't know if I can somehow do it using the dial-plan applications\functions. I know I can do chron jobs on the Linux level but for maintenance and readability I would prefer to do these tasks from within the Asterisk. Is it possible to configure the Asterisk to perform routine tasks on certain times or certain intervals? By definition, all dial-plan actions/functions have to be done from within a "call". This does not mean that you have to actually make a call at 3 in the morning. You can set up contexts to do these functions and use "Local" calls from AMI or cron to perform these functions. Let's use a simple example from your post: I want to see the Asterisk DB keys at a given point in time. In cron I could set up '15 4 * * * /usr/sbin/asterisk -rx "database show" ' to show me what the database contained at 4:15 am each day. But I don't get up until 6 and I want this in a file to look at later. So I make an AGI to do this instead. [dialplan-snapshot] Exten => s,1,answer Exten => s,n,AGI(snapshot.agi) Exten => s,n,hangup Now in cron I do this instead 15 4 * * * /usr/sbin/asterisk -rx "dial lo...@dialplan-snapshot" And Asterisk runs this context obediently just like I had woke up and dialled to this point. This may not be 100% correct due to mail-reformatting or guy at keyboard, but the concepts have been discussed in this list this month.
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
