Dusan Lajovic played out an entertaining match with Gerald Melzer in their Davis Cup opener, eventually winning 7-6 3-6 7-5.