This is programmed in MOC mode. Cmd 97 de Dss Console number , (you actually put the comma in here) Key number de (this will display the current setting) enter the new setting exe you can step on through the keys using the enter key or step back using the - key. If you need to check the console number you can use Cmd 96 de 00 de then step on using the enter key and note down the two that display the extension number you are working with.
The reason you have the problem is that although you programme features against the extension number, they are actually stored against the Len number so when you swap extension numbers this happens. For this reason you need to also check the RSC, SFC, Tennant (if tennanted), Name & memory assignments for the phones you swapped but you definitely need to check the CLI settings in 1212 & 1213. If these are Dterms the key data will also need looking at.
Might I reccomend the purchase of a punch down tool and some jumper wire.