File: astman.pl

package info (click to toggle)
libasterisk-agi-perl 1.08-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 444 kB
  • sloc: perl: 2,883; makefile: 2
file content (30 lines) | stat: -rwxr-xr-x 458 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl

use lib './lib', '../lib';

use Asterisk::Astman;

use Data::Dumper;

my $astman = new Asterisk::Astman;

$astman->readconfig();

print "PORT: " . $astman->port() . "\n";


$astman->user('test');
$astman->secret('test');
$astman->host('localhost');

$astman->connect();
$astman->authenticate();

$astman->setevent( "testcb()");
$astman->managerloop();
#print Dumper $astman;

sub testcb  {
	my ($test) = @_;
	print "TESTCALLBACK $test\n";
}