[asterisk-users] Receptionist GUI?

Danny Nicholas danny at debsinc.com
Tue Oct 6 16:44:54 CDT 2009


 

 

  _____  

From: Danny Nicholas [mailto:danny at debsinc.com] 
Sent: Tuesday, October 06, 2009 4:07 PM
To: 'Asterisk Users Mailing List - Non-Commercial Discussion'
Subject: RE: [asterisk-users] Receptionist GUI?

 

Here's the part I can publish:

here is the dialplan snippet and the public domain portion of the PERL
Extensions.conf (don't have ael to do this with) 

[globals] NIGHTOP => 107 [default] 

exten => s,n,Set(NIGHTOP=${DB(Nightop/ext)})

exten => s,n,Gotoif($[ "${NIGHTOP})}" > "401"]?501) 

exten => s,n,Gotoif($[ "${NIGHTOP})}" > "128"]?401) 

exten => s,n,Gotoif($[ "${NIGHTOP})}" > "108"]?lunch) 

exten => o,n,Set(NIGHTOP=${DB(Nightop/ext)})

exten => o,n,Dial(SIP/${NIGHTOP},20,KktT) 

exten => 0,1,Set(NIGHTOP=${DB(Nightop/ext)})

exten => 0,n,Gotoif($[ "${NIGHTOP})}" > "401"]?501) 

exten => 0,n,Gotoif($[ "${NIGHTOP})}" > "128"]?401) 

exten => 0,n,Gotoif($[ "${NIGHTOP})}" > "108"]?lunch) 

exten => 0,n,Dial(SIP/${NIGHTOP},20,KktT) 

exten => 1,n,Set(NIGHTOP=${DB(Nightop/ext)})

exten => 1,n,Dial(SIP/${NIGHTOP},20,KktT) 

exten => 644,1(start7),Playback(record/nightopext)

exten => 644,n,NoOp(executando - ${extensao} - ) 

exten => 644,n,BackGround(beep) 

exten => 644,n,Read(digito,,3) 

exten => 644,n,Gotoif($[ "${LEN(${digito})}" != "3"]?start7) 

exten => 644,n,SayDigits(${digito}) 

exten => 644,n,Set(GLOBAL(NIGHTOP)=${digito})

exten => 644,n,Set(DB(Nightop/ext)=${digito})

exten => 644,n,BackGround(vm-goodbye)

exten => 644,n,Hangup()

exten => 654,1,Playback(record/nightoperis)

exten => 654,n,SayDigits(${NIGHTOP})

exten => 654,n,BackGround(vm-goodbye)

exten => 654,n,Hangup()

exten => 664,1,Playback(record/operwas)

exten => 664,n,SayDigits(${NIGHTOP})

exten => 664,n,Set(GLOBAL(NIGHTOP)=107)

exten => 664,n,Set(DB(Nightop/ext)=107)

exten => 664,n,Playback(record/operisnow) exten =>
664,n,SayDigits(${NIGHTOP}) exten => 664,n,BackGround(vm-goodbye) exten =>
664,n,Hangup()

 

This sets the operator to extension 107 by default;  by dialing 644 you set
the new operator value, 654 tells you the value, 664 resets if.

This uses the Asterisk Database to hold the operator value.

 

PERL

Read the database

my %resp2 = $astman->sendcommand( Action => 'Command',

                                         Channel => 'SIP/170',

                                         Exten => 'SIP/170',

                                         Command => 'database show nightop',


                                         priority => 1,

                                         Number => 5551212

                                         );

 

$astman->sendcommand( Action => 'Logoff'); while ( my ($key, $value) =
each(%resp2) ) {

   if ($key =~ /Nightop/) {

      print 'current value       ',$value;

      }

   }

 

Rewrite the database

   if ($query->param('val1')) {

      my $x = $query->param('val1');

      my %respa = $astman->sendcommand( Action => 'Command',

                                         Channel => 'SIP/170',

                                         Exten => 'SIP/170',

                                         Command => "database put Nightop
ext $x ", 

                                         priority => 1,

                                         Number => 5551212

                                         );

      }

 

Core show hints

my %resp2 = $astman->sendcommand( Action => 'Command',

                                         Channel => 'SIP/170',

                                         Exten => 'SIP/170',

                                         Command => 'core show hints', 

                                         priority => 1,

                                         Number => 5551212

                                         );

 

Core show channels

%resp2 = $astman->sendcommand( Action => 'Command',

                                         Channel => 'SIP/170',

                                         Exten => 'SIP/170',

                                         Command => 'core show channels
verbose', 

                                         priority => 1,

                                         Number => 5551212

                                         );

 

  _____  

From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Xavier
Sent: Tuesday, October 06, 2009 11:54 AM
To: asterisk-users at lists.digium.com
Subject: Re: [asterisk-users] Receptionist GUI?

 

Did you publish it somewhere ?

On 10/05/2009 09:19 PM, Danny Nicholas wrote: 

There are plenty of good products out there, but I use my own
PERL/Apache/AMI interface for this

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20091006/5e40fa81/attachment.htm 


More information about the asterisk-users mailing list