This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/19074 ) Change subject: endp: require domain name also for E1 endpoints ...................................................................... endp: require domain name also for E1 endpoints RFC3435 requires an MGW domain name appeneded to every endpoints. When defining endpoint names in Appendix E, the domain name is is not mentioned for digital trunks, however, this does not mean that digital trunks do not have a domain appended. Osmo-mgw currently violates the spec because it explicitly checks if the domain name is _NOT_ present for E1 endpoints. Change-Id: Ibb800b689e090b97b58d0206959b660890acd967 --- M src/libosmo-mgcp/mgcp_endp.c 1 file changed, 14 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/74/19074/1 diff --git a/src/libosmo-mgcp/mgcp_endp.c b/src/libosmo-mgcp/mgcp_endp.c index 5e7bebb..82f7732 100644 --- a/src/libosmo-mgcp/mgcp_endp.c +++ b/src/libosmo-mgcp/mgcp_endp.c @@ -77,8 +77,8 @@ } /* Generate E1 endpoint name from given numeric parameters */ -static char *gen_e1_epname(void *ctx, uint8_t trunk_nr, uint8_t ts_nr, - uint8_t ss_nr) +static char *gen_e1_epname(void *ctx, const char *domain, uint8_t trunk_nr, + uint8_t ts_nr, uint8_t ss_nr) { unsigned int rate; unsigned int offset; @@ -88,8 +88,9 @@ rate = e1_rates[ss_nr]; offset = e1_offsets[ss_nr]; - return talloc_asprintf(ctx, "%s%u/s-%u/su%u-%u", - MGCP_ENDPOINT_PREFIX_E1_TRUNK, trunk_nr, ts_nr, rate, offset); + return talloc_asprintf(ctx, "%s%u/s-%u/su%u-%u@%s", + MGCP_ENDPOINT_PREFIX_E1_TRUNK, trunk_nr, ts_nr, + rate, offset, domain); } /*! allocate an endpoint and set default values. @@ -116,7 +117,9 @@ break; case MGCP_TRUNK_E1: endp->type = &ep_typeset.rtp; - endp->name = gen_e1_epname(endp, trunk->trunk_nr, index / 15, index % 15); + endp->name = gen_e1_epname(endp, trunk->cfg->domain, + trunk->trunk_nr, + index / 15, index % 15); break; default: osmo_panic("Cannot allocate unimplemented trunk type %d! %s:%d\n", @@ -353,11 +356,9 @@ if (!trunk) return NULL; - /* Virtual endpoints require a domain name (see RFC3435, section E.3) */ - if (trunk->trunk_type == MGCP_TRUNK_VIRTUAL) { - if (check_domain_name(epname, cfg)) - return NULL; - } + /* All endpoint names require a domain as suffix */ + if (check_domain_name(epname, cfg)) + return NULL; /* Identify the endpoint on the trunk */ endp = mgcp_endp_by_name_trunk(cause, epname, trunk); @@ -567,9 +568,9 @@ break; /* Pick overlapping endpoint to check */ - epname_check = - gen_e1_epname(endp, endp->trunk->trunk_nr, ts_nr, - interlock[i]); + epname_check = gen_e1_epname(endp, endp->trunk->cfg->domain, + endp->trunk->trunk_nr, ts_nr, + interlock[i]); endp_check = find_specific_endpoint(epname_check, endp->trunk); if (!endp_check) { LOGPENDP(endp, DLMGCP, LOGL_ERROR, -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/19074 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ibb800b689e090b97b58d0206959b660890acd967 Gerrit-Change-Number: 19074 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200630/4359ac09/attachment.htm>