[asterisk-users] PhpAgi call generation

Rob Schall rschall at callone.net
Tue Jun 19 09:35:08 CDT 2007


Since its all part of a program.... I would do it using the AGI like
Christopher was talking about. However, I think this would be a 2
program issue. First, you would have a program that would check a
database or whatever to see who is late and make the call to the
supervisior. That call I would think would point to a IVR extension of
some type, which gives the "1" option to call that employee. If they do
press one, it would run a different program to generate that call.

I might be making it more complicated than needed with 2 programs, but
that's how I see it working.

Rob


Nitesh Divecha wrote:
> Finally, this is what I was looking for... to generate a call.
>
> I have been working on my Time Clock application, where an employee will 
> call into the system using his cellphone to clock in and clock out his 
> hours. And it works perfect...
>
> Now I was looking for an option where or if an employee is late to clock 
> in, the system has to generate a call and call the supervisor and inform 
> him that XYZ employee is late and give an option to supervisor "Would 
> you like to call XYZ employee, Press 1" and the system will call the XYZ 
> employee and connect with the supervisor...
>
> Is it something feasible to do using the .call files? Or I am way too 
> off...
>
> Cheers,
> Nitesh
>
>
> Christopher Robinson wrote:
>   
>> I've done this many times, also used the .call files.  If you don't need 
>> your application to initiate the call the .call files are the better way 
>> to go, otherwise it's a bit too much file management overhead.
>>
>> Here's some working code on our end.  In this case the Channel is 
>> actually a context which makes the actual call, but I've used it both ways.
>>
>> <?php
>>   require('PHPAGI/phpagi-asmanager.php');
>>
>>   $callid = 'Somebody';
>>
>>   $asm = new AGI_AsteriskManager();
>>   if($asm->connect())
>>   {
>>     $call = $asm->send_request('Originate',
>>             array('Channel'=>"LOCAL/17165555555 at voicepulse",
>>                   'Context'=>'called_party_context',
>>                   'Exten'=>'899',
>>                   'Timeout' => '1000',
>>                   'Async'=>'1',
>>                   'MaxRetries' => '5',
>>                   'RetryTime' => '5',
>>                   'Priority'=>1,
>>                   'Callerid'=>$callid));
>>     $asm->disconnect();
>>   }
>> ?>
>>
>>
>> nik600 wrote:
>>   
>>     
>>> hi
>>>
>>> i'd like to write a simply application in php with phpAgi that:
>>>
>>> - connect to Asterisk
>>> - call an external number using a Zap channel
>>> - play a message
>>>
>>> here is some code:
>>>
>>> <?php
>>>
>>> $asm = new AGI_AsteriskManager();
>>>
>>> if ($asm->connect()) {
>>>
>>> $asm->Originate("Zap/g1/1","number","default","1");
>>>
>>> /*
>>> play message...
>>> */
>>> } else {
>>>         die("error\n");
>>> }
>>>
>>> ?>
>>>
>>> But it doesn't work.
>>> Is it possible to create a program like this?
>>> thanks
>>>
>>>   
>>>     
>>>       
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>>
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>    http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>   
>>     
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070619/6a4be99f/attachment.htm 


More information about the asterisk-users mailing list