CodeB CommandLine Interface (CLI)

For testing purposes we created an easy to use CommandLine Interface (CLI) to interact with the CodeB WebSocket API. Contact us in case you are interested to try it out!

The CodeB CLI support verbs (such as ping, add and check) with various options and parameters. It displays help messages if you call it with the help verb followed by the command. For example:

C:>codeb_cli.exe help ping

C:>codeb_cli.exe help add

C:>codeb_cli.exe help check

C:>codeb_cli.exe help dump

add

With the add verb you can register single calls or the complete content of CDR files to the CodeB call oracle.

Help: codeb_cli.exe help add

Calls are always hashed, salted and peppered before publishing. Clear text data never leaves the tool!

To define a salt you can specify -s <salt> and to define pepper you define it with -p <pepper>

For example: c:\> codeb_cli.exe add -s salt -p pepper -f c:\cdrfile.cdr

For additional security it is possible to add a second layer of SHA256 Hashes on top of the FuzzyHashes. To enable the second layer just define a second layer salt or pepper. We can supply you also with an open source command line tool to create the second layer hashes.

To define a second layer salt you can specify -x <salt> and to define a second layer pepper you define it with -y <pepper>

For example: c:\> codeb_cli.exe add -s salt -p pepper -x salt2 -y pepper2 -f c:\cdrfile.cdr

Register single Call

It is possible to register a call from A to B at a given time with the following command:

c:\>codeb_cli.exe add -a 35679567034 -b 4908154711 -t “27/7/2011 05:15:00”

Please note that the parameter t for time is optional. If it is not set the local computer time is used.

Register multiple Call Detail Records (CDRs)

In some cases it might be required that you need to publish large amounts of CDR’s. For that reason you can publish CDR Files directly with the following command:

c:>codeb_cli.exe add -f c:\OriginCDRfolder\100000.cdr

Result:
Published: c:\OriginCDRfolder\100000.cdr

Records: 100000
Time: 741 milliseconds
Total Time: 741 milliseconds

Note: Instead of publishing the hashes you can just dump them into a local file.

c:>codeb_cli.exe dump -f c:\OriginCDRfolder\100000.cdr

It might be required that you would like to record all the A-Numbers and/or all the B-Numbers of the CDR File. To specify the A-Numbers folder use the -k parameter and to specify the folder for the B-Numbers use the -l parameter.

For exampe:

c:\> codeb_cli.exe dump -s salt -p pepper -f 1000.cdr -o fuzzy.txt -k c:\ANumbers
c:\> codeb_cli.exe dump -s salt -p pepper -f 1000.cdr -o fuzzy.txt -l c:\BNumbers
c:\> codeb_cli.exe dump -s salt -p pepper -f 1000.cdr -o fuzzy.txt -k c:\ANumbers -l c:\BNumbers

check

With the check verb you query the global data lake if a call existed.

codeb_cli.exe help check

Check single Call

You can always check if a specific call has been taken place. As our system is very fast you can check it already during the signaling phase like STIR/SHAKEN.

As during registration the time parameter is optional. If it is not set the local computer time is used.

c:\>codeb_cli.exe check -a 35679567034 -b 4908154711 -t “27/7/2011 05:15:10”

Please note that due to our intelligent FuzzyHash Algorithm there can be small variations in the time as computer clocks never run 100% in sync.

Batch Check

You can batch check all call detail records of a file. The output will be one new file with the records found and another new file with the records NOT found.

C:>codeb_cli.exe check -f c:\OriginCDRfolder\100000.cdr -g c:\OriginCDRfolder\good.cdr -v c:\OriginCDRfolder\done\notfound.cdr

Result:
Time: 1235 milliseconds
Found: 99997
NotFound: 3
Total Time: 1235 milliseconds

Note: As you can create a local dump file of the hash you can compare your CDR records with a local dump file with the verb compare.

C:> codeb_cli.exe compare -s salt -p pepper -x s -y p -f O:\1000.cdr -h O:\dump.txt

ping

With the ping command you can ping any node in the network. The answer returns the time and hops required to reach the target.

For example:

Note: You define the unique serverid with the parameter -s

C:>codeb_cli.exe ping -s bbc194a3ad7549d0b512dc0a985caa7a

Result:
Time: 31
Hops: 2

Note: Signaling times of 30 ms across various hops make this system usable for STIR/SHAKEN.

Global Options

Global options are supported by most verbs.

node

With the option node you can configure which node to be used. If the parameter is not specified the CLI tool first tries the node on localhost and then falls back to www.aloaha.com, coin.codeb.io or pay.valletta-coin.com.