I'm parsing ` sudo asterisk -rx "core show calls" | grep active | head -c 1
` as an external call from within the Asterisk dialplan then passing it to
agi, but this seems really hacky and ugly.

However, I cannot find any ARI/AGI/AMI function (or global variable I can
get with agi) which shows me this.

Any ideas?!?

In case it helps and you're wondering why...
I need to ensure that a MusicOnHold stream is only running when there's a
caller on hold and listening.
To do that, I need to rewrite and reload the moh.conf file when the caller
hangs up IF there are no other callers (ie there's just 1 active call as
the caller hangs up), and then  rewrite and reload again when there's a new
caller.
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to