handover: Implement proper handover procedure handling at any stage of the call

Enhancements for each stage of handover procedure should be implemented in order to support handover at any stage of the call.
For these purposes new in_handover state and ho_queue for call control messages was introduced for gsm_subscriber_connection.

Stage 1: HO-Command is sent to MS
gsm_subscriber_connection state should be changed to in_handover=1.
In this state all transmission of signalling layer messages (except RR messages needed for handover procedure)
should be suspended until resuming is indicated.
All call control messages for connection received from network side should be buffered in ho_queue.
All call control messages for connection received from MS side should be ignored.
Channel mode modification procedures should be also suspended.

Stage 2: HO-Detect is received from MS
Audio path should be switched on network side.

Stage 3-1: HO-Complete is received from MS
Resumption procedure after successful handover should be performed:
 - gsm_subscriber_connection state should be changed to normal (in_handover=0).
 - all buffered call control messages (ho_queue) should be sent to MS on new lchan.
 - suspended channel mode modification procedures should be performed on new lchan.

Stage 3-2: HO-Fail is received from MS
Resumption procedure after failed handover should be performed:
 - gsm_subscriber_connection state should be changed to normal (in_handover=0).
 - all buffered call control messages (ho_queue) should be sent to MS on old lchan.
 - suspended channel mode modification procedures should be performed on old lchan.

Stage 3-3: T3103 expired: Handover has failed without HO-Complete or HO-Fail
Resumption procedure should not be performed in case of T3103 expired:
 - gsm_subscriber_connection state should be changed to normal (in_handover=0).
 - all buffered call control messages (ho_queue) should be cleaned without sending them to MS.
 - suspended channel mode modification procedures should not be performed.

Change-Id: Icb9b5c35ef0c894af2ea762e539f1a9216447fb7
5 files changed
tree: 72c648684d99433f742e4c35c128e09a04ea9a71
  1. contrib/
  2. debian/
  3. etc/
  4. openbsc/
  5. .gitignore
  6. .gitreview
  7. .mailmap