1. Is there a danger of getting a nasty shock when doing some diy telephone wiring ?
2. or is it only a danger if someone happens to ring while you are touching the wires ?
1. There is no danger as such unless you suffer from a very weak heart condition.
("HOLD" your tongue across a good 9V battery and thats what it "possibly could" feel like)
2. Yes there is a constant voltage, and you may be more susceptible "if" someone rings.
Don't let it frighten you it's not that bad, honest, I have done plenty in my time and never had a bad experience yet.
And as a ex electrician I couldn't even use a "Neon Tester screwdriver" without getting a reasonably good tingle, so I should know.