Generally speaking (and in most cases) the green and red are for the primary line. Yellow and Black are generally the additional line. If you have all 4 colors and need to have the jack rewired, you have 2 options:
a. on the jack needing access to the addtl line, take the green and red off the posts they are currently on and replace them with the black and yellow respectively.
b. buy a Line 1/Line 2 splitter. (no re-wiring needed)