Jean-Michel Hiver a écrit :


We want to build the “ultimate Asterisk demo” – and my questions to you are: What would the ultimate Asterisk demo, consist of? What would you like to see? What would your customers be impressed by? I’m very willing to put up the presentation for general use after we develop it along with a ‘how to’ but as of right now – we need ideas.

What I am building at the moment is a script which remotely tells asterisk to go to voicemail when my screensaver is active. This way, I'll stop being woken up by this bloody phone in the morning!

It might not be impressive per se but it'll be better for my quality of life... plus having proper sleep is going to increase my productivity and overall well-being :)

Following on this, pehaps the most impressive thing about this demo is the unbelievably small amount of work it requires to get working:

I have this script running in the background on my computer (granted, it would be better to use some other mechanism than passwordless ssh...)

#!/usr/bin/perl
use warnings;
use strict;

my $blanked = 0;
open (IN, "xscreensaver-command -watch |");
while (<IN>) {
   if (m/^(BLANK|LOCK)/) {
       if (!$blanked) {
           print "Switching stuff off...\n";
           system "aumix -v 0";
system "ssh [EMAIL PROTECTED] 'asterisk -rx \"database put jhiver isDnd 1\"'";
           $blanked = 1;
       }
   } elsif (m/^UNBLANK/) {
       print "Switching stuff on...\n";
       system "aumix -v 75";
system "ssh [EMAIL PROTECTED] 'asterisk -rx \"database put jhiver isDnd 0\"'";
       $blanked = 0;
   }
}


And just this in my extensions.conf...

[jhiver-incoming]
exten => s,1,SetLanguage(fr)
exten => s,2,DBGet(isDND=jhiver/isDnd)
exten => s,3,Gotoif(${isDnd}?100:200)
exten => s,100,Answer()
exten => s,101,Wait(1)
exten => s,102,Playback(astcc-tone)
exten => s,103,Voicemail(u0262550398)
exten => s,200,Dial(SIP/[EMAIL PROTECTED])


Well... that wasn't very violent. And it impresses me :)

Cheers,
Jean-Michel.

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-biz mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-biz

Reply via email to