Yes, I've had such an experience though not as bad (worse?) that is,
the person calling me was a dangerous beginner
perl programmer, not a complete newbie. As it got painful
and starting taking a long time I tried to figure out what the
basic problem was as quickly as possible and get off the phone,
then offered to come in and fix it which they declined.
In the end I did end up going in, and got kudos which
I recommend trying to figure out what is going on,
then once you have some hypotheses, cut the guy off and say
you've gone as far as is possible over the phone.
Then go in and fix it after you talk to his boss, who will
love you. He may even love you if you charge some money.