I would use a translate filter rather than aggregate. You will need to be able to extract the country code from the phone number. There is code that can do that here. (You cannot use that directly, obviously, but it shows you all the logic required.)
Then if you have a csv (or yml, or json) that contains codes and names, like this
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.