<div dir="ltr"><div class="gmail_default" style="color:#660000">That's a good point also - if you're doing something automated, AMI is likely a better option. The connection to Asterisk is persistent, and information output is structured and we take pains not to break the API definition, which is not true of CLI output.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 24, 2014 at 12:47 PM, Tzafrir Cohen <span dir="ltr"><<a href="mailto:tzafrir.cohen@xorcom.com" target="_blank">tzafrir.cohen@xorcom.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thu, Apr 24, 2014 at 12:20:37PM +0200, Mikael Fredin wrote:<br>
> Just like the subject sais - how expensive is it to execute a lot of these<br>
> commands to keep track of different things in asterisk?<br>
><br>
> I have avoided doing this because it feels a bit like a risk to spam the<br>
> asterisk CLI this way, but is it really?<br>
><br>
> CPU-wise it doesn't seem very expensive to do it 100 times a second (from a<br>
> simple test I did), but is it possible it will affect the asterisk service<br>
> in any other negative way?<br>
<br>
</div></div>It "feels" very expensive. Part of it is because of starting a new<br>
instance of Asterisk. It will not load any module and such, but if you<br>
care about speed, you can use netcat (it takes some care).<br>
<br>
You'll also encounter some artificial delays in the response which make<br>
it feel more expensive.<br>
<br>
The main reason to avoid it is because its output is not intended for<br>
automated parsing.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Tzafrir Cohen<br>
icq#16849755 <a href="mailto:jabber%3Atzafrir.cohen@xorcom.com">jabber:tzafrir.cohen@xorcom.com</a><br>
+972-50-7952406 mailto:<a href="mailto:tzafrir.cohen@xorcom.com">tzafrir.cohen@xorcom.com</a><br>
<a href="http://www.xorcom.com" target="_blank">http://www.xorcom.com</a><br>
</font></span><div class="HOEnZb"><div class="h5"><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><br clear="all"><div><br></div>-- <br><div dir="ltr"><img alt="Digium logo" src="https://my.digium.com/images/graphics/digium_RGB_signature.gif" width="288" height="50" style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px"><div>
Scott Griepentrog<br>Digium, Inc · Software Developer<br>445 Jan Davis Drive NW · Huntsville, AL 35806 · US<br>direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029<br>Check us out at: <a href="http://digium.com" target="_blank">http://digium.com</a> · <a href="http://asterisk.org" target="_blank">http://asterisk.org</a><br>
</div></div>
</div>