Just to add my 2 cents to what flaps said, if the aicraft you were flying was an Airbus, I have heard many times pilots complainig that cabin calls to the cockpit have a buzz that lasts way too long and covers any radio communication or else they're doing.
As a personal policy, whenever I have to talk to the F/D I try to do it in person (we have the locked cockpit but also a video camera that makes entering the cockpit easier) because you can never know what you are interrupting with a call. That's for the Airbus, because on the boeing 737 for example, the captain call must be used only as an emergency call with us, so no such options for other calls.
Without excusing the captain's reaction, maybe he was irritated by the loud buzz that interrupted his speech and stream of thought, and maybe also the F/O's radio communications. This said, he should have been more polite and at least explained to you the reasons of his irritation.