[Asterisk-Users] MeetME Conferencing

Damon Estep damon at suburbanbroadband.net
Fri May 12 06:05:56 MST 2006


Josh,

Thank you!

I think the AGI could be bypassed by doing a realtime() to get the PIN from mySQL, also returning the variable that defines admin or user and jumping in the dialplan accordingly. Otherwise I would just end up having the AGI do the query because there is a need to store the users in the database to facilitate easy management.

The admin menu and marked user options seem to be the key to making this work, so I will play with those.





-----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Josh McAllister
Sent: Friday, May 12, 2006 2:08 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MeetME Conferencing

Ok, the script below (meetme.agi) will prompt for a valid pin up to 3 times. If the pin matches one of the defined Admin pins, it will set the dialplan priority to 10 and exit, if User, sets to 20 and exits. Otherwise Hangs up.

In the case of admin, these MeetMe options are used:
a - Admin mode
A - Marked mode
c - Announce number of participants (optional of course)
s - Present Admin menu by pressing '*'
x - close conf when last marked user leaves.

In the case of user:
c s x are used as above, but we add:
w - wait until marked user enters. (Plays MoH until then)

The dialplan assumes you have a static pinless conference setup as conf #10.

extensions.conf:
exten => 5552323,1,Wait(1)
exten => 5552323,2,Answer()
exten => 5552323,3,AGI(meetme.agi)
exten => 5552323,4,NoOp(Invalid Pin)
exten => 5552323,5,Hangup()

exten => 5552323,10,NoOp(Admin Pin)
exten => 5552323,11,MeetMe(10,aAcsx)
exten => 5552323,12,Hangup()

exten => 5552323,20,NoOp(User Pin)
exten => 5552323,21,MeetMe(10,cswx)
exten => 5552323,22,Hangup()



The script of course requires the Asterisk::AGI module.

meetme.agi:

#!/usr/bin/perl
use Asterisk::AGI;
my $AGI = new Asterisk::AGI;
my $input = { %{$AGI->ReadParse()} };

#our $DEBUG = 1; 

my @UserPins = ('11111','22222');
my @AdminPins = ('99999','88888');

my $mode = collectPin($AGI,5);

$AGI->verbose("collectPin got '$mode'") if $DEBUG;

if ($mode eq 'Admin') {
   $AGI->set_priority(10);
} elsif ($mode eq 'User') {
   $AGI->set_priority(20);
} else {
   $AGI->stream_file("goodbye",'""');
   $AGI->hangup;
}

exit;

sub collectPin {
   my $AGI = shift;
   my $maxdigits = shift;

   my $tries = 0;

   #Three tries to select an existing pin.
   while ($tries < 3) {
      $AGI->stream_file("please-try-again",'""') if $tries > 0;
      $tries++;
      my $pin = $AGI->get_data('enter-conf-pin-number', "10000", $maxdigits);
      $AGI->verbose("Got PIN $pin.") if $DEBUG;
      next unless $pin > 0;

      if ( grep(/^$pin$/, @AdminPins) ) {
         $AGI->stream_file("pin-number-accepted",'""');
         return 'Admin';
      } elsif ( grep(/^$pin$/, @UserPins) ) {
         $AGI->stream_file("pin-number-accepted",'""');
         return 'User';
      } else {
         $AGI->stream_file("conf-invalidpin",'""');
      }
   }

   return undef;
}


What can I say, I was bored.

Enjoy,

Josh McAllister
________________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Damon Estep
Sent: Thursday, May 11, 2006 10:37 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MeetME Conferencing

Static configs for the conference rooms are not an issue.

The main goal is to allow the moderator to determine when the conference “starts” by having all participants hearing MOH until the moderator starts the interactive call with a  PIN known only to the moderator, and then allowing the moderator (and only the moderator) to kick out all users from the keypad when the call is over.

An additional benefit would be gained if authenticate() or realtime() app commands could be used against a mysql database for the participant and moderator pins so an app could be written easily to allow changing of the PINS in the database.

________________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dan Austin
Sent: Thursday, May 11, 2006 10:29 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MeetME Conferencing

I believe you can accomplish this with a well crafted dialplan.
 
If you did not have the restriction against out of tree modules, I would
recommend an app that strores the conference details in a database
and would allow just this kind of control.
 
Dan

________________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Damon Estep
Sent: Thursday, May 11, 2006 4:30 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MeetME Conferencing
Not opposed to paying someone that can do it right ☺
 
As far as “coding” goes, you mean create the dialplan entries, not modify the meetme source, correct?
 
Our application requires that this can be done in 1.2 release, not trunk and not with an add-in that is not part of 1.2
 
If you have done it and would like to charge for you knowledge PM me, if you are willing to post a sample free of charge do it here for the benefit of all.
 
________________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dean Collins
Sent: Thursday, May 11, 2006 5:18 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: RE: [Asterisk-Users] MeetME Conferencing
 
Nope not asking too much.
 
What you are asking for is possible and not unique but you may have to pay for someone to code it for you.
 
 
Cheers,
 
Dean
 
 
 
________________________________________
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Damon Estep
Sent: Thursday, 11 May 2006 6:56 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] MeetME Conferencing
 
Can anyone point me to a sample or information on using MeetMe like this?
 
Conference room is set up with 2 PINs, one for the moderator and one for the participants.
Participants get music until the moderator joins (to avoid wild, un-moderated tangents).
Call is ended and all participants are kicked out when the moderator leaves (or the moderator can kick everyone out via phone keypad).
 
Asking too much, or simple stuff?
 
Damon
 
 
 
 



More information about the asterisk-users mailing list