I am using Asterisk v1.4.x<div><br></div><div>I have got php along with phpagi to report back using a system call within php to asterisk -rx but it&#39;s buggy. For one thing php is hanging sometimes and not returning anything.</div>

<div>
<br></div><div>Wondering if I can run search to see if a g.729 channel is up or not using only the dial-plan. I want to get a TRUE or FALSE in a var for it. </div><div><br></div><div>I was pointed to GROUP_COUNT but that doesn&#39;t cut it for me in this case.</div>

<div><br></div><div>There is gotta be some simple dial-plan to find out if a trunk is being used or if a g.729 call is going through or if a specific destination is being dialed with first three digits being 789 (for example) as all of those variables can help me move to next step which is to decide to place a second call through the same trunk or not.</div>

<div><br></div><div>Any inputs?</div><div><br></div><div>Thanks a lot<br><div><br></div><div><br><br><div class="gmail_quote">On Sat, Jun 19, 2010 at 1:56 PM, Tzafrir Cohen <span dir="ltr">&lt;<a href="mailto:tzafrir.cohen@xorcom.com" target="_blank">tzafrir.cohen@xorcom.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Sat, Jun 19, 2010 at 10:58:17AM -0400, bruce bruce wrote:<br>
&gt; Hi Guys,<br>
&gt;<br>
&gt; Is it possible to harvest the output of system into a SetVar(variable)?<br>
&gt;<br>
&gt; exten =&gt; s,n,SetVar(var=system(*asterisk -rx &quot;sip show channels&quot; | grep -c<br>
</div>&gt; &quot;(ulaw)&quot;)*<br>
<br>
There&#39;s the function SHELL. Though I suspect you use 1.2 and I&#39;m not<br>
sure if it was there already.<br>
<br>
Anyway, I&#39;m the output of that command is so simple to parse.<br>
<font color="#888888"><br>
--<br>
               Tzafrir Cohen<br>
icq#16849755              <a href="mailto:jabber%3Atzafrir.cohen@xorcom.com" target="_blank">jabber:tzafrir.cohen@xorcom.com</a><br>
+972-50-7952406           mailto:<a href="mailto:tzafrir.cohen@xorcom.com" target="_blank">tzafrir.cohen@xorcom.com</a><br>
<a href="http://www.xorcom.com" target="_blank">http://www.xorcom.com</a>  <a href="http://iax:guest@local.xorcom.com/tzafrir" target="_blank">iax:guest@local.xorcom.com/tzafrir</a><br>
</font><div><div></div><div><br>
--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br></div></div>