| 1 | package Asterisk::Conf::IAX; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | require 5.004; | |||||||||||||||||||
| 4 | |||||||||||||||||||||
| 5 | =head1 NAME | ||||||||||||||||||||
| 6 | |||||||||||||||||||||
| 7 | Asterisk::Config::IAX - IAX configuration stuff | ||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | =head1 SYNOPSIS | ||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | stuff goes here | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | =head1 DESCRIPTION | ||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | description | ||||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | =over 4 | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | =cut | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 1 | ▶ | use Asterisk; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 22 | 1 | ▶ | use Asterisk::Conf; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 23 | 1 | @ISA = ('Asterisk::Conf'); | |||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 1 | $VERSION = '0.01'; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 1 | $DEBUG = 5; | |||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 1 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||||||||||||
| 30 | 1 | my ($class, %args) = @_; | |||||||||||||||||||
| 31 | 1 | my $self = {}; | |||||||||||||||||||
| 32 | 1 | $self->{'name'} = 'IAX'; | |||||||||||||||||||
| 33 | 1 | $self->{'description'} = 'IAX Channel Driver Configuration'; | |||||||||||||||||||
| 34 | 1 | $self->{'configfile'} = '/etc/asterisk/iax.conf'; | |||||||||||||||||||
| 35 | 1 | $self->{'config'} = {}; | |||||||||||||||||||
| 36 | 1 | $self->{'configtemp'} = {}; | |||||||||||||||||||
| 37 | 1 | $self->{'contextorder'} = ( 'general' ); | |||||||||||||||||||
| 38 | 1 | $self->{'channelgroup'} = {}; | |||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | 1 | $self->{'variables'} = { | |||||||||||||||||||
| 41 | #this stuff can only be in general context | ||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | #need to put together some list of codecs somewhere | ||||||||||||||||||||
| 44 | 'allow' => { 'default' => 'gsm', 'type' => 'multitext', 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 45 | 'disallow' => { 'default' => 'lpc10', 'type' => 'multitext', 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 46 | 'bindaddr' => { 'default' => undef, 'type' => 'text', 'regex' => '^\w*$', 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 47 | 'bandwidth' => { 'default' => 'low', 'type' => 'one', 'values' => [ 'low', 'medium', 'high' ], 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 48 | 'jitterbuffer' => { 'default' => 'yes', 'type' => 'one', 'values' => [ 'yes', 'no' ], 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 49 | 'dropcount' => { 'default' => '3', 'type' => 'text', 'regex' => '^\d*$', 'contextregex' => '^general$' }, | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 'permit' => { 'default' => undef, 'type' => 'multitext' }, | ||||||||||||||||||||
| 52 | 'deny' => { 'default' => undef, 'type' => 'multitext', 'negcontextregex' => '^general$' }, | ||||||||||||||||||||
| 53 | 'context' => { 'default' => 'default', 'type' => 'multitext' }, | ||||||||||||||||||||
| 54 | 'port' => { 'default' => undef, 'type' => 'text', 'regex' => '^\d*$' }, | ||||||||||||||||||||
| 55 | 'type' => { 'default' => 'user', 'type' => 'one', 'values' => [ 'user', 'peer', 'friend'] }, | ||||||||||||||||||||
| 56 | 'context' => { 'default' => 'default', 'type' => 'multitext' }, | ||||||||||||||||||||
| 57 | 'secret' => { 'default' => undef, 'type' => 'text', 'regex' => '^\w*$', 'negcontextregex' => '^general$' }, | ||||||||||||||||||||
| 58 | 'username' => { 'default' => undef, 'type' => 'text', 'regex' => '^\w*$', 'negcontextregex' => '^general$' }, | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | }; | ||||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 1 | ▶ | bless $self, ref $class || $class; | ||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||
| 66 | 1 | return $self; | |||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | 1 | 1; | |||||||||||||||||||