Pascal, you don't need a DNI for a CDI. In fact, it's the one ID related to taxes and such that you don't need one for and is for foreigners who need to do things like buy a car and need a tax Id number.
I don't know that you can get one online. The CUIL you can, but obviously you need a DNI for that.
I may have made a mistake on saying it was ANSES - I would have sworn that that's where I went after going to AFIP and them telling me I had to go to ANSES. However, that was more than 5 years ago now and my memory surely may be faulty on that point.
Here's a link that tells you how to get it, and it points to an AFIP office:
http://www.argentina...ación---cdi.php
However, the problem is you are going to have to have some Spanish I think to ask and understand the questions. Looks like on that site I linked to you can print out the form you need to fill out, but that page seems to indicate you can't do the process online. Maybe if you print the form out, fill it in, and take it to the AFIP office indicated, they can point you in the right direction.
For non-resident foreigners, they only indicate you need a passport, they don't mention anything about a certificado domicilio, but that doesn't mean it isn't required - I can't count the number of times I've done something where the requirements aren't clearly spelled out, or have changed.