summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-23 16:59:16 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-09-23 17:32:29 +0200
commitf6dcd28399f3484c690d32ad18e97c0adff45b48 (patch)
tree14c9e634c19fb98080368c8dcea3f36ccf6a78cd
parentbefd3aaca496b74ea4e00a29ca9a3d6bc64f1d49 (diff)
sip: ACK on failurepespin/sip
-rw-r--r--sip/SIP_Tests.ttcn29
1 files changed, 23 insertions, 6 deletions
diff --git a/sip/SIP_Tests.ttcn b/sip/SIP_Tests.ttcn
index 534801e..053395e 100644
--- a/sip/SIP_Tests.ttcn
+++ b/sip/SIP_Tests.ttcn
@@ -202,14 +202,23 @@ function f_establish_mt(inout CallPars cp) runs on ConnHdlr {
/* OSC <- SIP: A party sends SIP invite for a MT-call into OSC */
SIP.send(ts_SIP_INVITE(cp.comp.sip_call_id, cp.comp.sip_url_ext, cp.comp.sip_url_gsm,
cp.comp.sip_seq_nr, cp.comp.sip_body));
- /* MSC <- OSC: OSC generates MNCC_SETUP_REQ from INVITE */
- MNCC.receive(tr_MNCC_SETUP_req) -> value mncc {
- cp.mncc_call_id := mncc.u.signal.callref;
- }
/* OSC -> SIP */
SIP.receive(tr_SIP_Response(cp.comp.sip_call_id, sip_addr_ext, sip_addr_gsm, *,
"INVITE", 100, ?, "Trying", *));
+ alt {
+ /* MSC <- OSC: OSC generates MNCC_SETUP_REQ from INVITE */
+ [] MNCC.receive(tr_MNCC_SETUP_req) -> value mncc {
+ cp.mncc_call_id := mncc.u.signal.callref;
+ }
+ [] SIP.receive {
+ setverdict(fail, "Received unexpected respose");
+ SIP.send(ts_SIP_ACK(cp.comp.sip_call_id, cp.comp.sip_url_ext, cp.comp.sip_url_gsm,
+ cp.comp.sip_seq_nr, omit));
+ mtc.stop;
+ }
+ }
+
/* MSC -> OSC: After MS sends CALL CONF in response to SETUP */
MNCC.send(ts_MNCC_CALL_CONF_ind(cp.mncc_call_id));
/* MSC <- OSC: OSC asks MSC to create RTP socket */
@@ -223,8 +232,16 @@ function f_establish_mt(inout CallPars cp) runs on ConnHdlr {
/* MSC -> OSC: After MS is ringing and sent CC ALERTING */
MNCC.send(ts_MNCC_ALERT_ind(cp.mncc_call_id));
SIP.clear;
- SIP.receive(tr_SIP_Response(cp.comp.sip_call_id, sip_addr_ext, sip_addr_gsm, *,
- "INVITE", 180, ?, "Ringing", *));
+ alt {
+ [] SIP.receive(tr_SIP_Response(cp.comp.sip_call_id, sip_addr_ext, sip_addr_gsm, *,
+ "INVITE", 180, ?, "Ringing", *));
+ [] SIP.receive {
+ setverdict(fail, "Received unexpected respose");
+ SIP.send(ts_SIP_ACK(cp.comp.sip_call_id, cp.comp.sip_url_ext, cp.comp.sip_url_gsm,
+ cp.comp.sip_seq_nr, omit));
+ mtc.stop;
+ }
+ }
/* MSC -> OSC: After MT user has picked up and sent CC CONNECT */
MNCC.send(ts_MNCC_SETUP_CNF(cp.mncc_call_id));