[asterisk-users] MeetMe Conferencing - Announce your own join/leave to yourself and other conference members

Darren Sessions darren.sessions at me.com
Tue Jan 19 11:07:26 CST 2010


Well, never mind on this (didn't get any responses anyways). I basically removed the meetme announcement options and wrote the functionality from scratch into my AGI framework along with an announcement queuing daemon that runs continuously every second in the background that generates a call file and plays back the user name recording. Hasn't added any CPU overhead with the call processing and along with working as intended I think there maybe some other unique capabilities for it down the road.

In any case, thought I'd update the thread.

Cheers,

- Darren



On Jan 11, 2010, at 10:05 AM, Darren Sessions wrote:

> Hi all,
> 
> I'm trying to get the MeetMe system to take a caller and announce to them they've joined the conference in addition to the other members of the conference assuming previous members of the conference >= 1.
> 
> I can see where the meetme.c app actually processes it using the ast_pthread_create_background(&conf->announcethread, NULL, announce_thread, conf); function. The problem is that it's passing the conf data and not the chan data so it filters out the new caller to the conference and announces the caller's name to the rest of the conference with the announce_thread function. Without the chan data available, it makes quick and dirty hacks even impossible without more insight into the structure of the app ( i was thinking of just adding a seperate ast_streamfile / ast_waitstream with the chan variable using an if current->announcetype == CONF_HASJOIN or something like that).
> 
> Unless I'm missing a way to pass the Asterisk API function ast_pthread_create_background more than one argument and then modify the announce_thread to accommodate it, I'm at a bit of a loss on a good way of doing this without making Asterisk seg fault.
> 
> The second idea I had was to use a simple conf-background.agi (below) and do it that way while altering how meetme is called from the actual separate conferencing agi app. This method does work for announcing the user but the separate channels refuse to mix audio afterwards (and I have tried every trick in the book I can think of with this one down to EAGI stuff). If I take the 'b' option off of the MeetMe call in the AGI script, the audio passes perfectly. Additionally, attempts at using the manager interface to unlock, unmute, etc. the conference have no effect. Aside from the audio (obviously a big deal), the script runs as designed (DTMF detection, etc.).
> 
> Any ideas or help would be appreciated.
> 
> Many thanks,
> 
> - Darren
> 
> 
> POI:
> 
> Asterisk 1.6.1.6
> app_meetme.c - line 1601 (the announce_thread function)
> app_meetme.c - line 1817 (the conf_run function)
> 
> 
> -- snip --
> 
> #!/usr/bin/perl -w
> 
> use strict;
> use warnings;
> 
> use lib '/var/lib/asterisk/agi-bin';
> 
> use DBI;
> use Asterisk::AGI;
> 
> our ($AGI,%v,%ast);
> 
> $AGI = new Asterisk::AGI;
> %ast = $AGI->ReadParse();
> 
> $v{chan} = $ast{channel};
> $v{lang} = $AGI->get_variable('CHANNEL(language)');
> $v{conf} = $AGI->get_variable('conference_call');
> 
> $v{dbh} = <sanitized>
> 
> ($v{q},$v{r}) = undef;
> $v{q} = "SELECT members FROM <sanitized> WHERE confno = '".$v{conf}."'";
> $AGI->verbose($v{q});
> $v{q} = $v{dbh}->prepare($v{q});
> if (!$v{q}->execute) {
> exit;
> }
> $v{r} = $v{q}->fetchrow_hashref();
> $v{q}->finish();
> $v{dbh}->disconnect;
> 
> if ($v{r}{members} > 1) {
> $AGI->stream_file("/var/spool/asterisk/meetme/meetme-username-".$v{conf}."-".$v{r}{members});
> }
> 
> while (!$v{loop}) {
> exit if (!$AGI->channel_status($v{chan})); 
> $v{rc} = $AGI->wait_for_digit('60000');
> }
> 
> exit;
> 
> -- 
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list