Neels Hofmeyr has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/12361 )

Change subject: use mgcp-client configured endpoint domain name
......................................................................

use mgcp-client configured endpoint domain name

Rationale: reading pcaps becomes so much easier when each of osmo-bsc and
osmo-msc address their MGW with differing domain names. Otherwise, both will
have a '0@mgw' endpoint and it gets really confusing.

After this, with according configuration, there can be a '0@bsc' and a '0@msc'
endpoint.

osmo-mgw-for-msc.cfg:
 mgcp
  domain msc

osmo-msc.cfg:
 msc
  mgw endpoint-domain msc

Depends: Ia662016f29dd8727d9c4626d726729641e21e1f8 (osmo-mgw)
Change-Id: I87ac11847d1a6d165ee9a2b5d8a4978e7ac73433
---
M src/libmsc/msc_mgcp.c
1 file changed, 6 insertions(+), 7 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/libmsc/msc_mgcp.c b/src/libmsc/msc_mgcp.c
index 703bb0b..08a1db0 100644
--- a/src/libmsc/msc_mgcp.c
+++ b/src/libmsc/msc_mgcp.c
@@ -51,8 +51,6 @@
 #define MGCP_ASS_TIMEOUT 10    /* in seconds */
 #define MGCP_ASS_TIMEOUT_TIMER_NR 4

-#define ENDPOINT_ID "rtpbridge/*@mgw"
-
 /* Some internal cause codes to indicate fault condition inside the FSM */
 enum msc_mgcp_cause_code {
        MGCP_ERR_MGW_FAIL,
@@ -306,7 +304,7 @@
                .call_id = mgcp_ctx->call_id,
                .conn_mode = MGCP_CONN_RECV_ONLY
        };
-       if (osmo_strlcpy(mgcp_msg.endpoint, mgcp_ctx->rtp_endpoint, 
sizeof(mgcp_msg.endpoint)) >=
+       if (osmo_strlcpy(mgcp_msg.endpoint, 
mgcp_client_rtpbridge_wildcard(mgcp), sizeof(mgcp_msg.endpoint)) >=
            MGCP_ENDPOINT_MAXLEN) {
                handle_error(mgcp_ctx, MGCP_ERR_TOOLONG, false);
                return;
@@ -1021,11 +1019,12 @@
        /* Allocate and configure a new fsm instance */
        mgcp_ctx = talloc_zero(NULL, struct mgcp_ctx);
        OSMO_ASSERT(mgcp_ctx);
-       if (osmo_strlcpy(mgcp_ctx->rtp_endpoint, ENDPOINT_ID, 
sizeof(mgcp_ctx->rtp_endpoint)) >=
-           MGCP_ENDPOINT_MAXLEN) {
+
+       if (osmo_strlcpy(mgcp_ctx->rtp_endpoint, 
mgcp_client_rtpbridge_wildcard(mgcp), sizeof(mgcp_ctx->rtp_endpoint))
+           >= sizeof(mgcp_ctx->rtp_endpoint)) {
                talloc_free(mgcp_ctx);
-               LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) endpoint identifier 
(%s) exceeds maximum length...\n",
-                    vlr_subscr_name(trans->vsub), ENDPOINT_ID);
+               LOGP(DMGCP, LOGL_ERROR, "(subscriber:%s) endpoint identifier 
exceeds maximum length: %s\n",
+                    vlr_subscr_name(trans->vsub), 
osmo_quote_str(mgcp_client_rtpbridge_wildcard(mgcp), -1));
                return -EINVAL;
        }
        mgcp_ctx->fsm = osmo_fsm_inst_alloc(&fsm_msc_mgcp, NULL, NULL, 
LOGL_DEBUG, name);

--
To view, visit https://gerrit.osmocom.org/12361
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I87ac11847d1a6d165ee9a2b5d8a4978e7ac73433
Gerrit-Change-Number: 12361
Gerrit-PatchSet: 3
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofm...@sysmocom.de>
Gerrit-CC: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to