Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-05-06 Thread Neels Hofmeyr
Neels 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 
 #include 
 #include 
+#include 

 #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(_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(_msc_rtp, )) {
+   LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: 
cannot encode AoIP Transport Layer\n");
+   return -EINVAL;
+   }
+   params.aoip_transport_layer = 
+   }
 
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();
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 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Reviewer: Neels Hofmeyr 


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-05-06 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/13585

to look at the new patch set (#5).

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/13585/5
--
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: newpatchset
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 5
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-05-05 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13585 )

Change subject: fix inter-BSC-HO-incoming for AoIP (2/2)
..


Patch Set 4: Code-Review+2


--
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: comment
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 05 May 2019 16:26:31 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-04-30 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13585 )

Change subject: fix inter-BSC-HO-incoming for AoIP (2/2)
..


Patch Set 3:

do we have a test case that validates this behavior (i.e. fails before this 
patch and succeeds after it)?


--
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: comment
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Tue, 30 Apr 2019 06:53:45 +
Gerrit-HasComments: No
Gerrit-HasLabels: No


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-04-26 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/13585

to look at the new patch set (#2).

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/13585/2
--
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: newpatchset
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-04-11 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/13585 )

Change subject: fix inter-BSC-HO-incoming for AoIP (2/2)
..


Patch Set 1: Code-Review+2


--
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: comment
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Thu, 11 Apr 2019 06:18:44 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: fix inter-BSC-HO-incoming for AoIP (2/2)

2019-04-10 Thread Neels Hofmeyr
Neels Hofmeyr has uploaded this change for review. ( 
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, 32 insertions(+), 6 deletions(-)



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

diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c
index 65618fd..4849b1d 100644
--- a/src/osmo-bsc/osmo_bsc_bssap.c
+++ b/src/osmo-bsc/osmo_bsc_bssap.c
@@ -40,8 +40,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 

 #define IP_V4_ADDR_LEN 4

@@ -1185,14 +1187,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 = 
mgwep_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(_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(_msc_rtp, )) {
+   LOG_HO(conn, LOGL_ERROR, "Handover Request Acknowledge: 
cannot encode AoIP Transport Layer\n");
+   return -EINVAL;
+   }
+   params.aoip_transport_layer = 
+   }

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();
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: newchange
Gerrit-Change-Id: Ia05e37da125eb6e7b7be9b974b73261bd72de1f4
Gerrit-Change-Number: 13585
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr