Skip to content

A library that allows one to take an ASCII or Binary file from an Avaya CMS External Call History Interface (ECHI) and convert it into a Ruby hash for further processing.

License

jsgoecke/echi_files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECHI Files Ruby Library

Description

A library that allows one to take an ASCII or Binary file from an Avaya CMS External Call History Interface (ECHI) and convert it into a Ruby hash for further processing.

Features

  • Convert Binary file to Ruby hash
  • Convert ASCII file to Ruby hash
  • Support both standard and extended file formats
  • Tested with both Ruby 1.8.6 and JRuby 1.1.5

Example
require ‘echi_files’

#Provide a filename to process as an argument on the commandline
filename = File.expand_path(ARGV0)

#Open the file
filehandle = open(filename, “rb”)

#Instantiate an EchiFiles class to process your ASCII or BINARY files
echi_handler = EchiFiles.new

#Use this to process a binary file
file_type = ‘BINARY
format = ‘EXTENDED
#In some cases the extra_byte is needed
extra_byte = true
data = echi_handler.process_file(filehandle, file_type, format, extra_byte)

#Use this to process a binary file
file_type = ‘ASCII
format = ‘EXTENDED
extra_byte = true
#Use this to process an ASCII file
data = echi_handler.process_file(filehandle, file_type, format, extra_byte)

#If you need to strip in characters from the asaiuui field
#data Is the Array of Hashes converted above #array_of_decimal_values Is an array of decimal ascii values to be stripped
data = echi_handler.strip_asaiuui(data, array_of_decimal_values)

Dependencies

  • FasterCSV 1.4.0+

Installation

sudo gem install jsgoecke-echi_files —source=http://gems.github.com/

About

A library that allows one to take an ASCII or Binary file from an Avaya CMS External Call History Interface (ECHI) and convert it into a Ruby hash for further processing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages