The Adtran community holiday season is starting next week! The holiday period will span from December 21, 2024 to January 6, 2025. During this time, responses to feedback form submissions may be delayed. If you are encountering product issues, you can reach out to Adtran support at any time.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dbm11219
New Contributor

Error opening the file or script.

Jump to solution

I have a total access 924e

I am trying to run a tcl to shutdown all fxs ports ( i want to do this on a schedule eventually)

i created a text file called shut.tcl with the following

interface fxs 0/1

  shutdown

!

interface fxs 0/2

  shutdown

!

interface fxs 0/3

  shutdown

!

interface fxs 0/4

  shutdown

!

interface fxs 0/5

  shutdown

!

interface fxs 0/6

  shutdown

!

interface fxs 0/7

  shutdown

!

interface fxs 0/8

  shutdown

!

interface fxs 0/9

  shutdown

!

interface fxs 0/10

  shutdown

!

interface fxs 0/11

  shutdown

!

interface fxs 0/12

  shutdown

!

interface fxs 0/13

  shutdown

!

interface fxs 0/14

  shutdown

!

interface fxs 0/15

  shutdown

!

interface fxs 0/16

  shutdown

!

interface fxs 0/17

  shutdown

!

interface fxs 0/18

  shutdown

!

interface fxs 0/19

  shutdown

!

interface fxs 0/20

  shutdown

!

interface fxs 0/21

  shutdown

!

interface fxs 0/22

  shutdown

!

interface fxs 0/23

  shutdown

!

interface fxs 0/24

  shutdown

I used Filezilla to transfer the file to the root directory of the i am logged in to the device via putty

i do run tcl shut.tcl in enable mode but i get Error opening the file or script.

Any help is greatly appreciated

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
Anonymous
Not applicable

Re: Error opening the file or script.

Jump to solution

The Error opening the file or script ​would be if the file is not in the FLASH drive main directory, or if the file name is incorrect. If you do a "show flash" you should see the file (in my case the file is "Test_Off.tcl") listed:

TA908e#show flash

           6334 securityAudit-20170425113350

(dir)       232 ssh

           8284 startup-config

           8253 startup-config.bak

       28762904 T900E3A-R11-10-7-HA-E.biz

       28997720 T900E3A-R12-3-1-E.biz

            348 Test_Off.tcl

(dir)       400 Tones

60149760 bytes used*, 36970496 available**, 97120256 total

The TCL script you listed above doesn't look correct either. To turn off FXS ports 1-7 you should have something like this:

echo [cli {

  interface fxs 0/1

     shutdown

     exit

  interface fxs 0/2

     shutdown

     exit

  interface fxs 0/3

     shutdown

     exit

  interface fxs 0/4

     shutdown

     exit

  interface fxs 0/5

     shutdown

     exit

  interface fxs 0/6

     shutdown

     exit

  interface fxs 0/7

     shutdown

     exit

  }]

Then if you want it run at a specific time, you would set up a SCHEDULE with a start time, and duration:

!

schedule WORK

  periodic daily 8:00 for 9:00

!

(This starts at 8:00 AM - military time - and lasts for 9 hours and 00 minutes)

You can then create a TRACK and set it as PASS or FAIL during this time:

!

track TEST

  time-schedule "WORK" pass

  no shutdown

!

Finally you configure the ADTRAN to run the TCL script based on an "on-pass" or "on-fail" condition of the track:

!

tcl run Test_Off.tcl track TEST on-fail

!

The schedule, track, and "tcl run" are only to have the TCL script run at a specific time each day. You can set up a another TCL script to run on an "on-pass" condition to turn the interface back on.

Hope this helps,

Patrick

View solution in original post

5 Replies
Anonymous
Not applicable

Re: Error opening the file or script.

Jump to solution

The Error opening the file or script ​would be if the file is not in the FLASH drive main directory, or if the file name is incorrect. If you do a "show flash" you should see the file (in my case the file is "Test_Off.tcl") listed:

TA908e#show flash

           6334 securityAudit-20170425113350

