[asterisk-users] Any api (agi/ari/ami) equivalent of "core show calls"?
lardconcepts at gmail.com
Sat Jun 13 04:11:28 CDT 2020
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.
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the asterisk-users