use strict;
-use vars qw($sentencelth $pc19_version $pc9x_nodupe_first_slot);
+use vars qw($sentencelth $pc19_version $pc9x_nodupe_first_slot $pc92c_ipaddr_enable);
$sentencelth = 180;
$pc9x_nodupe_first_slot = 1;
}
for (@_) {
$s .= '^' . _encode_pc92_call($_, $ext);
- $ext = 0 unless $sort eq 'A'; # only the first slot has an ext.
+ $ext = 0 unless $sort eq 'A '; # only the first slot has an ext except A
+ $ext = 2 if $pc92c_ipaddr_enable && $sort eq 'C';
}
return $s . '^H99^';
}
# send a config
sub pc92c
{
- return _gen_pc92('C', 1, @_);
+ return _gen_pc92('C', $pc92c_ipaddr_enable ? 2 : 1, @_);
}
# send a keep alive
my $via = shift || '*'; # *, node call
my $line = shift; # the text
my $origin = shift; # this will be present on proxying from PC10
+ my $ipaddr = shift;
$line = unpad($line);
$line =~ s/\^/~/g; # remove any ^ characters
my $s = "PC93^$main::mycall^" . gen_pc9x_t() . "^$to^$from^$via^$line";
$s .= "^$origin" if $origin;
+ if ($ipaddr) {
+ $s .= '^' unless $origin;
+ $ipaddr =~ s/:/,/;
+ $s .= "^$ipaddr";
+ }
$s .= "^H99^";
return $s;
}