Voice mail email to contain ring group

I’m building a system where calls are routed to external numbers rather than extensions but still require to drop down to voice mail if unanswered.
I don’t want to create a bunch of unused extensions but rather have one catchall voicemail box that all calls get routed to if unanswered BUT I want to record the ring group that the call was routed from in the email.
My intention is to use this ring group number to later rereoute the email to the end users email (this to be done on another machine)
Any suggestions, pointers to how I can achieve this.