(dir)       232 ssh

           8284 startup-config

           8253 startup-config.bak

       28762904 T900E3A-R11-10-7-HA-E.biz

       28997720 T900E3A-R12-3-1-E.biz

            348 Test_Off.tcl

(dir)       400 Tones

60149760 bytes used*, 36970496 available**, 97120256 total

The TCL script you listed above doesn't look correct either. To turn off FXS ports 1-7 you should have something like this:

echo [cli {

  interface fxs 0/1

     shutdown

     exit

  interface fxs 0/2

     shutdown

     exit

  interface fxs 0/3

     shutdown

     exit

  interface fxs 0/4

     shutdown

     exit

  interface fxs 0/5

     shutdown

     exit

  interface fxs 0/6

     shutdown

     exit

  interface fxs 0/7

     shutdown

     exit

  }]

Then if you want it run at a specific time, you would set up a SCHEDULE with a start time, and duration:

!

schedule WORK

  periodic daily 8:00 for 9:00

!

(This starts at 8:00 AM - military time - and lasts for 9 hours and 00 minutes)

You can then create a TRACK and set it as PASS or FAIL during this time:

!

track TEST

  time-schedule "WORK" pass

  no shutdown

!

Finally you configure the ADTRAN to run the TCL script based on an "on-pass" or "on-fail" condition of the track:

!

tcl run Test_Off.tcl track TEST on-fail

!

The schedule, track, and "tcl run" are only to have the TCL script run at a specific time each day. You can set up a another TCL script to run on an "on-pass" condition to turn the interface back on.

Hope this helps,

Patrick

Re: Error opening the file or script.

Jump to solution

Thank you very much for the detailed help. I will test it later and keep you posted

Re: Error opening the file or script.

Jump to solution

i am not sure what i am doing wrong however it doesnt work

here is the show flash

#show flash

           8237 CFG20121205142417_395322_1d65

(dir)      1024 coeff

            346 shut1.tcl

          14239 startup-config

          14239 startup-config.bak

       15280778 T900E2A-R11-4-0-E.biz

       16177971 T900E2A-R12-3-2-E.biz

            346 Test_Off.tcl

(dir)      1024 Tones

            903 up.tcl

31768050 bytes used, 0 available, 31768050 total

this id the Test_Off.tcl

echo [cli {

  interface fxs 0/1

     shutdown

     exit

  interface fxs 0/2

     shutdown

     exit

  interface fxs 0/3

     shutdown

     exit

  interface fxs 0/4

     shutdown

     exit

  interface fxs 0/5

     shutdown

     exit

  interface fxs 0/6

     shutdown

     exit

  interface fxs 0/7

     shutdown

     exit

  }]

here is my config ( i only removed ip info, passwords, and the sip credentials)

!

!

! ADTRAN, Inc. OS version R12.3.2.E

! Boot ROM version 14.05.00.SA

! Platform: Total Access 924e (2nd Gen), part number 4242924L1

! Serial number CFG0654882

!

!

hostname "test"

enable password encrypted password

!

!

clock timezone -5-Eastern-Time

!

ip subnet-zero

ip classless

ip routing

ipv6 unicast-routing

!

!

domain-proxy

name-server 4.2.2.2 8.8.8.8

!

!

no auto-config

auto-config authname adtran encrypted password password

!

event-history on

no logging forwarding

no logging email

!

service password-encryption

!

username "admin" password encrypted "2129e8d017dc3e1677b962b5796c652c338a"

username "root" password encrypted "373f83a348213a550da84b9d9a707cb09fe3"

!

!

ip firewall

no ip firewall alg msn

no ip firewall alg mszone

no ip firewall alg h323

!

!

!

!

!

!

!

!

no dot11ap access-point-control

!

!

!

schedule WORK

  periodic daily 00:10 for 09:00

!

!

!

!

track TEST

  time-schedule "WORK" pass

  no shutdown

!

!

!

!

!

ip dhcp pool "DHCP_POOL"

  network 192.168.2.0 255.255.255.0

  dns-server 4.2.2.2 8.8.8.8

  netbios-node-type h-node

  default-router 192.168.2.1

  lease 7

