I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-12-01 05:05:06-08 by woodsbc
Cisco Linux OS for Unified Communications

Hi, what exactly would it take to be able for me to use Net:Appliance:Session to control the Cisco Linux based CLI for Unified Communications platform? I have had great success with Cisco routers, switches, firewalls, load balancers, and Linux based CLI's but this is giving me trouble that I have never had before.

I try to connect and I get the following as an error:

-------------------------------------------------------------

Login failed to remote host at d:\cucm-monitor\cucm-server-hardware.pl line 92

pattern match timed-out

    Welcome to the Platform Command Line Interface

-------------------------------------------------------------

Using the command line ssh, the following is the output:

-------------------------------------------------------------

ssh -l administrator 10.16.240.64

administrator@10.16.240.64's password:

Last login: Sun Nov 30 23:36:47 2008 from 10.16.240.1

    Welcome to the Platform Command Line Interface

admin:

-------------------------------------------------------------

I guess I am not understanding why it is failing at the 'Welcome to the Platform Command Line Interface' message.

Thanks.

Brian
Direct Responses: 9469 | Write a response
Posted on 2008-12-01 07:39:12-08 by oliver in response to 9467
Re: Cisco Linux OS for Unified Communications
Hi Brian,

I think I see what is happening here. Net::Appliance::Session uses a phrasebook to both match the command prompts on different devices, and send commands to the device.

The phrasebook is in the Net::Appliance::Phrasebook module (you will have this installed already), in a file called nas-pb.yml:

http://search.cpan.org/src/OLIVER/Net-Appliance-Phrasebook-1.7/lib/Net/Appliance/Phrasebook/nas-pb.yml

What I think happens is that the "admin:" prompt (that's the command line prompt after you log in?) is not matching the regular expression in nas-pb.yml. What you can do is create a new phrasebook according to the documentation in Net::Appliance::Session and Net::Appliance::Phrasebook which matches this prompt. In fact, just changing the prompt value in the current file to have [#>:] instead of [#>] will probably do.

One other thing is you will probably want to disable paging, if the UC command line doesn't use typical Cisco --more-- style paging. Do this using $s->do_paging(0) before calling $c->connect().

I hope that helps, but let me know if you still have a problem getting it working. This is new territory for the module!

regards, oliver.
Direct Responses: 9473 | 12878 | Write a response
Posted on 2008-12-01 16:44:47-08 by woodsbc in response to 9469
Re: Cisco Linux OS for Unified Communications

Oliver,

Thanks for the help. Yes, by editing one of the unused device types (CATOS) to have the ':' after the "#>" in nas-pb.yml it was able to log in. I did indeed have to use do_paging(0) to get the commands to be entered correctly.

Another question though. This CLI environment doesn't have a disable pager command as other devices, so I will have to enter a space at some known places. How would I enter in a space?

Thanks.

Brian

Direct Responses: 9474 | Write a response
Posted on 2008-12-01 21:23:54-08 by oliver in response to 9473
Re: Cisco Linux OS for Unified Communications
Hi Brian,

Right, this is a bit trickier, in fact very tricky indeed with the current Net::Appliance::Session design (which is why I am working on version 2 at the moment - hope to release in the New Year).

I'm going to have to ask my colleague for access to our own Cisco Call Manager and have a look for myself. I'll get back to you when I have done that, whether it's good news or not!

regards, oliver.
Direct Responses: 9499 | Write a response
Posted on 2008-12-05 20:53:33-08 by woodsbc in response to 9474
Re: Cisco Linux OS for Unified Communications

Oliver,

Thanks for the info. Thanks in advance for checking on your Call Manager.

Brian

Direct Responses: 9691 | Write a response
Posted on 2009-01-09 22:25:14-08 by woodsbc in response to 9499
Re: Cisco Linux OS for Unified Communications

Oliver,

I have another question in relation to using this on the Linux CUCM server.

Whenever I send a command via SSH, the first one always works.

I want to send up to 6 separate commands, one after another and evaluating their response in between.

After the first command, however, the next line it wants to send is the '*' character for some reason at the beginning of the command. It does this before the 3rd, 4th, etc. commands.

I have never seen this behavior with any other device. Would you know of the possible reason why this occuring?

Thanks.

Brian
Direct Responses: Write a response
Posted on 2010-08-14 10:24:48.253841-07 by neil87 in response to 9469
Re: Cisco Linux OS for Unified Communications
Hi Oliver, I have the same issue as above,but i am still confused where to edit.The os is showing admin: no password is accepting .Could you please advise me some steps to correct it.It will be great.. Thanks in Advance Regards, Neil
Direct Responses: Write a response