Introduce Asterisk_Tests testsuite
Add initial infrastructure to run tests against an Asterisk process.
An not-yet-finished draft test doing registration is submitted to
validate communication towards Asterisk works.
The testsuite will be improved in follow-up commits, but this way other
people can already start using it and we can set up the dockerized setup
+ jenkins jobs to run it nightly.
Related: SYS#6782
Change-Id: I66f776d5df6fb5dc488d9e589b84a6b2385406e8
diff --git a/library/SIP_Templates.ttcn b/library/SIP_Templates.ttcn
index f48d137..fc8e23f 100644
--- a/library/SIP_Templates.ttcn
+++ b/library/SIP_Templates.ttcn
@@ -525,6 +525,26 @@
payload := omit
}
+/* Expect during first REGISTER when authorization is required: */
+template (present) PDU_SIP_Response
+tr_SIP_Response_REGISTER_Unauthorized(
+ template CallidString call_id,
+ template SipAddr from_addr,
+ template SipAddr to_addr,
+ template (present) Via via := tr_Via_from(?),
+ template Contact contact := *,
+ template integer seq_nr := ?,
+ template charstring method := "REGISTER",
+ template integer status_code := 401,
+ template charstring reason := "Unauthorized",
+ template charstring body := *) := {
+ statusLine := tr_SIP_StatusLine(status_code, reason),
+ msgHeader := tr_SIP_msgh_std(call_id, from_addr, to_addr, contact,
+ via,
+ method, *, seq_nr),
+ messageBody := body,
+ payload := omit
+}
/* RFC 3261 8.1.1.5:
* "The sequence number value MUST be expressible as a 32-bit unsigned integer