Yep, it was all taken from The Matrix, except that they didn't use a ringing telephone to pull him out of harm's way...
Of course, I can't rule out the possibility that The Matrix was a derivative of 24...