cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

command over sms

4979
Views
0
Helpful
19
Comments

Attached policy provides CLI access to the Cisco 4G router over text messaging.   Two files are in the attached .tar file:

1.  commandoversms.tcl

2.  PDF with instructions on how to load and use the .tcl file.

Comments
Beginner

This sounds good but when I use it nothing happens and the router has this message:

 

 commandoversms.tcl: Unable to read body of SMS message (variable cmd not set)

Cisco Employee

I noticed the same message when I tried on some of the newer IOS releases.   I have updated the script and it should work now.  Download the current commandoversms.tar file and see if this one works for you.

Beginner

Hmm.  Now I get this.

commandoversms.tcl: Unable to read body of SMS message (variable cmd not set) & loop = 6

Cisco Employee

Please reach out to me on email.   My email address is dafrey@cisco.com and we can setup a web ex and take a look.

Beginner

Thank you Dan! you're the man... it works now after re-registered the policy.

Cisco Employee

If the policy does not work initially try reregistering by using these two commands and try again.

 

"no event manager policy commandoversms.tcl type user" 

"event manager policy commandoversms.tcl type user authorization bypass" 

Beginner

PDF file ISR_LTE_SMS_Site_Survey_Status_Usage_OOB_Mgmt_040218.pdf is not readable

Adobe ERROR.jpg

Cisco Employee

Folks, while the issue with the PDF file is repaired, you can download or view the document here:  

https://www.cisco.com/c/dam/en/us/td/docs/routers/access/interfaces/software/deployment/guide/guide_isr_lte_sms.pdf 

