<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
That should be pretty easy to do with a .call file. The context that
you drop your called party off to will play the sounds and do the
transfer. So really you need to concentrate on creating that context,
the .call files are very easy to generate.<br>
<br>
<br>
Nitesh Divecha wrote:
<blockquote cite="mid:4677E5E5.9050900@vipernetworks.com" type="cite">
<pre wrap="">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:
</pre>
<blockquote type="cite">
<pre wrap="">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@voicepulse",
'Context'=>'called_party_context',
'Exten'=>'899',
'Timeout' => '1000',
'Async'=>'1',
'MaxRetries' => '5',
'RetryTime' => '5',
'Priority'=>1,
'Callerid'=>$callid));
$asm->disconnect();
}
?>
nik600 wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
<a class="moz-txt-link-freetext" href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
</pre>
</blockquote>
<br>
</body>
</html>