aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-12-19 01:01:46 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2019-01-05 04:37:56 +0100
commit2c268697e9932959ab0a1833ef474054b6700f95 (patch)
tree00741745b5b01f3c9d60b3bcbaec3595461f554e
parent7814a832980caa1206a3f217ef79f1a19831305a (diff)
use mgcp-client configured endpoint domain nameneels/mgw_domain
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
-rw-r--r--src/libmsc/msc_mgcp.c13
1 files changed, 6 insertions, 7 deletions
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 @@ static void fsm_crcx_ran_cb(struct osmo_fsm_inst *fi, uint32_t event, void *data
.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 @@ int msc_mgcp_call_assignment(struct gsm_trans *trans)
/* 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);