If extra characters appear, simply copy the above url (which should end in "pdf" and paste manually into the browser.

Beginner

I'm getting 404 on that link to the pdf.  I'm also getting "Invalid input detected" when I issue ad-hoc commands over sms with a 4351 running IOS 16.9(2).  "survey" and "survey says" work properly.

Cisco Employee

I'll try to fix the link, which has extraneous characters at the end.  It works with this link:

https://www.cisco.com/c/dam/en/us/td/docs/routers/access/interfaces/software/deployment/guide/guide_isr_lte_sms.pdf

Cisco Employee

Keith,

Can you run "debug event manager all" then send ad hoc message over SMS to the router.   Please post output of debug message.

 

Thanks,

Dan

Beginner
2976-NetOPS-ThrFutureLab_isw#debug event manager all
All possible Embedded Event Manager debugging has been turned on
2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:17.439 EST: Cellular0/2/0: New SMS received on index 4. Please issue a view command to see it
*Feb 12 2019 14:16:17.440 EST: fh_server_event_handler XOS_IPC_ASYNC_REQ_MSG: FH_MSG_DETECTOR_POLL
*Feb 12 2019 14:16:17.441 EST: fh_send_server_sig: received a pulse from syslog on node0/0 with fdid: 3
*Feb 12 2019 14:16:17.441 EST: fh_reg_send_msg_to_fd server sending FH_MSG_SERVER_POLL message to FD:syslog xos_ipc_sync_send to fdc->eph = 262147)
*Feb 12 2019 14:16:17.441 EST: fh_reg_send_msg_to_fd server sent FH_MSG_SERVER_POLL message to FD:syslog event passed to fdc->eph = 262147 status 0
*Feb 12 2019 14:16:17.441 EST: fh_send_server_sig: received FH_MSG_EVENT_PUBLISH
*Feb 12 2019 14:16:17.441 EST: EEM: server processes multi events: esid=1
*Feb 12 2019 14:16:17.441 EST: EEM: server processes multi events: timewin=1, sync_flag=0, ec_index=0, cmp_occ=1
*Feb 12 2019 14:16:17.442 EST: EEM: server processes multi events: get correlate result esid=1
*Feb 12 2019 14:16:17.442 EST: EEM: ctx=1:(1,1,1)
*Feb 12 2019 14:16:17.442 EST: EEM: server processes multi events: corr_res=1, cur_tcnt=1, cmp_tcnt=1
*Feb 12 2019 14:16:17.442 EST: EEM: server processes multi events: schedule an event esid=1, corr_id=3, grpid=1
*Feb 12 2019 14:16:17.442 EST: fh_schedule_policy: prev_epc=0x0; epc=0x80007EFBF8D54CB8
*Feb 12 2019 14:16:17.442 EST: EEM server schedules scripts
*Feb 12 2019 14:16:17.442 EST: EEM server schedules one event: policy_type=script epc=0x80007EFBF8D54CB8.
*Feb 12 2019 14:16:17.442 EST: EEM: server schedules a policy: policyname=tmpsys:/eem_policy/commandoversms.tcl
*Feb 12 2019 14:16:17.442 EST: spawn script tmpsys:/eem_policy/commandoversms.tcl
*Feb 12 2019 14:16:17.443 EST: EEM policy tmpsys:/eem_policy/commandoversms.tcl has been scheduled to run
*Feb 12 2019 14:16:17.444 EST: fh_spawn: -FMRUN -FMSAFE tmpsys:/lib/tcl/base.tcl tmpsys:/eem_policy/commandoversms.tcl
*Feb 12 2019 14:16:17.444 EST: fh_tcl_spawn: argc=5, argstr=-FMRUN, stdin=null:/commandoversms.tcl, stdout=syslog:/info/noscan/commandoversms.tcl,stderr=syslog:/err/noscan/commandoversms.tcl, priority=4, eid=1
*Feb 12 2019 14:16:17.444 EST: pid for spawned process is 698. fdid: 3 sn: 2 jobid: 3
*Feb 12 2019 14:16:17.444 EST: EEM: server processes multi events: clean correlate data in ec: esid=1
*Feb 12 2019 14:16:17.446 EST: fh_tcl_esi_open: fd=12
*Feb 12 2019 14:16:17.447 EST: fh_tcl_esi_open: fd=13
*Feb 12 2019 14:16:17.447 EST: fh_tcl_get_mode: mode = 1, StartupScript = tmpsys:/lib/tcl/base.tcl, RealScript = tmpsys:/eem_policy/commandoversms.tcl
*Feb 12 2019 14:16:17.447 EST: fh_set_tclpath_global: tcl_library is set to tmpsys:/lib/tcl
*Feb 12 2019 14:16:17.447 EST: fh_set_tclpath_global: auto_path is set to tmpsys:/eem_lib_user tmpsys:/eem_lib_system
*Feb 12 2019 14:16:17.459 EST: fh_io_ipc_msg: received FH_MSG_API_INIT; jobid=18, processid=698, client=8, job name=EEM TCL Proc
*Feb 12 2019 14:16:17.460 EST: fh_register_evreg_cmds: tctx=80007EFBF8D426C8, dummy=1
*Feb 12 2019 14:16:17.460 EST: fh_tcl_compile_policy: evaluating policy: startup_scriptname=tmpsys:/lib/tcl/base.tcl, real_scriptname=tmpsys:/eem_policy/commandoversms.tcl
*Feb 12 2019 14:16:17.464 EST: fh_tcl_slave_interp_init: interp=80007EFBF8EB19E8, tctx=80007EFBF8D426C8, fh_mode=1, real=tmpsys:/eem_policy/commandoversms.tcl, curr=commandoversms.tcl
*Feb 12 2019 14:16:17.472 EST: fh_register_evreg_cmds: tctx=80007EFBF8D426C8, dummy=1
*Feb 12 2019 14:16:17.792 EST: [fh_event_reqinfo_cmd]
*Feb 12 2019 14:16:17.792 EST: fh_server: fh_io_ipc_msg: received msg FH_MSG_EVENT_REQINFO from client 8 pclient 8
*Feb 12 2019 14:16:17.792 EST: [fh_process_event_reqinfo]
*Feb 12 2019 14:16:17.792 EST: Registering tag: id: 1
*Feb 12 2019 14:16:17.792 EST: Registering tag: id: 2
*Feb 12 2019 14:16:17.792 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.792 EST: open tag is
*Feb 12 2019 14:16:17.792 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.793 EST: open tag is
*Feb 12 2019 14:16:17.793 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.793 EST: open tag is
*Feb 12 2019 14:16:17.793 EST: Name-Value Pair: Name=(pdir) Value=(_event_type)
*Feb 12 2019 14:16:17.793 EST: Name-Value Pair: Name=(tcl) Value=(event_type)
*Feb 12 2019 14:16:17.793 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.793 EST: open tag is
*Feb 12 2019 14:16:17.793 EST: Popping tag off stack
*Feb 12 2019 14:16:17.793 EST: close tag is

