diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-01-30 19:35:53 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-01-30 20:10:56 +0100 |
commit | 363cb0a3944a9ce79dac03b24903deae2c91b9f0 (patch) | |
tree | 6fe11ed2c72a46751cf447651322499909357d76 /library/MGCP_Templates.ttcn | |
parent | aa54cf8b7b7e690f3a9c326ff8adf8484de263ba (diff) |
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
Diffstat (limited to 'library/MGCP_Templates.ttcn')
-rw-r--r-- | library/MGCP_Templates.ttcn | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/library/MGCP_Templates.ttcn b/library/MGCP_Templates.ttcn index 5a8d9b1..9e32a34 100644 --- a/library/MGCP_Templates.ttcn +++ b/library/MGCP_Templates.ttcn @@ -34,6 +34,12 @@ module MGCP_Templates { val := hex2str(rid) }; + /* 3.2.1.3 SpecificEndpointId */ + template MgcpParameter ts_MgcpParSpecEP(MgcpEndpoint ep) := { + code := "Z", + val := ep + }; + /* 3.2.2.10: LocalConnectionOptions (codec, packetization, bandwidth, ToS, eco, gain, silence, ...) */ template MgcpParameter t_MgcpParLocConnOpt(template charstring lco) := { "L", lco }; @@ -326,5 +332,25 @@ module MGCP_Templates { sdp := * } + function f_mgcp_find_param(MgcpMessage msg, MgcpInfoCode code, out charstring ret) + return boolean { + var MgcpParameterList pars; + if (ischosen(msg.command)) { + pars := msg.command.params; + } else { + pars := msg.response.params; + } + for (var integer i := 0; i < sizeof(pars); i := i+1) { + if (pars[i].code == code) { + ret := pars[i].val; + return true; + } + } + return false; + } + + /* template to determine if a MGCP endpoint is a wildcard endpoint */ + template charstring t_MGCP_EP_wildcard := (pattern "\*@*", pattern "rtpbridge/\*@*"); + } |