add X-Osmo-IGN MGCP header to ignore CallID
The format is
CRCX ...
C: ...
M: ...
X-Osmo-IGN: C
So far the only ignorable element is C, i.e. the CallID. Any other items may be
added in the future.
(I initially intended to also add '@' to ignore the endpoint name's domain
part, but in the osmo-mgw code base the domain part is verified long before any
additional headers are even parsed, so sparing that refactoring for now.)
The intention is that osmo-bsc will issue "X-Osmo-IGN: C" for all SCCPlite
calls, because we are unable to retrieve the CallID that the MSC sends to
osmo-mgw for the network side of the endpoint.
Testing with a specific SCCPlite MSC, I actually observe that all CallIDs are
1, even for concurrent calls. So, an alternative hacky solution would have been
to always pass CallID == 1 for SCCPlite connections from osmo-bsc.
Related: I257ad574d8060fef19afce9798bd8a5a7f8c99fe (osmo-bsc)
Change-Id: Id7ae275ffde8ea9389270cfe3db087ee8db00b51
diff --git a/tests/mgcp_client/mgcp_client_test.c b/tests/mgcp_client/mgcp_client_test.c
index 9978f79..2662fc1 100644
--- a/tests/mgcp_client/mgcp_client_test.c
+++ b/tests/mgcp_client/mgcp_client_test.c
@@ -180,7 +180,8 @@
.codecs_len = 1,
.ptmap[0].codec = CODEC_GSMEFR_8000_1,
.ptmap[0].pt = 96,
- .ptmap_len = 1
+ .ptmap_len = 1,
+ .x_osmo_ign = MGCP_X_OSMO_IGN_CALLID,
};
if (mgcp)
@@ -268,6 +269,16 @@
msg = mgcp_msg_gen(mgcp, &mgcp_msg);
printf("%s\n", (char *)msg->data);
+ printf("Generate X-Osmo-IGN message:\n");
+ msg = mgcp_msg_gen(mgcp, &mgcp_msg);
+ mgcp_msg.verb = MGCP_VERB_CRCX;
+ mgcp_msg.presence =
+ (MGCP_MSG_PRESENCE_ENDPOINT | MGCP_MSG_PRESENCE_CALL_ID |
+ MGCP_MSG_PRESENCE_CONN_ID | MGCP_MSG_PRESENCE_CONN_MODE
+ | MGCP_MSG_PRESENCE_X_OSMO_IGN);
+ msg = mgcp_msg_gen(mgcp, &mgcp_msg);
+ printf("%s\n", (char *)msg->data);
+
printf("Overfolow test:\n");
mgcp_msg.verb = MGCP_VERB_MDCX;
mgcp_msg.presence =