neels has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/27309 )


Change subject: inter-BSC HO in: add Speech Codec (Chosen) IE to HO Req Ack
......................................................................

inter-BSC HO in: add Speech Codec (Chosen) IE to HO Req Ack

Related: SYS#5839
Change-Id: I1d0b395c97145b5aa1af4ef67aec9338d2f8f43b
---
M src/osmo-bsc/osmo_bsc_bssap.c
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/09/27309/1

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 33603cc..c02544a 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -1422,6 +1422,8 @@
        if (gscon_is_aoip(conn) && 
new_lchan->activate.info.requires_voice_stream) {
                struct osmo_sockaddr_str to_msc_rtp;
                const struct mgcp_conn_peer *rtp_info = 
osmo_mgcpc_ep_ci_get_rtp_info(conn->user_plane.mgw_endpoint_ci_msc);
+               int rc;
+               int perm_spch;
                if (!rtp_info) {
                        LOG_HO(conn, LOGL_ERROR,
                               "Handover Request Acknowledge: no RTP address 
known to send as"
@@ -1437,6 +1439,15 @@
                        return -EINVAL;
                }
                params.aoip_transport_layer = &ss;
+
+               /* speech_codec_chosen */
+               perm_spch = gsm0808_permitted_speech(new_lchan->type, 
new_lchan->current_ch_mode_rate.chan_mode);
+               params.speech_codec_chosen_present = true;
+               rc = 
gsm0808_speech_codec_from_chan_type(&params.speech_codec_chosen, perm_spch);
+               if (rc) {
+                       LOG_HO(conn, LOGL_ERROR, "Unable to compose Speech 
Codec (Chosen)\n");
+                       return HO_RESULT_ERROR;
+               }
        }

        rate_ctr_inc(rate_ctr_group_get_ctr(conn->sccp.msc->msc_ctrs, 
MSC_CTR_BSSMAP_TX_DT1_HANDOVER_RQST_ACKNOWLEDGE));

--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/27309
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1d0b395c97145b5aa1af4ef67aec9338d2f8f43b
Gerrit-Change-Number: 27309
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofm...@sysmocom.de>
Gerrit-MessageType: newchange

Reply via email to