Prevent crash from trying to end a session in an invalid way.

This ensures that code that was only meant to be run on a reinvite failure
only runs on a reinvite failure.

(closes issue ASTERISK-22061)
reported by Rusty Newton



git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394473 f38db490-d61c-443f-a65b-d21fe96a405b
chan_gulp: Fix gulp_indicate() handling of AST_CONTROL_PVT_CAUSE_CODE.

git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@394489 f38db490-d61c-443f-a65b-d21fe96a405b