Script to reset IP-phones ?

Post Reply
mothinx

Script to reset IP-phones ?

Post by mothinx »

Hello there !
Here is my problem: i have to disable PC-port on +300 Ipphones. Its ok with categories.
But this option is ok after reseting devices.
So, i have to found a way to reset 300ipphones withou shutdown the callserver. Easy ?
I think i will have to use shell-script.

Like:
#!/bin/bash
termstat d xxxxx
5

But i don't know how to use script when we have to use an alcatel menu (like termstat).
Can you advice me ?

Best regards, Julien
User avatar
alex
Senior Member
Posts: 1498
Joined: 06 Jul 2004 07:27
Contact:

Post by alex »

It is already implemented.;)

Code: Select all

(E)demo_9> downstat h

Wed Feb 10 14:29:13 MSK 2010


Usage : downstat [c|w]
        downstat v cr cpl
        downstat r HH:MM
        downstat p
        downstat s

        c : to obtain the downloading boards
        w : to obtain the boards waiting to be dowloaded
          : to get both informations
        d : to obtain boards that have to be downloaded
        r HH:MM : to program the automatic reset of boards
        p : to display the programmed reset
        s : to remove a programmed reset
        v cr cpl : display binaries' versions for this coupler



Ip Phone download informations
        downstat i

        i : to obtain ip phones that have to be downloaded
       [B][size=134] i r HH:MM : to program the automatic reset of ip phones[/size][/B]


IPTOUCH TDM Phone download informations
        downstat t

        t : to obtain IPTOUCH TDM phones that have to be downloaded
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.
mothinx

Post by mothinx »

Thank you alex !

Is it possible to know how to use shell script with alcatel command like ippstat / downstat .... (command with menu) ?
User avatar
alex
Senior Member
Posts: 1498
Joined: 06 Jul 2004 07:27
Contact:

Post by alex »

mothinx wrote:Thank you alex !

Is it possible to know how to use shell script with alcatel command like ippstat / downstat .... (command with menu) ?
No if i need script i just go starightforward -
10 write script
20 test it
30 if errors then
correct it
goto 10
else
endif
50 success
:D
May be some other guys here have an experience with using those in scripts.
"ippstat" and "downstat" were created for maintenance purposes so they are not shellscript-friendly. Actually there is one large executable "tool" which combines these commands.:D
If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.
mothinx

Post by mothinx »

We are not programmer, we are telephonist !

Ouha !
tomar

Post by tomar »

Try using the "expect" command available in linux/unix. With "auto expect" you can imitate any function using script that you have been earlier doing using the menu.

Tomar
Post Reply

Return to “Linux tricks”