!

!

!

!

!

!

!

!

!

!

!

qos map eth0/1QosWizard 20

  match dscp 46

  match precedence 5

qos map eth0/1QosWizard 21

  match ip list acleth0/1QosWizSignal21

  set dscp 46

!

!

!

!

interface eth 0/1

  description WAN

  ip address my ip 255.255.255.0

  ip access-policy Public

  no awcp

  no shutdown

  media-gateway ip primary

!

!

interface eth 0/2

  description LAN

  ip address 192.168.2.1 255.255.255.0

  ip access-policy Private

  no shutdown

!

!

!

!

interface t1 0/1

  shutdown

!

interface t1 0/2

  shutdown

!

interface t1 0/3

  shutdown

!

interface t1 0/4

  shutdown

!

!

interface fxs 0/1

  no shutdown

!

interface fxs 0/2

  no shutdown

!

interface fxs 0/3

  no shutdown

!

interface fxs 0/4

  no shutdown

!

interface fxs 0/5

  no shutdown

!

interface fxs 0/6

  no shutdown

!

interface fxs 0/7

  no shutdown

!

interface fxs 0/8

  no shutdown

!

interface fxs 0/9

  no shutdown

!

interface fxs 0/10

  no shutdown

!

interface fxs 0/11

  no shutdown

!

interface fxs 0/12

  no shutdown

!

interface fxs 0/13

  shutdown

!

interface fxs 0/14

  shutdown

!

interface fxs 0/15

  shutdown

!

interface fxs 0/16

  shutdown

!

interface fxs 0/17

  shutdown

!

interface fxs 0/18

  shutdown

!

interface fxs 0/19

  shutdown

!

interface fxs 0/20

  shutdown

!

interface fxs 0/21

  shutdown

!

interface fxs 0/22

  shutdown

!

interface fxs 0/23

  shutdown

!

interface fxs 0/24

  shutdown

!

!

interface fxo 0/0

  shutdown

!

!

!

!

!

!

!

ip access-list standard wizard-ics

  remark Internet Connection Sharing

  permit any

!

!

ip access-list extended acleth0/1QosWizSignal21

!

ip access-list extended self

  remark Traffic to Total Access

  permit ip any any log

!

ip access-list extended SIP

  permit udp removed 0.0.0.31 any eq 5060 

!

ip access-list extended web-acl-9

  remark Admin Access

removed the info

!

!

!

!

ip policy-class Private

  allow list self self

  nat source list wizard-ics interface eth 0/1 overload

!

ip policy-class Public

  allow list web-acl-9 self

  allow list SIP self

!

!

!

ip route 0.0.0.0 0.0.0.0 my gateway

!

tftp server

tftp server overwrite

http server

http secure-server

no snmp agent

ip ftp server

no ip scp server

no ip sntp server

!

!

!

!

!

!

!

!

sip

sip udp 5060

no sip tcp

!

!

!

voice feature-mode network

voice timeouts interdigit 1

voice flashhook mode transparent

voice forward-mode local

voice call-appearance-mode single

!

!

!

!

voice spre 1 *XX

!

!

!

!

voice dial-plan 1 local XXX-XXX-XXXX

voice dial-plan 2 local 012-999

voice dial-plan 3 long-distance 1-XXX-XXX-XXXX

voice dial-plan 4 extensions 200XX default

!

!

!

!

voice codec-list 711

  codec g711ulaw

!

!

!

voice trunk T01 type sip

  description "sip"

removed

!

!

voice grouped-trunk MAIN

  trunk T01

  accept $ cost 0

!

!

voice user 1001

  connect fxs 0/1

  no cos

  password encrypted "2c28de02811752912fc8b57565b9b766ed74"

  no special-ring-cadences

  hotline 10000000001

  sip-authentication password encrypted "20241fb5fa61fd07e8ac0843433612c1bdfd"

!

!

!

voice user 1002

  connect fxs 0/2

  no cos

  password encrypted "4044a0ec1b99ec2e460b8f2203161619f745"

  no special-ring-cadences

  hotline 10000000002

  sip-authentication password encrypted "3337229fde24f898298cc1e122bfb0cf17ea"

