02-17-2006 02:59 AM
Hello. I try to run a perl script that should connect to a CISCO AS 5400 and change a voice translation-rule, but it times out.
I replaced the translation rule with dial-peer voice and it worked just fine.
I increased the time-out, I tried the same using php and fsockopen, but the result is the same.
If i try to create a new voice translation-rule, it doesn't time out, but also the rule is not created. I noticed that the same happens if I try voice translation-profile.
Does anybody have any ideea why this happens?
Here's the perl script:
use Net::Telnet::Cisco;
my $session = Net::Telnet::Cisco->new(Host => 'A.B.C.D');
$session->login('USER', 'USERPASS');
if ($session->enable("ENABLEPASS") ) {
$session->cmd('conf t');
$session->cmd('voice translation-rule 1');
$session->cmd('exit');
$session->cmd('exit');
} else {
warn "Can't enable: " . $session->errmsg;
}
$session->close;
02-17-2006 04:28 AM
Hi,
I know it won't help you, but I noticed the same odd thing. Very interesting, indeed. I will try to go to the bottom of this.
02-17-2006 05:21 AM
I finally managed to run a script in PHP using fsock that worked. I don't know why it doesn't work with net:telnet.
02-20-2006 10:49 AM
Hi,
I have used the Dump option whenever I run into such problems with Net::Telnet, and I've been able to clearly see the point where the commands timeout, so it could help you too.
[Dump_Log => $filename,]
Regards.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: