*#!/usr/bin/php -q
<?php
require("./phpagi_2_14/phpagi-asmanager.php");

$callid = '4166286090';

$asm = new AGI_AsteriskManager();*

*
if($asm->connect("127.0.0.1","username","password"))
{*

*               for ( $counter = 1; $counter <= 100; $counter ++) *

*               {*

*
$call = $asm->send_request('Originate',
array('Channel'=>"SIP/PROVIDERIP/NUMBER",
'Context'=>'outbound',
'Exten'=>'10',
'Async'=>'1',
'MaxRetries' => '2',
'RetryTime' => '5',
'Priority'=>1,
'Callerid'=>$callid));

*

* *

*            If ($counter%10 ==0){*

*                        sleep(1);*

*            }*

*}*

*                 $asm->disconnect();*
* }
?>*


On Feb 5, 2008 11:56 PM, Aloysius Thevarajah Lloyd <[EMAIL PROTECTED]>
wrote:

> Hello Bill,
>
> I assume you are implementing a outbound IVR solution. In my case 300
> calls scheduled at one time. Most of the carriers expect 10 CPS ( call per
> second) . I recently implement a similar kind of system.
>
> Here is the piece of code without using the call file and sleep every 1
> second. Hope this will help you. I use the PHPAGI.
>
>
> *#!/usr/bin/php -q
> <?php
> require("./phpagi_2_14/phpagi-asmanager.php");
>
> $callid = '4166286090';
>
> $asm = new AGI_AsteriskManager();*
>
> *
> if($asm->connect("127.0.0.1","username","password"))
> {*
>
> *               for ( $counter = 1; $counter <= 100; $counter ++) *
>
> *               {*
>
> *
> $call = $asm->send_request('Originate',
> array('Channel'=>"SIP/PROVIDERIP/NUMBER",
> 'Context'=>'outbound',
> 'Exten'=>'10',
> 'Async'=>'1',
> 'MaxRetries' => '2',
> 'RetryTime' => '5',
> 'Priority'=>1,
> 'Callerid'=>$callid));
> $asm->disconnect();*
>
> * *
>
> *            If ($counter%10 ==0){*
>
> *                        sleep(1);*
>
> *            }*
>
> *}*
>
> *
> }
> ?>*
> Thank you
> Lloyd
> 416-500-8014
>
>
>
>
> On Feb 5, 2008 11:25 PM, Bill Sandiford <[EMAIL PROTECTED]>
> wrote:
>
> > Hi All:
> >
> > We are working on a project for a client that requires a large number of
> > scheduled outgoing calls for message playback.  There is about 1000 calls
> > scheduled at a time.  We want to limit the simultaneous number of outgoing
> > calls to 10.  The following URL recommends a method to limit outgoing calls
> > by using an external script to limit the number of files in the
> > /var/spool/asterisk/outgoing directory and moving more files in as necessary
> >
> >
> > http://www.voip-info.org/wiki-Asterisk+auto-dial+out#HowtoscheduleaCallintheFuture
> >
> > Has anyone been successful in writing a script for this purpose that
> > they would be willing to share?  Does anyone know of any other methods for
> > doing this?  (putting a call-limit on the sip peer doesn't really cut it).
> >
> > Regards,
> > Bill
>
>
>
>
> --
> Lloyd
>
> Tel:416-500-8014




-- 
Lloyd

Tel:416-500-8014

Reply via email to