Hi Guys,<div><br></div><div>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:</div>
<div><br></div><div>exten => s,1,answer</div><div>exten => s,n,System(/tmp/check.sh)</div><div><br></div><div>check.sh:</div><div>check EPOCH time => do an IF for certain times => Allow mutiple calls in certain times and only single call at certain times</div>
<div>return back to Asterisk context and report if Trunk would allow more channels or not...</div><div><br></div><div>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"`</div>
<div><br></div><div>Thanks</div>