Hi,
I have been learning a little scripting with Aspect to help me automate the restructuring a client is doing. So far what I have has helped, but I think there is a better way.
I know Aspect can read a tab delimited file for string values but can it be used to execute a command on a PBX, take the output from that command parse the data and write out the one string that is needed in to the same or additional tab delimited file?
For example, say I had the extension number 5555 in my input file and I wanted the set type and TN added to that file.
1) Aspect would read the text file and note the first line is 5555
2) Aspect would issue the commands I've programmed in to the PBX to display the extension config.
3) Aspect would parse this output from the PBX:
DN 5555
CPND
NAME TEST PHONE
XPLN 13
DISPLAY_FMT FIRST,LAST
TYPE SL1
TN 004 1 05 02 KEY 00 H MARP DES AST 26 NOV 2007
(2616)
4)Aspect would take the value 004 1 05 02 from the TN line and the value 2616 from the set type line and export them either in to the same file that contains the extension number or a new file that contains the extension number, TN, and set type to end up with a result like this:
5555 004 1 05 02 2616
Sorry for the novel, but is such a thing possible within this scripting language?
Thanks as always!
I have been learning a little scripting with Aspect to help me automate the restructuring a client is doing. So far what I have has helped, but I think there is a better way.
I know Aspect can read a tab delimited file for string values but can it be used to execute a command on a PBX, take the output from that command parse the data and write out the one string that is needed in to the same or additional tab delimited file?
For example, say I had the extension number 5555 in my input file and I wanted the set type and TN added to that file.
1) Aspect would read the text file and note the first line is 5555
2) Aspect would issue the commands I've programmed in to the PBX to display the extension config.
3) Aspect would parse this output from the PBX:
DN 5555
CPND
NAME TEST PHONE
XPLN 13
DISPLAY_FMT FIRST,LAST
TYPE SL1
TN 004 1 05 02 KEY 00 H MARP DES AST 26 NOV 2007
(2616)
4)Aspect would take the value 004 1 05 02 from the TN line and the value 2616 from the set type line and export them either in to the same file that contains the extension number or a new file that contains the extension number, TN, and set type to end up with a result like this:
5555 004 1 05 02 2616
Sorry for the novel, but is such a thing possible within this scripting language?
Thanks as always!