mgcp: Remove use of hardwired @mgw from endpoint IDs.
Remove the host portion of the endpoint Id. This requires less configuration and we are probably fine to trust that MGCP only received messages designated for it.
This commit is contained in:
parent
e5ba92e7be
commit
79135acbb8
|
@ -431,7 +431,7 @@ static struct mgcp_endpoint *find_endpoint(struct mgcp_config *cfg, const char *
|
|||
return find_e1_endpoint(cfg, mgcp);
|
||||
} else {
|
||||
gw = strtoul(mgcp, &endptr, 16);
|
||||
if (gw > 0 && gw < cfg->trunk.number_endpoints && strcmp(endptr, "@mgw") == 0)
|
||||
if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@')
|
||||
return &cfg->trunk.endpoints[gw];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue