As most things in the world of computers, there are several ways to do a task. You get to choose which is most appropriate for you.
You could do it in ‘dialplan’ (the ‘native’ scripting language of Asterisk) or using AGI (Asterisk Gateway Interface) and then you get to use any ‘real’ scripting or compiled language. Maybe even AMI or ARI could be used as well
My choice would be to write it as an AGI. I like keeping my dialplans neat and tidy and hide all the logic and details in a nice black box.
It’s not a big deal. You can ask Asterisk for the current date and time, and I’m sure you can find some web site to return the temperature. Would this be for a single location or would you let the caller enter the area code (which may not match their area code), ZIP code, or IATA?
Are you looking at this as a learning experience or as something that may be the basis of an advertising business implying professional services and support?