An eight-year-old boy has been praised for his presence of mind after he made an 999 call to emergency services.