The first idea that suggests itself in order to model these substitutions are phoneme/allophone mapping tables that replace particular L2 sounds by similar speech sounds from the Li inventory.
simple context-free phoneme mapping is problematic in at least two respects: First, for many L2 sounds it is not clear what the 'best' Li equivalent is.