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
This commit is contained in:
parent
7814a83298
commit
2c268697e9
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue