chan_pjsip: Register for "BEFORE_MEDIA" responses
authorGeorge Joseph <gjoseph@digium.com>
Thu, 7 Jun 2018 13:46:03 +0000 (07:46 -0600)
committerGeorge Joseph <gjoseph@digium.com>
Thu, 7 Jun 2018 14:31:45 +0000 (08:31 -0600)
commit1725eaf8fba013db84a772dcba37ab2a9837416a
tree5268428aef1ffef41e3c3ebd78fe3132235b2cdc
parent7b5fc5d20f2d21dc818c93ef8f3ed93a4835e031
chan_pjsip:  Register for "BEFORE_MEDIA" responses

chan_pjsip wasn't registering for "BEFORE_MEDIA" responses which meant
it was not updating HANGUPCAUSE for 4XX responses.  If the remote end
sent a "180 Ringing", then a "486 Busy", the hangup cause was left at
"180 Normal Clearing".

* Removed chan_pjsip_incoming_response from the original session
  supplement (which was handling only "AFTER MEDIA") and added it to a
  new session supplement which accepts both "BEFORE_MEDIA" and
  "AFTER_MEDIA".

* Also cleaned up some cleanup code in load module.

ASTERISK-27902

Change-Id: If9b860541887aca8ac2c9f2ed51ceb0550fb007a
channels/chan_pjsip.c