]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Don't invoke session supplements twice for BYE requests. 52/1152/1
authorJoshua Colp <jcolp@digium.com>
Thu, 27 Aug 2015 17:26:09 +0000 (14:26 -0300)
committerJoshua Colp <jcolp@digium.com>
Thu, 27 Aug 2015 17:30:19 +0000 (14:30 -0300)
commitc2c73190825bf4c9cedb1031327199767a4a3ca8
tree39ac3b5677d569ce7cd4d941f3089a30901de499
parentc01111223f9dbd383a4dd1cf786b63eff214f238
res_pjsip_session: Don't invoke session supplements twice for BYE requests.

When a BYE request is received the PJSIP invite session implementation
creates and sends a 200 OK response before we are aware of it. This
causes the INVITE session state callback to be called into and ultimately
the session supplements run on the BYE request. Once this response has
been sent the normal transaction state callback is invoked which
invokes the session supplements on the BYE request again. This can
be problematic in particular with res_pjsip_rfc3326 as it may
attempt to update the hangup cause code on the channel while it is
in the process of being hung up.

This change makes it so the session supplements are only invoked
once by the INVITE session state callback.

ASTERISK-25318 #close

Change-Id: I69c17df55ccbb61ef779ac38cc8c6b411376c19a
res/res_pjsip_session.c