[asterisk-users] problem with asterisk AGI
Joanna Liza Mariazeta
joannaliza at gmail.com
Wed Feb 14 02:56:22 MST 2007
Hi there,
to give you an idea of what Jon is saying...
in your extensions.conf you can probably try this..
exten =>
1,1,BackGround(/var/lib/asterisk/sounds/TEXX-JP-WAV-8000/TEXX-JP-7-welcome)
exten => 1,2,SayDigits(${CALLERIDNUM})
exten => 1,3,AGI(checkRegist.agi,${CALLERIDNUM})
exten => 1,4,GotoIf($["${ISREGISTERED}" =
"0"]?texx-nihonggo-temp-regt|readnum|1:texx-nihonggo-regt-menu|readnum|1)
exten => h,1,Hangup
then in you agi script...
$sql = "select status from phone where phonenumber = ? and status <> '1'";
$sth = $dbh->prepare($sql);
$sth->execute($phonenumber);
$ret = $sth->rows();
if ($ret > 0) {
$AGI->set_variable('ISREGISTERED', '1');
exit;
} else {
$AGI->set_variable('ISREGISTERED','0');
}
Hope that helps..
Best Regards,
Joanna Liza Mariazeta
www.mariazeta.com
On 2/8/07, prasanth <rpmadala at mantragroup.com> wrote:
>
> I have a fairly complicated setup. Extensions (1,2 and 3). In 3 - I
> execute AGI in java which plays few wav files depending on external
> parameters.
>
> Can I have a dial plan inside my AGI? If not, how do I accomodate user
> who needs to reach extension 2 from my agi? I have tried stream file and
> get data but the two commands did not work at all.
> _______________________________________________
> --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/20070214/8a072961/attachment.htm
More information about the asterisk-users
mailing list