Here is a simple Perl implementation to generate call files . .

You'll still need something for it to execute after the call files are generated; either a simple AGI app that streams a file, a Macro, or a nice dialplan layout.

In any case, you could call something like this very rapidly with whatever parameters to create as many call files as you felt like, and Asterisk would start acting on them immediately (if the call files were generated without wait time).

- Darren


_____________________________

[EMAIL PROTECTED]
http://www.darrensessions.com
http://www.linkedin.com/in/dsessions
_____________________________



use strict;
use warnings;

sub call_file_name_generator {
  my ($len, $str, @chars);
  $len = shift;
  @chars  = ('a'..'z','A'..'Z','0'..'9','_');
  foreach (1..$len)  {
    $str.= $chars[rand @chars];
  }
  return($str);
}

sub call_file_generator {

  use Asterisk::AGI;

my ($channel, $retries, $retry_interval, $wait_time, $application, $data, $ob_clid) = @_;

if (!$channel || !$retries || !$retry_interval || !$wait_time || ! $application || !$data || !$ob_clid)
    $AGI->verbose("Missing data to create call file!!", 1);
    return(1);
  }

my $ob_file = "/var/spool/ asterisk/".call_file_name_generator().".call";

  unless(open(CFILE, ">" . $ob_file)) {
    $AGI->verbose("Can't open call file for writing!!", 1);
    return(1);
  }

  $file = "\#\nChannel: ".$channel."\n\nMaxRetries: ".$retries."\n";
$file.= "RetryTime: ".$retry_interval."\nWaitTime: ".$wait_time."\n \n"; $file.= "Application: ".$application."\nData: ".$data."\nCallerid: ".$ob_clid."\n";

  printf CFILE $file;

  close(CFILE);
  system("mv $file /var/spool/asterisk/outgoing");
  return(0);
}






On Aug 8, 2008, at 1:48 PM, Bradley Sumrall wrote:

I am a returning Asterisk user.

It has been a few years since I played with it and trying to get a server up for proof of concept

What is the easiest method of having asterisk dial 5 numbers simultainiously and deliver a pre recorded message?




_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to