Change in osmo-bsc[master]: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

2020-08-06 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19528 )

Change subject: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
..


Patch Set 2:

(1 comment)

(ensure all messages are sent)

https://gerrit.osmocom.org/c/osmo-bsc/+/19528/1/src/osmo-bsc/bsc_subscr_conn_fsm.c
File src/osmo-bsc/bsc_subscr_conn_fsm.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/19528/1/src/osmo-bsc/bsc_subscr_conn_fsm.c@495
PS1, Line 495: conn->lchan
> I see some code paths where conn->lchan can be NULL. […]
Yes, thats true, it also crashes in TTCN3. I have fixed that now.



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a
Gerrit-Change-Number: 19528
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-Comment-Date: Thu, 06 Aug 2020 14:04:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


Change in osmo-bsc[master]: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

2020-08-06 Thread dexter
dexter has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19528 )

Change subject: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
..


Patch Set 2:

This change is ready for review.


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a
Gerrit-Change-Number: 19528
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter 
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-Comment-Date: Thu, 06 Aug 2020 14:02:39 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

2020-08-05 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19528 )

Change subject: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
..


Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/c/osmo-bsc/+/19528/1/src/osmo-bsc/bsc_subscr_conn_fsm.c
File src/osmo-bsc/bsc_subscr_conn_fsm.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/19528/1/src/osmo-bsc/bsc_subscr_conn_fsm.c@495
PS1, Line 495: conn->lchan
I see some code paths where conn->lchan can be NULL. Is it possible that we hit 
NULL-pointer dereference here?



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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a
Gerrit-Change-Number: 19528
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-Comment-Date: Wed, 05 Aug 2020 20:18:33 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bsc[master]: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

2020-08-05 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19528 )

Change subject: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
..


Patch Set 1: Code-Review+1


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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a
Gerrit-Change-Number: 19528
Gerrit-PatchSet: 1
Gerrit-Owner: dexter 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Wed, 05 Aug 2020 20:12:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bsc[master]: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

2020-08-05 Thread dexter
dexter has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/19528 )


Change subject: lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type
..

lctan_rtp_fsm: use E1 endpoints if the BTS is not ipaccess type

When the BTS is is not an ipaccess BTS, the BTS can only be an E1 bts.
In that case E1 endpoints must be used and there will be no RTP stream
setup towards the BTS.

Change-Id: I4f1f39bf90b0a7c9ea448dab255daf99cd36bb4a
Related: OS#2547
---
M include/osmocom/bsc/bsc_subscr_conn_fsm.h
M src/osmo-bsc/bsc_subscr_conn_fsm.c
M src/osmo-bsc/lchan_rtp_fsm.c
3 files changed, 32 insertions(+), 8 deletions(-)



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

diff --git a/include/osmocom/bsc/bsc_subscr_conn_fsm.h 
b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
index 1a827d9..7893735 100644
--- a/include/osmocom/bsc/bsc_subscr_conn_fsm.h
+++ b/include/osmocom/bsc/bsc_subscr_conn_fsm.h
@@ -65,7 +65,7 @@
 int gscon_sigtran_send(struct gsm_subscriber_connection *conn, struct msgb 
*msg);

 struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct 
gsm_subscriber_connection *conn,
-   uint16_t msc_assigned_cic);
+   uint16_t msc_assigned_cic, 
struct gsm_lchan *for_lchan);
 bool gscon_connect_mgw_to_msc(struct gsm_subscriber_connection *conn,
  struct gsm_lchan *for_lchan,
  const char *addr, uint16_t port,
diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c 
b/src/osmo-bsc/bsc_subscr_conn_fsm.c
index 9b1fb3f..f883e4b 100644
--- a/src/osmo-bsc/bsc_subscr_conn_fsm.c
+++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c
@@ -471,8 +471,10 @@
  * SCCPlite, pass in msc_assigned_cic the CIC received upon BSSMAP Assignment 
Command or BSSMAP Handover
  * Request form the MSC (which is only stored in conn->user_plane after 
success). Ignored for AoIP. */
 struct osmo_mgcpc_ep *gscon_ensure_mgw_endpoint(struct 
gsm_subscriber_connection *conn,
-   uint16_t msc_assigned_cic)
+   uint16_t msc_assigned_cic, 
struct gsm_lchan *for_lchan)
 {
+   const char *epname;
+
if (conn->user_plane.mgw_endpoint)
return conn->user_plane.mgw_endpoint;

@@ -489,13 +491,19 @@
 msc_assigned_cic, 
osmo_mgcpc_ep_name(conn->user_plane.mgw_endpoint));

} else if (gscon_is_aoip(conn)) {
-   /* use dynamic RTPBRIDGE endpoint allocation in MGW */
+
+   if (is_ipaccess_bts(conn->lchan->ts->trx->bts))
+   /* use dynamic RTPBRIDGE endpoint allocation in MGW */
+   epname = 
mgcp_client_rtpbridge_wildcard(conn->network->mgw.client);
+   else
+   epname = mgcp_client_e1_epname(conn, 
conn->network->mgw.client, 1, for_lchan->ts->e1_link.e1_ts, 16, 
for_lchan->ts->e1_link.e1_ts_ss*2);
+
conn->user_plane.mgw_endpoint =
osmo_mgcpc_ep_alloc(conn->fi, 
GSCON_EV_FORGET_MGW_ENDPOINT,
conn->network->mgw.client,
conn->network->mgw.tdefs,
conn->fi->id,
-   "%s", 
mgcp_client_rtpbridge_wildcard(conn->network->mgw.client));
+   "%s", epname);
} else {
LOGPFSML(conn->fi, LOGL_ERROR, "Conn is neither SCCPlite nor 
AoIP!?\n");
return NULL;
@@ -570,7 +578,7 @@
} else
verb = MGCP_VERB_CRCX;

-   gscon_ensure_mgw_endpoint(conn, 
for_lchan->activate.info.msc_assigned_cic);
+   gscon_ensure_mgw_endpoint(conn, 
for_lchan->activate.info.msc_assigned_cic, for_lchan);

if (!conn->user_plane.mgw_endpoint) {
LOGPFSML(conn->fi, LOGL_ERROR, "Unable to allocate endpoint 
info\n");
diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c
index 24a7147..1fe5452 100644
--- a/src/osmo-bsc/lchan_rtp_fsm.c
+++ b/src/osmo-bsc/lchan_rtp_fsm.c
@@ -141,6 +141,12 @@
struct osmo_mgcpc_ep_ci *use_mgwep_ci = 
lchan_use_mgw_endpoint_ci_bts(lchan);
struct mgcp_conn_peer crcx_info = {};

+   if (!is_ipaccess_bts(lchan->ts->trx->bts)) {
+   LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "Audio link to-BTS via E1, 
skipping IPACC\n");
+   lchan_rtp_fsm_state_chg(LCHAN_RTP_ST_WAIT_LCHAN_READY);
+   return;
+   }
+
if (use_mgwep_ci) {
LOG_LCHAN_RTP(lchan, LOGL_DEBUG, "MGW endpoint already 
available: %s\n",
  osmo_mgcpc_ep_ci_name(use_mgwep_ci));
@@ -148,7 +154,7 @@
return;
}

-   mgwep = gscon_ensure_mgw_endpoint(lchan->conn,