Hi Gerald,
For the 817, plug in a Y adaptor (audio double adaptor) into the headphone socket, use one socket for the headphones and use the other for the recorder. Adjust levels if necessary using an inline pot. Alternatively switch to speaker option, plug the same Y connector in and plug an external speaker into the Y and the recorder into the other one. Experiment with levels. This basic approach was used with an external audio switchbox I used at one stage allowing for a very basic kind of SO2R setup with recording and output to a pk232. There are infinite levels of complexity but the simplest is direct cables between the Y and a recorder.
I use a separate recorder on summits because I am generally using the phone for several other things in between bouts of using the actual radio!
73 Andrew VK1DA VK2UH