[Asterisk-Dev] Problem with DND working

brian brian at bkw.org
Fri Apr 23 07:27:44 MST 2004


Why even use agi.. this can be done in the dial plan with a lot less
drama... app_db includes dbget, dbput, dbdel and dbdeltree

bkw

> -----Original Message-----
> From: asterisk-dev-admin at lists.digium.com [mailto:asterisk-dev-
> admin at lists.digium.com] On Behalf Of kevin at mail.rnktel.com
> Sent: Friday, April 23, 2004 7:49 AM
> To: asterisk-dev at lists.digium.com
> Subject: [Asterisk-Dev] Problem with DND working
>
> Hey
>
> I have been trying to get DND working using 3 separate AGI scripts with no
> success.
>
> dndon.agi - Writes to the database and if you do a database show you see
> /DND/exten#
>
>
> dndoff.agi - Does the database del and removes the entry.
>
> the problem is with my dndck.agi. This is the checker to see if the party
> has DND turned on. No matter what I try to do a match on it fails. Here is
> the copy of the AGI I'm using:
>
> #! /usr/bin/perl -w
>
> use Asterisk::AGI;
>
> my $AGI = new Asterisk::AGI;
>
> my $var = $AGI->database_get(DND,1000);
>
> if($var eq 'YES') {
>
> $AGI->exec(Voicemail','u1000');
>
> }else{
>
> $AGI->exec('Dial','Sip/username');
>
>
> }
>
>
> Any help would be greatly appreciated.
>
> Thanks
> Kevin
> _______________________________________________
> Asterisk-Dev mailing list
> Asterisk-Dev at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-dev
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev





More information about the asterisk-dev mailing list