Unfortunately full-time volunteer worth with an eligible non-profit or government agency employer does not count for Public Service Loan Forgiveness.
Unless you are an AmeriCorps or Peace Corps volunteer, you must be a full-time employee who is hired and paid by a qualifying employer in order to qualify for Public Service Loan Forgiveness.
See this article for more information about PSLF eligible employment: https://bysavi.zendesk.com/hc/en-us/articles/115005074093-Where-can-I-work-to-qualify-for-Public-Service-Loan-Forgiveness