Hello. I have a problem when I try to execute a
script that should connect to a CISCO AS 5400 and
change some of the configs: I get a "command timed-
out" each time I try to do this:
session->cmd('voice translation-rule 1') is the line
where I get the time-out;
this is odd, because if I use somthing else,
like 'dial-peer voice 50', it works; Also, this
doesn't work with voice translation-profile. I also
noticed that if the voice translation-rule does not
exist, the command does not time out, but on the
router it has no effect. If it exists, than the
script times out.
I've managed to write a PHP script using fsockopen
that worked.
Here's the script:
use Net::Telnet::Cisco;
my $session = Net::Telnet::Cisco->new(Host
=> 'A.B.C.D');
$session->login('user', 'password');
if ($session->enable("password")) {
$session->cmd('configure terminal');
$session->cmd('voice translation-rule 1');
$session->cmd('exit');
$session->cmd('exit');
} else {
warn "Can't enable: " . $session->errmsg;
}
$session->close;
Many thanks,
John