cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
995
Views
0
Helpful
3
Replies

net:telnet perl time-out for voice translation-rule

eujohn0114
Level 1
Level 1

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;

3 Replies 3

teodorgeorgiev
Level 4
Level 4

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.

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.

jaregalado
Level 1
Level 1

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.

Getting Started

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: