[asterisk-users] How to get meetme participants in dialplan?

Steve Edwards asterisk.org at sedwards.com
Fri May 8 15:54:41 CDT 2009


On Fri, 8 May 2009, David Backeberg wrote:

> 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.

I thought about keeping state in the db, but then I'd have to run the AGI 
when they leave the conference or hangup as well. These callers jump from 
conference to conference with a single key press and use this feature 
constantly.

>> 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.

(OT, but FYI, <confnum> is not constrained to be a number. This is for a 
"chat house" application. The rooms are named like "en-f1-r9 -- English, 
floor 1, room 9).

This only shows the number of participants, not their user number. The 
user number (ast_conf_user.user_no in app_meetme.c) is the bit displayed 
after "User #:"

Even worse, what if 2 callers join "simultaneously?"

The output of "meetme list" is useless from the standpoint of storing it in a DB. Say a 
caller joins and is assigned a user_no of 55. The next caller will get 56. 
If 56 drops off, meetme list shows 55 as the last assigned number but the 
next caller will be assigned 57. And we still have the problem of no easy 
way to get the output of "meetme list" into my dialplan or AGI.

> 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?

Sometimes its a drag being a 1.2 Luddite. Is "meetme concise" a CLI 
command? If so, I'm still stuck parsing the output of an AMI command. 
Backporting is even less desirable.

> 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.

Yuk. Doing a system() is even uglier :)

And I'd still have the user number problem cited earlier.

>> 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.

Parsing the AMI output of "meetme list foo" in an AGI works, I was just 
hoping for something more elegant.

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000



More information about the asterisk-users mailing list