Advertisement
Guest User

Reiniciando VoIP via expect

a guest
Feb 17th, 2014
72
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None
  1. #!/usr/bin/expect
  2.  
  3. # ABRINDO CONEXAO
  4. spawn telnet ip-do-voip
  5.  
  6. # USUARIO SENHA
  7. # AGUARDE ogin E ENVIE administrator
  8. expect ogin {send administrator\r}
  9. # AGUARDE assword E ENVIE 12345
  10. expect assword {send 12345\r}
  11.  
  12. # SOLICITANDO REINICIO
  13. sleep 2
  14. send "net reset\r"
  15.  
  16. # RESPONDENDO y(YES) E REINICIANDO
  17. sleep 2
  18. send "y\r"
  19.  
  20. # FECHANDO SESSÃO
  21. send "exit\r"
  22.  
  23. # FINALIZANDO SCRIPTS
  24. expect eof
Advertisement
RAW Paste Data Copied
Advertisement