I ended up writing a service that takes the new session id as a variable and changes the server session. This updates the appendtogateway varaible with the new session ID and all subsequent calls use the new session id.
http://www.amfphp.org/docs2/fundamentals/Sessions.html Wade Arnold