How to get music from an iPhone into your iTunes library without having to sync it?

I have music on my iPhone that isn't in my iTunes library and I don't know why. I hooked up my phone to my Mac and all of my purchased songs transferred but the songs I got from CDs didn't. I do not want to wipe out all of the music on my phone by pressing "Remove and Sync". Please help!How to get music from an iPhone into your iTunes library without having to sync it - 1

For non-purchased songs from iTunes store, you need a 3rd party software to copy the songs from your iPhone to computer. And here is a guide about how to transfer songs from iPhone/iPod to computer, hope it helps you.

I use syncios to transfer songs and videos from iPhone to itunes. But it seems you are running a mac. I don't no whether it has a mac version.