*Feb 12 2019 14:16:17.793 EST: Popping tag off stack
*Feb 12 2019 14:16:17.794 EST: close tag is

*Feb 12 2019 14:16:17.794 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.794 EST: open tag is
*Feb 12 2019 14:16:17.794 EST: Popping tag off stack
*Feb 12 2019 14:16:17.794 EST: close tag is

*Feb 12 2019 14:16:17.794 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.794 EST: open tag is
*Feb 12 2019 14:16:17.794 EST: Name-Value Pair: Name=(pdir) Value=(_event_type_string)
*Feb 12 2019 14:16:17.794 EST: Name-Value Pair: Name=(tcl) Value=(event_type_string)
*Feb 12 2019 14:16:17.795 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.795 EST: open tag is
*Feb 12 2019 14:16:17.795 EST: Popping tag off stack
*Feb 12 2019 14:16:17.795 EST: close tag is

*Feb 12 2019 14:16:17.795 EST: Popping tag off stack
*Feb 12 2019 14:16:17.795 EST: close tag is

*Feb 12 2019 14:16:17.795 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.795 EST: open tag is
*Feb 12 2019 14:16:17.795 EST: Name-Value Pair: Name=(pdir) Value=(_event_severity)
*Feb 12 2019 14:16:17.795 EST: Name-Value Pair: Name=(tcl) Value=(event_severity)
*Feb 12 2019 14:16:17.796 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.796 EST: open tag is
*Feb 12 2019 14:16:17.796 EST: Popping tag off stack
*Feb 12 2019 14:16:17.796 EST: close tag is

*Feb 12 2019 14:16:17.796 EST: Popping tag off stack
*Feb 12 2019 14:16:17.796 EST: close tag is

*Feb 12 2019 14:16:17.796 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.796 EST: open tag is
*Feb 12 2019 14:16:17.796 EST: Popping tag off stack
*Feb 12 2019 14:16:17.796 EST: close tag is

*Feb 12 2019 14:16:17.797 EST: Popping tag off stack
*Feb 12 2019 14:16:17.797 EST: close tag is

*Feb 12 2019 14:16:17.797 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.797 EST: open tag is
*Feb 12 2019 14:16:17.797 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.797 EST: open tag is
*Feb 12 2019 14:16:17.797 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_msg_count)
*Feb 12 2019 14:16:17.797 EST: Name-Value Pair: Name=(tcl) Value=(msg_count)
*Feb 12 2019 14:16:17.797 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.798 EST: open tag is
*Feb 12 2019 14:16:17.798 EST: Popping tag off stack
*Feb 12 2019 14:16:17.798 EST: close tag is

*Feb 12 2019 14:16:17.798 EST: Popping tag off stack
*Feb 12 2019 14:16:17.798 EST: close tag is

*Feb 12 2019 14:16:17.798 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.798 EST: open tag is
*Feb 12 2019 14:16:17.798 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_priority)
*Feb 12 2019 14:16:17.798 EST: Name-Value Pair: Name=(tcl) Value=(priority)
*Feb 12 2019 14:16:17.799 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.799 EST: open tag is
*Feb 12 2019 14:16:17.799 EST: Popping tag off stack
*Feb 12 2019 14:16:17.799 EST: close tag is

*Feb 12 2019 14:16:17.799 EST: Popping tag off stack
*Feb 12 2019 14:16:17.799 EST: close tag is

*Feb 12 2019 14:16:17.799 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.799 EST: open tag is
*Feb 12 2019 14:16:17.799 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_msg)
*Feb 12 2019 14:16:17.799 EST: Name-Value Pair: Name=(tcl) Value=(msg)
*Feb 12 2019 14:16:17.800 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.800 EST: open tag is
*Feb 12 2019 14:16:17.800 EST: Popping tag off stack
*Feb 12 2019 14:16:17.800 EST: close tag is

*Feb 12 2019 14:16:17.800 EST: Popping tag off stack
*Feb 12 2019 14:16:17.800 EST: close tag is

*Feb 12 2019 14:16:17.800 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.800 EST: open tag is
*Feb 12 2019 14:16:17.800 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_sequence)
*Feb 12 2019 14:16:17.800 EST: Name-Value Pair: Name=(tcl) Value=(sequence)
*Feb 12 2019 14:16:17.801 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.801 EST: open tag is
*Feb 12 2019 14:16:17.801 EST: Popping tag off stack
*Feb 12 2019 14:16:17.801 EST: close tag is