!

!

!

voice user 1003

  connect fxs 0/3

  no cos

  password encrypted "2723ef1bace523e88dc1839aa58a7da49d2f"

  no special-ring-cadences

  hotline 10000000003

  sip-authentication password encrypted "45415449938feb32129cddcc45523a95ebcb"

!

!

!

voice user 1004

  connect fxs 0/4

  no cos

  password encrypted "1c18c8833690fd7eb7cd7af7485d29c9883c"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "4044a0ec1b99ec2e460b8f2203161619f745"

!

!

!

voice user 1005

  connect fxs 0/5

  no cos

  password encrypted "2a2e91b25728c5115d45ab133f07d353344f"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "353137ad1740f72c81782ec3266d6bc6f99f"

!

!

!

voice user 1006

  connect fxs 0/6

  no cos

  password encrypted "2125a983579bb686fa2262b5796c652c338a"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3d39879abc1d03f78fa1b48a8a1f24e4a871"

!

!

!

voice user 1007

  connect fxs 0/7

  no cos

  password encrypted "45415449938feb32129cddcc45523a95ebcb"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3135e1c931c57f186b963c832c6893169202"

!

!

!

voice user 1008

  connect fxs 0/8

  no cos

  password encrypted "15116ef4fba078a29de5f22184e0a21588ac"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "1b1f258bde4c9f3b85c50fc983ce3e214e68"

!

!

!

voice user 1009

  connect fxs 0/9

  no cos

  password encrypted "3a3e1cc71c0f808a7a5ca64d5ad31b5a2cc9"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3632c4555bae3c30d946651decec5e91b7ef"

!

!

!

voice user 1010

  connect fxs 0/10

  no cos

  password encrypted "23276f427bfc89780d7b16d61c9b89691d63"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3f3b802c6899a4539120d2dbd1042cd80022"

!

!

!

voice user 1011

  connect fxs 0/11

  no cos

  password encrypted "20241fb5fa61fd07e8ac0843433612c1bdfd"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3d39879abc1d03f78fa1b48a8a1f24e4a871"

!

!

!

voice user 1012

  connect fxs 0/12

  no cos

  password encrypted "3f3b802c6899a4539120d2dbd1042cd80022"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "1f1b4c6c6b536f39041ac568f6e7eec6ada1"

!

!

!

voice user 1013

  connect fxs 0/13

  no cos

  password encrypted "1d19ceda69a42a9bef9c14274072fd1ae35b"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "383c1b9e2f18b569b1350b96da4ae62fc205"

!

!

!

voice user 1014

  connect fxs 0/14

  no cos

  password encrypted "2f2b67a85fc7fe507f6c2215dd4664bfcfd8"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "2f2b67a85fc7fe507f6c2215dd4664bfcfd8"

!

!

!

voice user 1015

  connect fxs 0/15

  no cos

  password encrypted "2d29d1f00300e2495106be31cf767d5bc500"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "23276f427bfc89780d7b16d61c9b89691d63"

!

!

!

voice user 1016

  connect fxs 0/16

  no cos

  password encrypted "393d0220721d4b8477cde8216266871c7b46"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3337229fde24f898298cc1e122bfb0cf17ea"

!

!

!

voice user 1017

  connect fxs 0/17

  no cos

  password encrypted "282c0ff1325a613326a47fc15ba1ed0f1040"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "2622b51652bff45f7015d5cace18e9162d35"

!

!

!

voice user 1018

  connect fxs 0/18

  no cos

  password encrypted "20241fb5fa61fd07e8ac0843433612c1bdfd"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "43475f36f75fb13660802c7be4f5683a5ecd"

!

!

!

voice user 1019

  connect fxs 0/19

  no cos

  password encrypted "3e3aabc0269fffe530c60954016850c211a3"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "383c1b9e2f18b569b1350b96da4ae62fc205"

!

!

!

voice user 1020

  connect fxs 0/20

  no cos

  password encrypted "3f3b802c6899a4539120d2dbd1042cd80022"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "383c1b9e2f18b569b1350b96da4ae62fc205"

