On Sat, May 29, 2010 at 2:02 PM, bruce bruce <[email protected]> wrote: > Hi Guys, > I am looking to use System() function along with some bash scripting to > determine if a Trunk is being used during certain time of the day or not. > Here is what I have in mind. Please guide me if you know a better way:
I don't know what version you are running, but check out GotoIfTime. I use it frequently for office hours. GROUP, and GROUP_COUNT can help with limiting on a trunk too > exten => s,1,answer > exten => s,n,System(/tmp/check.sh) exten => _X.,n,GotoIfTime(7:30-16:30,mon-fri,*,*?multicall) ; Within this time, go to the label 'multicall' <code to limit to one call> exten => _X.,n(multicall),Verbose(3,We can call more than once) <code to call multiple times) http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime http://www.voip-info.org/wiki/view/Asterisk+func+group > check.sh: > check EPOCH time => do an IF for certain times => Allow mutiple calls in > certain times and only single call at certain times > return back to Asterisk context and report if Trunk would allow more > channels or not... > Something along those lines. Should this be a solid thing to do? I am > looking to use GotoIF and `asterisk -rx "sip show channels"` to grab results > or `asterisk -rx "core show channels"` > Thanks > -- > _____________________________________________________________________ > -- 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 > -- _____________________________________________________________________ -- 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