*Feb 12 2019 14:16:17.801 EST: Popping tag off stack
*Feb 12 2019 14:16:17.801 EST: close tag is

*Feb 12 2019 14:16:17.801 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.801 EST: open tag is
*Feb 12 2019 14:16:17.801 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_timestamp)
*Feb 12 2019 14:16:17.801 EST: Name-Value Pair: Name=(tcl) Value=(timestamp)
*Feb 12 2019 14:16:17.802 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.802 EST: open tag is
*Feb 12 2019 14:16:17.802 EST: Popping tag off stack
*Feb 12 2019 14:16:17.802 EST: close tag is

*Feb 12 2019 14:16:17.802 EST: Popping tag off stack
*Feb 12 2019 14:16:17.802 EST: close tag is

*Feb 12 2019 14:16:17.802 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.802 EST: open tag is
*Feb 12 2019 14:16:17.802 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_facility)
*Feb 12 2019 14:16:17.802 EST: Name-Value Pair: Name=(tcl) Value=(facility)
*Feb 12 2019 14:16:17.803 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.803 EST: open tag is
*Feb 12 2019 14:16:17.803 EST: Popping tag off stack
*Feb 12 2019 14:16:17.803 EST: close tag is

*Feb 12 2019 14:16:17.803 EST: Popping tag off stack
*Feb 12 2019 14:16:17.803 EST: close tag is

*Feb 12 2019 14:16:17.803 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.804 EST: open tag is
*Feb 12 2019 14:16:17.804 EST: Name-Value Pair: Name=(pdir) Value=(_syslog_mnemonic)
*Feb 12 2019 14:16:17.804 EST: Name-Value Pair: Name=(tcl) Value=(mnemonic)
*Feb 12 2019 14:16:17.804 EST: Pushing tag on to stack
*Feb 12 2019 14:16:17.804 EST: open tag is
*Feb 12 2019 14:16:17.804 EST: Popping tag off stack
*Feb 12 2019 14:16:17.804 EST: close tag is

*Feb 12 2019 14:16:17.804 EST: Popping tag off stack
*Feb 12 2019 14:16:17.804 EST: close tag is

*Feb 12 2019 14:16:17.804 EST: Popping tag off stack
*Feb 12 2019 14:16:17.805 EST: close tag is

*Feb 12 2019 14:16:17.805 EST: Popping tag off stack
*Feb 12 2019 14:16:17.805 EST: close tag is