!

!

!

voice user 1021

  connect fxs 0/21

  no cos

  password encrypted "1410d98cc24448d33d16eaa509eb5aef8ed3"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "1f1b4c6c6b536f39041ac568f6e7eec6ada1"

!

!

!

voice user 1022

  connect fxs 0/22

  no cos

  password encrypted "2e2a4c3774c3f32472ab92d4ad8ddb4dbeae"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "24209cc96b444d215061178c14ab5e607014"

!

!

!

voice user 1023

  connect fxs 0/23

  no cos

  password encrypted "43475f36f75fb13660802c7be4f5683a5ecd"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "3632c4555bae3c30d946651decec5e91b7ef"

!

!

!

voice user 1024

  connect fxs 0/24

  no cos

  password encrypted "42464ccdbdf56addca4edf6f3a94425d4e9e"

  no special-ring-cadences

  hotline 012999

  sip-authentication password encrypted "161214f02c7d3ea8b41ff99f9d434ab7057c"

!

!

voice ring-group 6351

  type linear

  num-rings 4

  member 1001

  login-member 1001

  coverage internal 20002

  coverage internal 20003

  coverage internal 20004

  alias 502

!

!

voice ring-group 20002

  type linear

  num-rings 4

  member 1002

  login-member 1002

!

!

voice ring-group 20003

  type linear

  num-rings 4

  member 1003

  login-member 1003

!

!

voice ring-group 20004

  type linear

  num-rings 4

  member 1004

  login-member 1004

!

!

voice ring-group 6352

  type linear

  num-rings 4

  member 1005

  login-member 1005

  coverage internal 20006

  coverage internal 20007

  coverage internal 20008

  alias 501

!

!

voice ring-group 20006

  type linear

  num-rings 4

  member 1006

  login-member 1006

!

!

voice ring-group 20007

  type linear

  num-rings 4

  member 1007

  login-member 1007

!

!

voice ring-group 20008

  type linear

  num-rings 4

  member 1008

  login-member 1008

!

!

voice ring-group 6353

  type linear

  num-rings 4

  member 1009

  login-member 1009

  coverage internal 20010

  coverage internal 20011

  coverage internal 20012

  alias 503

!

!

voice ring-group 20010

  type linear

  num-rings 4

  member 1010

  login-member 1010

!

!

voice ring-group 20011

  type linear

  num-rings 4

  member 1011

  login-member 1011

!

!

voice ring-group 20012

  type linear

  num-rings 4

  member 1012

  login-member 1012

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

sdp grammar hold rfc3264

!

ip rtp quality-monitoring

ip rtp quality-monitoring udp

ip rtp quality-monitoring sip

!

line con 0

  login local-userlist

!

line telnet 0 4

  login local-userlist

  password encrypted 3136a0f76ca154f22d4f2074b779dd60594f

  shutdown

line ssh 0 4

  login local-userlist

  no shutdown

!

sntp server time.nist.gov

!

!

!

!

tcl run Test_Off.tcl track TEST on-fail

!

!

end

Re: Error opening the file or script.

Jump to solution

it is working. thank you very much Petric

this was wrong...

tcl run Test_Off.tcl track TEST on-fail

had to change it as on-pass

couple of questions

a. is there an actual limit of 5 schedules in one track? or only in the gui however i can add more in the cli?

b. i have an interesting issue that when i copy the config file with the settings in it it will not work until i go back in to the track settings in the gui and check the Execute TCL: otherwise it will not have the tcl in there even that its in the config

c. can i run a tcl file to play a sound file on the fxs like a tone etc. at a specific time

Thank you again for your help!!!

Anonymous
Not applicable

Re: Error opening the file or script.

Jump to solution

A) I haven't tested it, but it does look like you can add more schedules by using the GUI.

B) This I'm not sure. If the line "tcl run Test_Off.tcl track TEST on-pass" shows in the configuration, then it is there. I haven't used the Web GUI at all in my configuration.

C) No, you cannot play a sound file out the FXS - at least not on the TA900s.