compare Connection Identifier 'I:' case insensitively
When testing against a specific SCCPlite MSC, which sets up the MSC side of an MGW endpoint itself, I notice that it always returns Connection Identifiers in lower case.
When responding to a CRCX, osmo-mgw passes back a randomized connection ID in the "I: " header, to identify one connection of the given endpoint.
osmo-mgw always produces an upper-case hex digit stream, but this particular MSC always responds in lower-case hex digits when it sends a DLCX to clean up after an earlier CRCX.
For example, a CRCX is responded upon with 'I: 4E815C51'.
Later, the MSC sends a DLCX with 'I: 4e815c51'.
osmo-mgw then rejects the DLCX, saying that it cannot find a matching ID, simply due to the case mismatch.
At least for this particular MSC client, osmo-mgw should match the lower-case ID against its own upper-case ID.
MGCP being a string based protocol, one might expect the clients to store these IDs as strings, 1:1 returning whatever they received earlier.
The question is whether the hexadecimal nature is part of the MGCP specification -- if yes, we may always compare case-insensitively.
If not, we need to make osmo-mgw's case sensitivity configurable.
Also check whether the spec defines the hex characters to be lower or upper case, if at all.
(We could make osmo-mgw produce lower case hex IDs as a cheap alternative fix for this particular MSC.)
#3 Updated by neels about 1 year ago
184.108.40.206 Names of Connections Connection identifiers are created by the gateway when it is requested to create a connection. They identify the connection within the context of an endpoint. Connection identifiers are treated in MGCP as hexadecimal strings. The gateway MUST make sure that a proper waiting period, at least 3 minutes, elapses between the end of a connection that used this identifier and its use in a new connection for the same endpoint (gateways MAY decide to use identifiers that are unique within the context of the gateway). The maximum length of a connection identifier is 32 characters.
"hexadecimal strings" == we should always compare case insensitively.