Conferencing with 0.8.0

7 views
Skip to first unread message

geetarista

unread,
May 16, 2008, 1:17:42 PM5/16/08
to Adhearsion
Hey there!

I'm new to Ruby and Adhearsion, but I am totally digging this! Thanks
to Jay and everyone else working on this.

We're trying to come up with a prototype replacement of the current
system that we have at work. So far I have a working setup of
Adhearsion that has a Conference model that ties in to a database. I
have created prompts that ask for a conference number and a pin number
and then I validated those responses based on the database.

Everything I've learned so far has been just trying to piece together
what I can find in the rdocs since the docs page is super slim. I was
wondering if anybody could steer me in the right direction on how to
set up a conferencing system. I think I've found the right classes
and methods, but so far I haven't really figured anything out like I
was able to do with the validation. Any help would be greatly
appreciated! :)

Thomas Howe

unread,
May 16, 2008, 1:34:31 PM5/16/08
to adhea...@googlegroups.com
Hi geetarista -

Actually, this one is pretty easy: just make sure you're using the edge version of adhearsion.

1) Create a new adherasion project
2) Edit your dialplan.rb file to something like this:

ahn {

 loop do
      extension = input :play "please-enter-your-conference-number"
      pin = input :play => "please-enter-your-pin-buddy"
      break if pin == "#{insert-pin-or-db-dip-here}"
 end

  play "going-to-conference", extension
  join extension

}

3) This brings the call into an asterisk meet me conference, so the extension has to match one of those. I actually didn't try this code out, but I think it's close. the names in the input commands correspond to wave files you put in the sounds directory (like /var/lib/asterisk/sounds).  Ahn is the setup as the context that the call comes in as.

Hope this helps,
Thomas

-----------------------------------------------
Thomas Howe
http://www.thomashowe.com
+1 (508) 364-9972

geetarista

unread,
May 16, 2008, 1:55:16 PM5/16/08
to Adhearsion
Thank you so much for such a quick response, Thomas! I didn't think
it would really be that easy... :)

The only other thing I needed to do was to add the conference/pin to
meetme.conf. Is there a way that adhearsion can handle this though?
For example, all of the conference numbers and pin numbers are in the
conferences table. Is there any way to have MeetMe pull that
information from the database through Adhearsion?

Thanks again!

-- Robby

On May 16, 10:34 am, "Thomas Howe" <howetho...@aol.com> wrote:
> Hi geetarista -
>
> Actually, this one is pretty easy: just make sure you're using the edge
> version of adhearsion.
>
> 1) Create a new adherasion project
> 2) Edit your dialplan.rb file to something like this:
>
> ahn {
>
>  loop do
>       extension = input :play "please-enter-your-conference-number"
>       pin = input :play => "please-enter-your-pin-buddy"
>       break if pin == "#{insert-pin-or-db-dip-here}"
>  end
>
>   play "going-to-conference", extension
>   join extension
>
> }
>
> 3) This brings the call into an asterisk meet me conference, so the
> extension has to match one of those. I actually didn't try this code out,
> but I think it's close. the names in the input commands correspond to wave
> files you put in the sounds directory (like /var/lib/asterisk/sounds).  Ahn
> is the setup as the context that the call comes in as.
>
> Hope this helps,
> Thomas
>
> -----------------------------------------------
> Thomas Howehttp://www.thomashowe.com
> +1 (508) 364-9972

Justin Grammens

unread,
May 16, 2008, 3:11:55 PM5/16/08
to adhea...@googlegroups.com
Definitely. Adhearsion is fully database aware through active record. If i understand your question correctly, I wouldn't have MeetMe pull it through Adhearsion, but instead use Adhearsion to query the proper database tables. Look in the config/startup.rb to enable access and create models for your database tables. You then have access to the data in your tables form your dialplan.rb.
You could even at a later date, enable_rails and build a simple Ruby on Rails application to allow you to do anything you wanted on those tables.
Justin

geetarista

unread,
May 16, 2008, 6:04:09 PM5/16/08
to Adhearsion
Thanks Justin. I understand what you're describing and was able to do
that, but I was looking for something a little different. What I
meant is that in order for a MeetMe conference to work, the extensions
and pin numbers must first be located in meetme.conf. I was able to
use my Conference model to validate the entries in the database, but I
had to manually edit meetme.conf with something like the following:

conf => 12345,1234

Is there any way around doing this manually? Or do I have to add
another entry to meetme.conf every time I want to create a new
conference?



On May 16, 12:11 pm, "Justin Grammens" <jus...@localtone.com> wrote:
> Definitely. Adhearsion is fully database aware through active record. If i
> understand your question correctly, I wouldn't have MeetMe pull it through
> Adhearsion, but instead use Adhearsion to query the proper database tables.
> Look in the config/startup.rb to enable access and create models for your
> database tables. You then have access to the data in your tables form your
> dialplan.rb.
> You could even at a later date, enable_rails and build a simple Ruby on
> Rails application to allow you to do anything you wanted on those tables.
> Justin
>

howet...@aol.com

unread,
May 16, 2008, 7:15:56 PM5/16/08
to adhea...@googlegroups.com
Hey-
Although there might be another way of doing this in adhearsion, can't you just turn passwords off in asterisk, and only join those calls to the conference that give the right password from your model?

Sent via BlackBerry by AT&T

-----Original Message-----
From: geetarista <geeta...@gmail.com>

Date: Fri, 16 May 2008 15:04:09
To:Adhearsion <adhea...@googlegroups.com>
Subject: Re: Conferencing with 0.8.0

geetarista

unread,
May 17, 2008, 5:43:09 PM5/17/08
to Adhearsion
Thanks for your help, everyone. I don't really have to turn off
passwords per se, but I can just use MeetMe in realtime instead of
static mode. All I had to do was edit /etc/asterisk/extconfig.conf
and add something like this:

meetme => mysql,databasename,tablename

And it works perfectly. Thanks again for all your help. Hopefully I
can get up to speed and help out more with the project.

Jay Phillips

unread,
May 17, 2008, 1:13:40 PM5/17/08
to adhea...@googlegroups.com
Note how meetme.conf is virtually blank. I'm using the "d" option to
dynamically create the confs. For this reason they have no PIN.

Also, EY wanted *two* conference pins - one is normal and one is
deprecated for a certain period of time and, when used, tells the
person it's deprecated.

Checks our the global settings page on the Rails app. It has textual
descriptions of the conference password system.

Sent from my iPhone

geetarista

unread,
May 19, 2008, 1:23:50 PM5/19/08
to Adhearsion
What Rails app are you referring to?

On May 17, 10:13 am, Jay Phillips <jick...@gmail.com> wrote:
> Checks our the global settings page on the Rails app. It has textual  
> descriptions of the conference password system.

Reply all
Reply to author
Forward
0 new messages