Making message notifier using soundcard line-out output

I want to connect my sound card line out to any available Asterisk VoIP extension for making calls to phones over IP and playing prepared sound files. Is there a way to do so?

Can’t find any information about connecting soundcard line out to Asterisk-driven system. Waiting for any tips. Thank you.