*Feb 12 2019 14:16:17.805 EST: [fh_event_reqinfo_cmd] event_trigger_num 1 event_id 1 job_id 3 event_pub_sec 1549998977 event_pub_msec 440 event_pub_time 1549998977.440 event_type {41} event_type_string {syslog} event_severity {severity-debugging} msg_count {3} priority {debugging} msg {
*Feb 12 2019 14:16:17.439 EST: Cellular0/2/0: New SMS received on index 4. } sequence {} timestamp {} facility {} mnemonic {}
*Feb 12 2019 14:16:17.806 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:17.814 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:17.814 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : CTL : cli_open called.
*Feb 12 2019 14:16:17.814 EST: [fh_tty_open_cmd]
*Feb 12 2019 14:16:17.818 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:17.829 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:17.829 EST: [fh_tty_read_cmd] size= 214
*Feb 12 2019 14:16:17.830 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:17.866 EST: %CELLWAN-2-SMS_INBOX_ARCH_OPEN_ERROR: Cellular0/2/0 failed to open ftp://netops:netops@10.224.144.12/SMS//inbox to archive incoming SMS.
*Feb 12 2019 14:16:17.943 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:17.943 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : CCCCC
*Feb 12 2019 14:16:17.943 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : You are about to access a proprietary and confidential network.
*Feb 12 2019 14:16:17.943 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : Any unauthorized use of this networks resources will result in prosecution to
*Feb 12 2019 14:16:17.943 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : the fullest extent of the law!
*Feb 12 2019 14:16:17.943 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:17.945 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:17.945 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#enable
*Feb 12 2019 14:16:17.945 EST: [fh_tty_write_cmd]
*Feb 12 2019 14:16:17.945 EST: [fh_tty_write_cmd] cmd = enable, cmdsize = 6
*Feb 12 2019 14:16:17.945 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:17.946 EST: cli_history_entry_add: free_hist_list size=0, hist_list size=7
*Feb 12 2019 14:16:17.946 EST: eem_no_scan flag set, skipping scan of command_string=enable
*Feb 12 2019 14:16:17.956 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:17.956 EST: [fh_tty_read_cmd] size= 31
*Feb 12 2019 14:16:17.957 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:18.058 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.058 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:18.059 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.059 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#Cellular 0/2/0 lte sms view 4
*Feb 12 2019 14:16:18.059 EST: [fh_tty_write_cmd]
*Feb 12 2019 14:16:18.059 EST: [fh_tty_write_cmd] cmd = Cellular 0/2/0 lte sms view 4, cmdsize = 29
*Feb 12 2019 14:16:18.059 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:18.070 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.070 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:18.119 EST: cli_history_entry_add: free_hist_list size=0, hist_list size=7
*Feb 12 2019 14:16:18.119 EST: eem_no_scan flag set, skipping scan of command_string=cellular Cellular0/2/0 lte sms view 4
*Feb 12 2019 14:16:18.170 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.170 EST: [fh_tty_read_cmd] size= 127
*Feb 12 2019 14:16:18.171 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:18.272 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : SMS ID: 4
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : TIME: 19/02/12 14:14:03
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : FROM: *phone number omitted*
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : TO: *lab router phone number omitted*
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : SIZE: 6
*Feb 12 2019 14:16:18.272 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : CONTENT: Sh ver
*Feb 12 2019 14:16:18.273 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:18.277 EST: [fh_action_syslog_cmd]
*Feb 12 2019 14:16:18.277 EST: %HA_EM-6-LOG: commandoversms.tcl: received SMS from *phone number omitted* : CONTENT: Sh ver
*Feb 12 2019 14:16:18.289 EST: %HA_EM-6-LOG: commandoversms.tcl: sms-cmd: CONTENT: Sh ver
*Feb 12 2019 14:16:18.289 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.289 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#CONTENT: Sh ver
*Feb 12 2019 14:16:18.289 EST: [fh_tty_write_cmd]
, cmdsize = 164:16:18.289 EST: [fh_tty_write_cmd] cmd = CONTENT: Sh ver
*Feb 12 2019 14:16:18.290 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:18.300 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.300 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:18.400 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.400 EST: [fh_tty_read_cmd] size= 128
*Feb 12 2019 14:16:18.400 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:18.501 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.501 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : CONTENT: Sh ver
*Feb 12 2019 14:16:18.501 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : ^
*Feb 12 2019 14:16:18.501 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : % Invalid input detected at '^' marker.
*Feb 12 2019 14:16:18.501 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT :
*Feb 12 2019 14:16:18.501 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:18.502 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:18.507 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.507 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#Cellular 0/2/0 lte sms send *phone number omitted* 2976-NetOPS-ThrFutureLab_isw# 2976-NetOPS-ThrFutureLab_isw# % Invalid input detected at '^' marker. ^ CONTENT: Sh ver
*Feb 12 2019 14:16:18.507 EST: [fh_tty_write_cmd]
*Feb 12 2019 14:16:18.507 EST: [fh_tty_write_cmd] cmd = Cellular 0/2/0 lte sms send *phone number omitted* 2976-NetOPS-ThrFutureLab_isw# 2976-NetOPS-ThrFutureLab_isw# % Invalid input detected at '^' marker. ^ CONTENT: Sh ver , cmdsize = 157
*Feb 12 2019 14:16:18.507 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:18.518 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.519 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:18.619 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.619 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:18.719 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.719 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:18.772 EST: cli_history_entry_add: free_hist_list size=0, hist_list size=7
*Feb 12 2019 14:16:18.772 EST: eem_no_scan flag set, skipping scan of command_string=cellular Cellular0/2/0 lte sms send *phone number omitted* 2976-NetOPS-ThrFutureLab_isw# 2976-NetOPS-ThrFutureLab_isw# % Invalid input detected at '^' marker. ^ CONTENT: Sh ver
*Feb 12 2019 14:16:18.820 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.820 EST: [fh_tty_read_cmd] size= 31
*Feb 12 2019 14:16:18.820 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:18.857 EST: ND Update CDP Notification Event for HQ_4510R_FL3.netops.reg on Gi0/0/2
*Feb 12 2019 14:16:18.858 EST: fh_fd_nd_event_match: num_matches = 0
*Feb 12 2019 14:16:18.922 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.922 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:18.922 EST: %HA_EM-6-LOG: commandoversms.tcl: SMS sent = 2976-NetOPS-ThrFutureLab_isw# 2976-NetOPS-ThrFutureLab_isw# % Invalid input detected at '^' marker. ^ CONTENT: Sh ver
*Feb 12 2019 14:16:18.922 EST: %HA_EM-6-LOG: commandoversms.tcl: ---------------------------------------------------------------------------------------
*Feb 12 2019 14:16:18.926 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:18.926 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : CTL : cli_open called.
*Feb 12 2019 14:16:18.926 EST: [fh_tty_open_cmd]
*Feb 12 2019 14:16:18.927 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:18.937 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:18.937 EST: [fh_tty_read_cmd] size= 214
*Feb 12 2019 14:16:18.937 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:19.039 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.039 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : CCCCC
*Feb 12 2019 14:16:19.039 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : You are about to access a proprietary and confidential network.
*Feb 12 2019 14:16:19.039 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : Any unauthorized use of this networks resources will result in prosecution to
*Feb 12 2019 14:16:19.039 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : the fullest extent of the law!
*Feb 12 2019 14:16:19.039 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:19.040 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.040 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#enable
*Feb 12 2019 14:16:19.040 EST: [fh_tty_write_cmd]
*Feb 12 2019 14:16:19.040 EST: [fh_tty_write_cmd] cmd = enable, cmdsize = 6
*Feb 12 2019 14:16:19.040 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:19.044 EST: cli_history_entry_add: free_hist_list size=0, hist_list size=7
*Feb 12 2019 14:16:19.044 EST: eem_no_scan flag set, skipping scan of command_string=enable
*Feb 12 2019 14:16:19.051 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:19.051 EST: [fh_tty_read_cmd] size= 31
*Feb 12 2019 14:16:19.051 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:19.152 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.152 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:19.153 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.153 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : IN : 2976-NetOPS-ThrFutureLab_isw#Cellular 0/2/0 lte sms delete 4
*Feb 12 2019 14:16:19.153 EST: [fh_tty_write_cmd]
, cmdsize = 324:16:19.153 EST: [fh_tty_write_cmd] cmd = Cellular 0/2/0 lte sms delete 4
*Feb 12 2019 14:16:19.153 EST: [fh_sys_reqinfo_routername_cmd]
*Feb 12 2019 14:16:19.163 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:19.163 EST: [fh_tty_read_cmd] read not ready
*Feb 12 2019 14:16:19.204 EST: cli_history_entry_add: free_hist_list size=0, hist_list size=7
*Feb 12 2019 14:16:19.204 EST: eem_no_scan flag set, skipping scan of command_string=cellular Cellular0/2/0 lte sms delete 4
*Feb 12 2019 14:16:19.204 EST: sms_delete_by_id, msg_id = 4 message_index = 4
*Feb 12 2019 14:16:19.264 EST: [fh_tty_read_cmd]
*Feb 12 2019 14:16:19.264 EST: [fh_tty_read_cmd] size= 62
*Feb 12 2019 14:16:19.264 EST: [fh_tty_prompt_cmd]
*Feb 12 2019 14:16:19.365 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.365 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:19.365 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : OUT : 2976-NetOPS-ThrFutureLab_isw#
*Feb 12 2019 14:16:19.366 EST: [fh_action_syslog_cmd]
*Feb 12 2019 14:16:19.366 EST: %HA_EM-6-LOG: commandoversms.tcl: Successfully deleted SMS message 4 from SIM
*Feb 12 2019 14:16:19.366 EST: [fh_cli_debug_cmd]
*Feb 12 2019 14:16:19.367 EST: %HA_EM-6-LOG: commandoversms.tcl : DEBUG(cli_lib) : CTL : cli_close called.
*Feb 12 2019 14:16:19.367 EST: [fh_tty_close_cmd]
*Feb 12 2019 14:16:19.367 EST: [fh_tcl_exit_cmd]
*Feb 12 2019 14:16:19.367 EST: [fh_tcl_exit_cmd] set _exit_code=1
*Feb 12 2019 14:16:19.367 EST: fh_server: fh_io_ipc_msg: received msg FH_MSG_API_CLOSE from client 8 pclient 8
*Feb 12 2019 14:16:19.367 EST: fh_io_ipc_msg: received FH_MSG_API_CLOSE client=8
*Feb 12 2019 14:16:19.370 EST: fh_tcl_esi_close: fd=12
*Feb 12 2019 14:16:19.371 EST: fh_tcl_esi_close: fd=13
*Feb 12 2019 14:16:19.371 EST: fh_tcl_assoc_data_delproc: freeing tctx=0x80007EFBF8D426C8
*Feb 12 2019 14:16:19.415 EST:
*Feb 12 2019 14:16:19.415 EST: tty is now going through its death sequence
*Feb 12 2019 14:16:19.415 EST:
*Feb 12 2019 14:16:19.415 EST: tty is now going through its death sequence
*Feb 12 2019 14:16:19.459 EST: received SIGCHLD pulse from child death pid=698
*Feb 12 2019 14:16:19.459 EST: received pulse from child death code=2; epc=0x80007EFBF8D54CB8
*Feb 12 2019 14:16:19.459 EST: EEM policy commandoversms.tcl has completed with abnormal exit status of 0x1 exec_status=2 event_completion=0
*Feb 12 2019 14:16:19.459 EST: EEM fms_remote_chkpt_add_event_hist(), data_len = 3584, buf_size = 3596
*Feb 12 2019 14:16:19.459 EST: EEM: server decrements in use thread: jobid=3 rule id=1 in use thread=0.
*Feb 12 2019 14:16:19.459 EST: fh_schedule_policy: prev_epc=0x80007EFBF8D54CB8; epc=0x0
*Feb 12 2019 14:16:19.459 EST: EEM server schedules scripts
*Feb 12 2019 14:16:19.459 EST: EEM server schedules sync same source events:fdid=3; sn=2.
*Feb 12 2019 14:16:19.637 EST: %CELLWAN-2-SMS_OUTBOX_ARCH_OPEN_ERROR: Cellular0/2/0 failed to open ftp://netops:netops@10.224.144.12/SMS//outbox to archive an outgoing SMS.
*Feb 12 2019 14:16:19.638 EST: %CELLWAN-5-OUTGOING_SMS_SENT: Cellular0/2/0 has just sent an outgoing SMS successfully.
*Feb 12 2019 14:16:35.455 EST: ND Update CDP Notification Event for 2976_POSi_SW1.netsec.reg on Et1/0/0
*Feb 12 2019 14:16:35.456 EST: fh_fd_nd_event_match: num_matches = 0
*Feb 12 2019 14:16:59.999 EST: fh_fd_timer_process_async
*Feb 12 2019 14:17:00.000 EST: fh_fd_timer_process_async
*Feb 12 2019 14:17:10.518 EST: fh_fd_nd_event_match: num_matches = 0
Cisco Employee

