Re: [asterisk-users] problem with asterisk AGI

2007-02-14 Thread Joanna Liza Mariazeta

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


Re: [asterisk-users] problem with asterisk AGI

2007-02-08 Thread Jon Farmer
Set a variable that you can then use GotoIf in the dialplan to branch to the 
required exten

 
Jon Farmer
Telford, Shropshire, UK

- Original Message 
From: prasanth [EMAIL PROTECTED]
To: asterisk-users@lists.digium.com
Sent: Thursday, 8 February, 2007 10:06:07 AM
Subject: [asterisk-users] problem with asterisk AGI

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






___ 
What kind of emailer are you? Find out today - get a free analysis of your 
email personality. Take the quiz at the Yahoo! Mail Championship. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk
___
--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