How do I strip a leading zero from an INCOMING number in TNG?

My destination is incorrect as phone numbers for incoming calls has a leading zero.
It then shows as an international number.

OVERVIEW:

TNG has the plugin rules feature.

NOTE: The rule needs to first identify that the call is incoming and
only then remove the leading zero.

  • The rule to identify that the call is incoming:
    1=IO|EQUALS|I|I|FALSE
    NOTE: last entry is FALSE, so that it will execute the next rule also.
  • The rule to strip the leading zero after the call was identified as incoming:
    2=NUMBER|STARTS|00|0|TRUE
    NOTE: last entry in rule is TRUE, it will stop and start ‘fresh’ if there is a next rule.

STEPS:

  1. Stop the TNG Service.
  2. Edit the rules.ini file in the folder C:\Program Files (x86)\datatex\tng\plugins
[PluginRules]
INTERNAL=1
0=IO|EQUALS|O|O|TRUE
1=IO|EQUALS|I|I|FALSE
2=NUMBER|STARTS|00|0|TRUE
  1. Start TNG Service.

  2. Incoming calls loaded after rule put in place will show correct.

  3. If you need to fix all the calls already loaded into TNG, you will need to blank the database and import the rawdata files again - see posts:

    NOTE: If write raw data was not enabled, you will not have raw.txt files to import.

EXAMPLE:

raw.txt file :

07-11-2023|14:41:21|7143|00761462014|I||00|02|22|239|I_ANSWERED|0|00|ID54|||||172.21.177.243|
07-11-2023|14:44:27|6025|00761462014|O||00|00|26|15|O_TRANSFER|0|00|ID12|||||172.21.177.240|
07-11-2023|14:47:25|1311|00761462014|I||00|00|59|X9999|I_ANSWERED|0|04|ID12|||||172.21.177.247|

Result of rules.ini applied:


NOTE: Outgoing call still has leading 2 zeroes and therefore international call

RELATED TOPIC:
How do I strip extra digits off the telephone number?