Thanks for the output.    The EEM script reads the output if $intf lte sms view $index and assigns variable $cmd.  It looks like the word "CONTENT" was added to the output of this command so EEM is passing the cli command "CONTENT: Sh ver" and this is causing the error.

 

The error is in the debug: *Feb 12 2019 14:16:18.922 EST: %HA_EM-6-LOG: commandoversms.tcl: SMS sent = 2976-NetOPS-ThrFutureLab_isw# 2976-NetOPS-ThrFutureLab_isw# % Invalid input detected at '^' marker. ^ CONTENT: Sh ver

 

I have updated the script to take care of this in version 3.0.   

Beginner

Thank you!  That did the trick.  I wouldn't think of supporting remote routers without this script!  This script by itself is a good way to convince Management that Cisco equipment is worth the investment.

Beginner

Hi @Daniel Frey 

 

We are using your script on hundreds of IR807 routers and it is working like a charm! 

 

I would like to make two wishes:

 

1. We would like to "disable" the functionality of configuring the router via SMS (configure terminal). 

 

2. Remove the ability to make a "write erase" + "reload" 

 

Is it possible to do so? 

 

PS. I have tried to make a EEM script that disables the "write erase" command, but that only works at the CLI, not over SMS. 

CreatePlease to create content
Content for Community-Ad