bsc: Handle wildcard endpoint name in MGCP CRCX
MGCP permits for the CallAgent to send a wildcarded endpoint name,
at which point the MGW itself must allocate an endpoint name and
return it as SpecificEndpointId parameter in the CRCX response.
Change-Id: I704bbe4e11b27e83a6ae6a71aa6a715dc8301f34
diff --git a/library/MGCP_Emulation.ttcn b/library/MGCP_Emulation.ttcn
index df8e4b4..adcb8b5 100644
--- a/library/MGCP_Emulation.ttcn
+++ b/library/MGCP_Emulation.ttcn
@@ -208,8 +208,12 @@
if (ischosen(msg.command)) {
return msg.command.line.ep;
} else {
- /* FIXME */
- return "null@none";
+ var MgcpEndpoint ep;
+ if (f_mgcp_find_param(msg, "Z", ep) == false) {
+ setverdict(fail, "No SpecificEndpointName in MGCP response", msg);
+ self.stop;
+ }
+ return ep;
}
}
@@ -273,7 +277,8 @@
} else {
if (cmd.line.verb == "CRCX") {
vc_conn := ops.create_cb.apply(cmd, id);
- if (true /* non-wildcard EP */) {
+ if (not match(cmd.line.ep, t_MGCP_EP_wildcard)) {
+ /* non-wildcard EP, use directly */
f_ep_table_add(vc_conn, cmd.line.ep);
} else {
/* add this transaction to list of pending transactions */