/******************************************************************************
 * Copyright (c) 2000-2025 Ericsson Telecom AB
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
 ******************************************************************************/
//  File:     EPTF_SIP_Events.ttcn
//  Rev:      <RnXnn>
//  Prodnr:   CNL 113 522
//  Updated:  2012-11-28
//  Contact:  http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////
//  Module: EPTF_SIP_Events
//
//  Purpose:  
//     Contains the events generated by the SIP AppLib.
//
//  Last review date:  
//    2010-12-08
////////////////////////////////////////////////////
module EPTF_SIP_Events
{

////////////////////////////////////////////////////
//Constant: Event index constants.
//
//Detailed comments:
//  Scope of events: events inside some context (dialog, publish, subscription, transaction, etc.) are dispatched
//    to the FSM if the conext was created in an FSM. The scope of the events outside of any context
//    (for example MESSAGE request outside of dialog) are dispatched to an entity if the entity is found.
//
//  Scope of response events: the responses are always dispatched to the FSM where the request war created.
//
//Elements:
//  c_SIP_eventIdx_ACK - an ACK request arrived
//  c_SIP_eventIdx_BYE - a BYE request arrived
//  c_SIP_eventIdx_CANCEL - a CANCEL request arrived
//  c_SIP_eventIdx_INFO - an INFO request arrived
//  c_SIP_eventIdx_INVITE - an INVITE request arrived
//  c_SIP_eventIdx_OPTIONS - an OPTIONS request arrived
//  c_SIP_eventIdx_MESSAGE - a MESSAGE request arrived
//  c_SIP_eventIdx_NOTIFY - a NOTIFY request arrived
//  c_SIP_eventIdx_PRACK - a PRACK request arrived
//  c_SIP_eventIdx_PUBLISH - a PUBLISH request arrived
//  c_SIP_eventIdx_REFER - a REFER request arrived
//  c_SIP_eventIdx_REGISTER - a REGISTER request arrived
//  c_SIP_eventIdx_SUBSCRIBE - a SUBSCRIBE request arrived
//  c_SIP_eventIdx_UPDATE - an UPDATE request arrived
//  c_SIP_eventIdx_reINVITE - a reINVITE request arrived
//  100-699 - status codes are dispatched
//  c_SIP_eventIdx_1xx - group event, a response arrived with status code 1xx
//  c_SIP_eventIdx_2xx - group event, a response arrived with status code 2xx
//  c_SIP_eventIdx_3xx - group event, a response arrived with status code 3xx
//  c_SIP_eventIdx_4xx - group event, a response arrived with status code 4xx
//  c_SIP_eventIdx_5xx - group event, a response arrived with status code 5xx
//  c_SIP_eventIdx_6xx - group event, a response arrived with status code 6xx
//  c_SIP_eventIdx_3xxto6xx - group event, a response arrived with status code 3xx ot 6xx
//  c_SIP_eventIdx_unknownTransaction - unrecognized transaction identifier in a response
//  c_SIP_eventIdx_unknownDialog - unrecognized dialog identifier in a message
//  c_SIP_eventIdx_retransmittedRequest - a retransmitted request has arrived, dropped by the AppLib
//  c_SIP_eventIdx_unknownSubscription - unrecognized subscription in a NOTIFY
//  c_SIP_eventIdx_retransmittedResponse - a retransmitted response has arrived, dropped by the AppLib
//  c_SIP_eventIdx_NOTIFYActive - subscription state changed to active
//  c_SIP_eventIdx_NOTIFYPending - subscription state changed to pending
//  c_SIP_eventIdx_NOTIFYTerminated - subscription state changed to terminated
//  c_SIP_eventIdx_retryAfter - a reponse arrived with a Retry-After header field
//  c_SIP_eventIdx_UACTransactionTimeout - UAC transaction timeout
//  c_SIP_eventIdx_UASTransactionTimeout - UAS transaction timeout
//  c_SIP_eventIdx_requestOutOfOrder - request in dialog is out of order
//  c_SIP_eventIdx_userNotFound - user has not been found in database
//  c_SIP_eventIdx_responseNotFoundForPRACK - resonse has not been found for a PRACK request
//  c_SIP_eventIdx_provisionalRespOutOfOrder - a reliably sent provisional response in an UAC arrived out of order
//  c_SIP_eventIdx_unknownPublication - could not find the publication
//  c_SIP_eventIdx_invalidTransactionId - could not find transaction id
//  c_SIP_eventIdx_ACKto2xx - used in case of a proxy to report an ACK request to a successful INVITE transaction
//  c_SIP_eventIdx_RespWithoutContext - used to report a response for which no response context has been found
//                                      (for example a retransmitted 2xx response to an INVITE request)
//  c_SIP_eventIdx_RespWithUnknownSubscription - used when when a response arrives with an unknown subscription
//  c_SIP_eventIdx_unknownResourceForPUBLISH - used when the Request-URI in an incoming PUBLISH with SIP-If-Match value is not found
//  c_SIP_eventIdx_unknownPUBLISH - used when the SIP-If-Match value in incoming PUBLISH is not found for the given Request-URI
//  
////////////////////////////////////////////////////

////////////////////////////////////////////////////
//Constant: Event name constants.
//
//Elements:
//  c_SIP_eventName_ACK - "ACK"
//  c_SIP_eventName_BYE - "BYE"
//  c_SIP_eventName_CANCEL - "CANCEL"
//  c_SIP_eventName_INFO - "INFO"
//  c_SIP_eventName_INVITE - "INVITE"
//  c_SIP_eventName_OPTIONS - "OPTIONS"
//  c_SIP_eventName_MESSAGE - "MESSAGE"
//  c_SIP_eventName_NOTIFY - "NOTIFY"
//  c_SIP_eventName_PRACK - "PRACK"
//  c_SIP_eventName_PUBLISH - "PUBLISH"
//  c_SIP_eventName_REFER - "REFER"
//  c_SIP_eventName_REGISTER - "REGISTER"
//  c_SIP_eventName_SUBSCRIBE - "SUBSCRIBE"
//  c_SIP_eventName_UPDATE - "UPDATE"
//  c_SIP_eventName_reINVITE - "INVITE"
//  100-699 - "100" - "699"
//  c_SIP_eventName_1xx - "1xx reponse"
//  c_SIP_eventName_2xx - "2xx reponse"
//  c_SIP_eventName_3xx - "3xx reponse"
//  c_SIP_eventName_4xx - "4xx reponse"
//  c_SIP_eventName_5xx - "5xx reponse"
//  c_SIP_eventName_6xx - "6xx reponse"
//  c_SIP_eventName_3xxto6xx - "Error response"
//  c_SIP_eventName_unknownTransaction - "Unknown transaction"
//  c_SIP_eventName_unknownDialog - "Unknown dilaog"
//  c_SIP_eventName_retransmittedRequest - "Retransmitted request"
//  c_SIP_eventName_unknownSubscription - "Unknown subscription"
//  c_SIP_eventName_retransmittedResponse - "Retransmitted response"
//  c_SIP_eventName_NOTIFYActive - "NOTIFY: Subscription active"
//  c_SIP_eventName_NOTIFYPending - "NOTIFY: Subscription pending"
//  c_SIP_eventName_NOTIFYTerminated - "NOTIFY: Subscription terminated"
//  c_SIP_eventName_retryAfter - "Retry after"
//  c_SIP_eventName_UACTransactionTimeout - "Client transaction timeout"
//  c_SIP_eventName_UASTransactionTimeout - "Server transaction timeout"
//  c_SIP_eventName_requestOutOfOrder - "Request in dialog arrived out of order"
//  c_SIP_eventName_userNotFound - "User has not been found in DB"
//  c_SIP_eventName_responseNotFoundForPRACK - "Response has not been found for PRACK"
//  c_SIP_eventName_provisionalRespOutOfOrder - "Provisional response out of order"
//  c_SIP_eventName_unknownPublication - "Unknown publication"
//  c_SIP_eventName_invalidTransactionId - "Invalid transaction Id"
//  c_SIP_eventName_ACKto2xx - "ACK to 2xx"
//  c_SIP_eventName_RespWithoutContext - "Response without context"
//  c_SIP_eventName_unknownResourceForPUBLISH - "PUBLISH received with SIP-If-Match for unknown resource"
//  c_SIP_eventName_unknownPUBLISH - "unknown SIP-If-Match received in PUBLISH"
//  
////////////////////////////////////////////////////
const integer c_SIP_eventIdx_ACK := 0;
const charstring c_SIP_eventName_ACK := "ACK";

const integer c_SIP_eventIdx_BYE := 1;
const charstring c_SIP_eventName_BYE := "BYE";

const integer c_SIP_eventIdx_CANCEL := 2;
const charstring c_SIP_eventName_CANCEL := "CANCEL";

const integer c_SIP_eventIdx_INFO := 3;
const charstring c_SIP_eventName_INFO := "INFO";

const integer c_SIP_eventIdx_INVITE := 4;
const charstring c_SIP_eventName_INVITE := "INVITE";

const integer c_SIP_eventIdx_OPTIONS := 5;
const charstring c_SIP_eventName_OPTIONS := "OPTIONS";

const integer c_SIP_eventIdx_MESSAGE := 6;
const charstring c_SIP_eventName_MESSAGE := "MESSAGE";

const integer c_SIP_eventIdx_NOTIFY := 7;
const charstring c_SIP_eventName_NOTIFY := "NOTIFY"

const integer c_SIP_eventIdx_PRACK := 8;
const charstring c_SIP_eventName_PRACK := "PRACK";

const integer c_SIP_eventIdx_PUBLISH := 9;
const charstring c_SIP_eventName_PUBLISH := "PUBLISH";

const integer c_SIP_eventIdx_REFER := 10;
const charstring c_SIP_eventName_REFER := "REFER";

const integer c_SIP_eventIdx_REGISTER := 11;
const charstring c_SIP_eventName_REGISTER := "REGISTER";

const integer c_SIP_eventIdx_SUBSCRIBE := 12;
const charstring c_SIP_eventName_SUBSCRIBE := "SUBSCRIBE"

const integer c_SIP_eventIdx_UPDATE := 13;
const charstring c_SIP_eventName_UPDATE := "UPDATE"

const integer c_SIP_eventIdx_reINVITE := 14;
const charstring c_SIP_eventName_reINVITE := "re-INVITE";

const integer c_SIP_eventIdx_1xx := 700;
const charstring c_SIP_eventName_1xx := "1xx response";

const integer c_SIP_eventIdx_2xx := 701;
const charstring c_SIP_eventName_2xx := "2xx response";

const integer c_SIP_eventIdx_3xx := 702;
const charstring c_SIP_eventName_3xx := "3xx response";

const integer c_SIP_eventIdx_4xx := 703;
const charstring c_SIP_eventName_4xx := "4xx response";

const integer c_SIP_eventIdx_5xx := 704;
const charstring c_SIP_eventName_5xx := "5xx response";

const integer c_SIP_eventIdx_6xx := 705;
const charstring c_SIP_eventName_6xx := "6xx response";

const integer c_SIP_eventIdx_3xxto6xx := 706;
const charstring c_SIP_eventName_3xxto6xx := "Error response";

const integer c_SIP_eventIdx_unknownTransaction := 707;
const charstring c_SIP_eventName_unknownTransaction := "Unknown transaction";

const integer c_SIP_eventIdx_unknownDialog := 708;
const charstring c_SIP_eventName_unknownDialog := "Unknown dialog";

const integer c_SIP_eventIdx_retransmittedRequest := 709;
const charstring c_SIP_eventName_retransmittedRequest := "Retransmitted request";

const integer c_SIP_eventIdx_unknownSubscription := 710;
const charstring c_SIP_eventName_unknownSubscription := "Unknown subscription";

const integer c_SIP_eventIdx_retransmittedResponse := 711;
const charstring c_SIP_eventName_retransmittedResponse := "Retransmitted response";

const integer c_SIP_eventIdx_NOTIFYActive := 712;
const charstring c_SIP_eventName_NOTIFYActive := "NOTIFY: Subscription active";

const integer c_SIP_eventIdx_NOTIFYPending := 713;
const charstring c_SIP_eventName_NOTIFYPending := "NOTIFY: Subscription pending";

const integer c_SIP_eventIdx_NOTIFYTerminated := 714;
const charstring c_SIP_eventName_NOTIFYTerminated := "NOTIFY: Subscription terminated";

const integer c_SIP_eventIdx_retryAfter := 715;
const charstring c_SIP_eventName_retryAfter := "Retry after";

const integer c_SIP_eventIdx_UACTransactionTimeout := 716;
const charstring c_SIP_eventName_UACTransactionTimeout := "Client transaction timeout";

const integer c_SIP_eventIdx_UASTransactionTimeout := 717;
const charstring c_SIP_eventName_UASTransactionTimeout := "Server transaction timeout";

const integer c_SIP_eventIdx_requestOutOfOrder := 718;
const charstring c_SIP_eventName_requestOutOfOrder := "Request in dialog arrived out of order";

const integer c_SIP_eventIdx_userNotFound := 719;
const charstring c_SIP_eventName_userNotFound := "User has not been found in DB";

const integer c_SIP_eventIdx_responseNotFoundForPRACK := 720;
const charstring c_SIP_eventName_responseNotFoundForPRACK := "Response has not been found for PRACK";

const integer c_SIP_eventIdx_provisionalRespOutOfOrder := 721;
const charstring c_SIP_eventName_provisionalRespOutOfOrder := "Provisional response out of order";

const integer c_SIP_eventIdx_unknownPublication := 722;
const charstring c_SIP_eventName_unknownPublication := "Unknown publication";

const integer c_SIP_eventIdx_invalidTransactionId := 723;
const charstring c_SIP_eventName_invalidTransactionId := "Invalid transaction Id";

const integer c_SIP_eventIdx_portError := 724;
const charstring c_SIP_eventName_portError := "Transport: port error";

const integer c_SIP_eventIdx_connectionClosed := 725;
const charstring c_SIP_eventName_connectionClosed := "Transport: connection closed by peer";

const integer c_SIP_eventIdx_ACKto2xx := 726;
const charstring c_SIP_eventName_ACKto2xx := "ACK to 2xx";

const integer c_SIP_eventIdx_RespWithoutContext := 727;
const charstring c_SIP_eventName_RespWithoutContext := "Response without context";

const integer c_SIP_eventIdx_RespWithUnknownSubscription := 728;
const charstring c_SIP_eventName_RespWithUnknownSubscription := "Response with unknown subscription";

const integer c_SIP_eventIdx_invalidResp_CSeq := 729;
const charstring c_SIP_eventName_invalidResp_CSeq := "InvalidResp_CSeq"

const integer c_SIP_eventIdx_unknownResourceForPUBLISH := 730;
const charstring c_SIP_eventName_unknownResourceForPUBLISH := "PUBLISH received with SIP-If-Match for unknown resource";

const integer c_SIP_eventIdx_unknownPUBLISH := 731;
const charstring c_SIP_eventName_unknownPUBLISH := "unknown SIP-If-Match received in PUBLISH";

const integer c_SIP_maxEventIdx := c_SIP_eventIdx_unknownPUBLISH;

const integer c_SIP_ArgsPortError_errorCode := 0;
const integer c_SIP_ArgsPortError_OSerrorCode := 1;

}//end of module
with {
extension "version <RnXnn>"
}

