Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] ConfBridge on asterisk 11


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
geisj at pagestation.com
Guest





PostPosted: Fri Feb 14, 2014 10:55 am    Post subject: [asterisk-users] ConfBridge on asterisk 11 Reply with quote

I believe I am running an AGI (to put users in a conf) before the confbridge is built. So the users are not really get in the conf...


exten X,1,run agi to put users in conf
exten X,n,ConfBridge()


How do I have in the dial plan ConfBridge() and someplace 
run an AGI that brings the users I want into that Conf.


I cannot delay in the AGI and wait for the conf because 
the conf is not built until I return from the AGI...


Any thoughts?


Thanks,


Jerry
Back to top
asterisk_list at earth...
Guest





PostPosted: Fri Feb 14, 2014 11:15 am    Post subject: [asterisk-users] ConfBridge on asterisk 11 Reply with quote

On Friday 14 Feb 2014, Jerry Geis wrote:
Quote:
I believe I am running an AGI (to put users in a conf) before the
confbridge is built. So the users are not really get in the conf...

exten X,1,run agi to put users in conf
exten X,n,ConfBridge()

How do I have in the dial plan ConfBridge() and someplace
run an AGI that brings the users I want into that Conf.

I cannot delay in the AGI and wait for the conf because
the conf is not built until I return from the AGI...

Any thoughts?

Thanks,

Jerry


Make your AGI script fork itself; have the child process detach, and the
parent process exit. Then, the AGI call will return quickly to the dialplan;
and meanwhile, the script can continue in the background at its own leisure.


Example code (Perl) follows:


#!/usr/bin/perl -w
use strict;
use Asterisk::AGI;

my $child_pid;

my $AGI = new Asterisk::AGI;
my %params = $AGI->ReadParse();

$SIG{CHLD} = "IGNORE";

if ($child_pid = fork) {
# This is executed in the parent process
exit;
}
elsif (defined $child_pid) {
# This is executed in the child process
close STDIN;
close STDOUT;
close STDERR;
# Now we are detached

#
# This is where we do the funky stuff
#

exit;
}
else {
# Oh, s#!t
die "Could not fork: $!";
};
# We should never, ever get here
exit;




--
AJS

Answers come *after* questions.

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services