[Asterisk-Users] Callback question
Leon Sun
leon at timestelecom.ca
Thu Aug 4 14:10:43 MST 2005
Remember, my sample is for ASTCC. A connection will be connected between
original number and ASTCC. If you need connect 2 numbers, you can find from
those links.
Regards
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Christian
Sent: Thursday, August 04, 2005 1:36 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] Callback question
Hi Leon,
Many thanks for the links, will try it!
All the best,
Christian
----- Original Message -----
From: "Leon Sun" <leon at timestelecom.ca>
To: "'Asterisk Users Mailing List - Non-Commercial Discussion'"
<asterisk-users at lists.digium.com>
Sent: Thursday, August 04, 2005 7:50 PM
Subject: RE: [Asterisk-Users] Callback question
> http://www.voip-info.org/tiki-index.php?page=Asterisk+AGI+php
> http://www.junghanns.net/asterisk/page14.html
>
> make a file as /var/lib/asterisk/agi-bin/callback.agi as following
>
> #!/usr/bin/php -q
> <?php
> ob_implicit_flush(true);
> set_time_limit(0);
> $err=fopen("php://stderr","w");
> $in = fopen("php://stdin","r");
> $stdlog = fopen('my_agi.log', 'w');
> while (!feof($in)) {
> $temp = str_replace("\n","",fgets($in,4096));
> $s = split(":",$temp);
> $agi[str_replace("agi_","",$s[0])] = trim($s[1]);
> if (($temp == "") || ($temp == "\n")) {
> break;
> }
> }
> $cf =
>
fopen("/var/spool/asterisk/outgoing/".$agi["uniqueid"].$agi["callerid"].".ca
> ll","w+"); fputs($cf,"Channel: Zap/g1/".$agi["callerid"]."\n");
> fputs($cf,"Context: callback\n");
> fputs($cf,"Extension: 604\n");
> fputs($cf,"SetVar: CALLERIDNUM=".$agi["extension"]."\n");
> fputs($cf,"MaxRetries: 3\n");
> fputs($cf,"RetryTime: 10\n");
> fclose($cf);
> fclose($in);
> fclose($err);
> ?>
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Christian
> Sent: Thursday, August 04, 2005 9:56 AM
> To: asterisk-users at lists.digium.com
> Subject: [Asterisk-Users] Callback question
>
> Hi,
> I'm interested in a callback feature where I can dial my Asterisk, then
> hangup and Asterisk will call me back and I can then place phone calls or
> whatever I want to do. And also, if I've got voicemail I want Asterisk to
> call me back as well. Are there any scripts for this available?
> Any help would be apreciated!
> Best regards,
> Christian
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list