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 <[EMAIL PROTECTED]> 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
_______________________________________________
--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