For a start you have the LED in the opto-coupler connected the opposite way to the LED in the previous diagram. You should use a bridge rectifier to feed the opto-coupler, to make it independent of line polarity.
Secondly, the output of the opto-coupler doesn't look to be doing anything very much, you would normally need a pull-up resistor and an HT supply.
Both circuit wrong. Parallel the 7uF! condenser with line kill the ringing signal, and the speech also wrong. Cross connected LEDs cannot work, 100 ohm serial resistor too big.
Use opto with FET-switch output, the LED-side with antiparallel diode and parallel 470nF condenser (seriel with line) will work.
If You apply a bridge - as Nigel suggested - no need the the polarity marking.
No, but always need the capacitor, it is almost shortcut for AC. The ringing signal is 100V 16Hz, off-hook state about 12V.
If not helped, You need an additional circuit to detecting the ringing signal. With this signal possible disabling the off-hook detector. Maybe need also some delay for output.