This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13585 ) Change subject: fix inter-BSC-HO-incoming for AoIP (2/2) ...................................................................... fix inter-BSC-HO-incoming for AoIP (2/2) For AoIP, the AoIP Transport Layer Address IE must be included in the Handover Request Acknowledge message, so the MSC can send RTP to the right place. Add this IE for AoIP. Depends: Ia71542ea37d4fd2c9fb9b40357db7aeb111ec576 (libosmocore) Depends: Id617265337f09dfb6ddfe111ef5e578cd3dc9f63 (libosmocore) Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 --- M src/osmo-bsc/osmo_bsc_bssap.c 1 file changed, 31 insertions(+), 6 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 470ae42..e79a344 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -43,6 +43,7 @@ #include <osmocom/bsc/handover.h> #include <osmocom/core/fsm.h> #include <osmocom/core/socket.h> +#include <osmocom/core/sockaddr_str.h> #define IP_V4_ADDR_LEN 4 @@ -1214,14 +1215,38 @@ { struct msgb *msg; struct gsm_lchan *new_lchan = conn->ho.new_lchan; + struct sockaddr_storage ss; + struct gsm0808_handover_request_ack params = { + .l3_info = rr_ho_command->data, + .l3_info_len = rr_ho_command->len, + .chosen_channel_present = true, + .chosen_channel = gsm0808_chosen_channel(new_lchan->type, new_lchan->tch_mode), + .chosen_encr_alg = new_lchan->encr.alg_id, + .chosen_speech_version = gsm0808_permitted_speech(new_lchan->type, new_lchan->tch_mode), + }; + + if (gscon_is_aoip(conn)) { + 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); + if (!rtp_info) { + LOG_HO(conn, LOGL_ERROR, + "Handover Request Acknowledge: no RTP address known to send as" + " AoIP Transport Layer Address\n"); + return -EINVAL; + } + if (osmo_sockaddr_str_from_str(&to_msc_rtp, rtp_info->addr, rtp_info->port)) { + LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: cannot encode AoIP Transport Layer\n"); + return -EINVAL; + } + if (osmo_sockaddr_str_to_sockaddr(&to_msc_rtp, &ss)) { + LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: cannot encode AoIP Transport Layer\n"); + return -EINVAL; + } + params.aoip_transport_layer = &ss; + } LOG_HO(conn, LOGL_DEBUG, "Sending BSSMAP Handover Request Acknowledge\n"); - msg = gsm0808_create_handover_request_ack(rr_ho_command->data, rr_ho_command->len, - gsm0808_chosen_channel(new_lchan->type, - new_lchan->tch_mode), - new_lchan->encr.alg_id, - gsm0808_permitted_speech(new_lchan->type, - new_lchan->tch_mode)); + msg = gsm0808_create_handover_request_ack2(¶ms); msgb_free(rr_ho_command); if (!msg) return -ENOMEM; -- To view, visit https://gerrit.osmocom.org/13585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4 Gerrit-Change-Number: 13585 Gerrit-PatchSet: 5 Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190506/e92518c9/attachment.htm>