It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
Training clubs that run the Kennel Club Good Citizen Dog Scheme - the largest dog training programme in the UK are a sensible place to begin. Here you will learn about every aspect of dog ownership from the Puppy Foundation Courses through to Bronze, Silver and Gold award levels. Go to GCDS Training Clubs in your County to find one near to you or email the GCDS Team ([email protected]) or call 0207 518 1011.