Steve Edwards
2009-May-07 15:44 UTC
[asterisk-users] How to get meetme participants in dialplan?
The meetmeadmin() dialplan function lets you specify a user to mute, un-mute or kick. But how do you get a list of users in your dialplan? When a user joins a conference, the user number assigned is "the last user number +1." If you have a long running conference with callers joining and leaving all the time, this can grow to be a large number. I want to be able to "mute/unmute/kick caller x" where x ranges from 1 to the number of participants. The "best" solution I have so far is to pass the conference name to an AGI which then asks Asterisk (via AMI) to "meetme list <conference-name>" and then parse the output. Seems rather kludgy to me. I'm (still) using 1.2 if it matters. Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
David Backeberg
2009-May-08 15:41 UTC
[asterisk-users] How to get meetme participants in dialplan?
On Thu, May 7, 2009 at 11:44 AM, Steve Edwards <asterisk.org at sedwards.com> wrote:> The meetmeadmin() dialplan function lets you specify a user to mute, > un-mute or kick. But how do you get a list of users in your dialplan?You need a way to keep state. I use a database and AGI for that purpose.> When a user joins a conference, the user number assigned is "the last user > number +1." If you have a long running conference with callers joining and > leaving all the time, this can grow to be a large number.Before you add the user to the conference, you can do a: meetme list <confnum>, parse the first non-space chars of the last line of the output, but as you pointed out, that's messy. It's easiest to parse the output of: meetme concise which outputs a nifty csv-style output, but that's not available in 1.2 I don't know which version added meetme concise, but it's definitely in 1.6. You may be able to find the patch and backport it to 1.2? The closest thing in 1.2 is: meetme and awk for the parties column, after grepping for the conf num. and when you have the user join conference the number of that confererence member will be the incremented current parties number for that room. Then you need to hold on to it in a db.> I want to be able to "mute/unmute/kick caller x" where x ranges from 1 to > the number of participants.This will be a db (maybe through AGI) database lookup, based on what you stored when you joined them to the room. Use that when you want to mute / unmute / kick.