/**
* @author STF471
* @version $Id$
* @desc This module provides the steps used by the test component for SIP-IMS tests.
* This module is part of LibImsV3.
*/
module LibIms_Steps {
// LibSip
import from LibSip_SIPTypesAndValues all;
import from LibSip_Templates all;
import from LibSip_Steps all;
import from LibSip_PIXITS all;
import from LibSip_Interface all;
import from LibSip_MessageBodyTypes all;
import from LibSip_Common all;
// LibIms
import from LibIms_Templates all;
import from LibIms_Interface all;
import from LibIms_SIPTypesAndValues all;
group externalfunctions {
} // end group externalfunctions
group parameterOperations {
/**
* @desc Adds new Via parameter
* @param p_message (request) SIP message to be used to prepair via header
*/
function f_addNewViaParameter(
in Request p_message
) runs on ImsComponent {
var integer v_intVia;
var integer i := 0;
if (isvalue(p_message.msgHeader.via)) {
v_intVia := lengthof(p_message.msgHeader.via.viaBody);
while (i < v_intVia) {
p_message.msgHeader.via.viaBody[v_intVia] := p_message.msgHeader.via.viaBody[v_intVia - 1];
v_intVia := v_intVia - 1;
}
vc_branch := c_branchCookie & f_getRndTag();
p_message.msgHeader.via.viaBody[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile));
vc_via := p_message.msgHeader.via;
}
}
/**
* @desc Removes own Via parameter
* @param p_message (request) SIP message to be used to prepair via header
*/
function f_removeOwnViaParameter(
in Response p_message
) runs on ImsComponent {
var integer v_intVia;
var Via v_via := c_empty_Via;
var integer i := 0;
if (ispresent(p_message.msgHeader.via)) {
v_intVia := lengthof(p_message.msgHeader.via.viaBody) - 1;
for (i := 0; i < v_intVia; i := i + 1) {
v_via.viaBody[i] := p_message.msgHeader.via.viaBody[i + 1];
}
vc_via := v_via;
}
}
/**
* @desc Adds new RecordRoute parameter and removes Route parameter
* @param p_message (request) SIP message to be used to prepair via header
*/
function f_addNewRecordRouteAndRemoveRoutParameter(
in Request p_message
) runs on ImsComponent {
var integer v_intRoute, v_intRecordRoute;
var integer i := 1;
var RouteBody v_route1;
var Route v_newRoute;
v_newRoute.fieldName := ROUTE_E;
if (isvalue(p_message.msgHeader.route)) {
v_intRoute := lengthof(p_message.msgHeader.route.routeBody);
v_route1 := p_message.msgHeader.route.routeBody[0];
while (i < v_intRoute) {
v_newRoute.routeBody[i - 1] := p_message.msgHeader.route.routeBody[i];
i := i + 1;
}
vc_route := v_newRoute;
}
if (isvalue(p_message.msgHeader.recordRoute)) {
v_intRecordRoute := lengthof(p_message.msgHeader.recordRoute.routeBody);
while (0 < v_intRecordRoute) {
p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute] := p_message.msgHeader.recordRoute.routeBody[v_intRecordRoute - 1];
v_intRecordRoute := v_intRecordRoute - 1;
}
p_message.msgHeader.recordRoute.routeBody[0] := v_route1;
vc_recordRoute := valueof(p_message.msgHeader.recordRoute);
}
}
/**
* @desc Adds new RecordRoute parameter (IMS)
* @param p_rr The recordRoute parameter to add
*/
function f_addNewRecordRouteIMS(
in RecordRoute p_rr
) runs on ImsComponent
return template RecordRoute {
var integer v_intRecordRoute;
var template RecordRoute v_recordRoute := omit;
v_intRecordRoute := lengthof(p_rr.routeBody);
if (v_intRecordRoute > 0) {
while (0 < v_intRecordRoute) {
p_rr.routeBody[v_intRecordRoute] := p_rr.routeBody[v_intRecordRoute - 1];
v_intRecordRoute := v_intRecordRoute - 1;
}
p_rr.routeBody[0] := valueof(m_routeBody_currIpAddr(vc_userprofile));
vc_recordRoute := p_rr;
return vc_recordRoute;
}
else {
return (v_recordRoute);
}
}
} // end group parameterOperations
group fieldOperations {
/**
* @desc Sets BYE header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersBYE(
inout CSeq p_cSeq_s,
in SipUrl p_to_user
) runs on ImsComponent {
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
vc_route := f_route(); // update the route header field depending on vc_boo_route
vc_recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
} // end f_setHeadersBYE
/**
* @desc Sets CANCEL header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
*/
function f_setHeadersCANCEL(
inout CSeq p_cSeq_s
) runs on ImsComponent {
vc_route := f_route(); // update the route header field depending on vc_boo_route
vc_recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route
LibSip_Steps.f_setHeadersCANCEL(p_cSeq_s);
} // end f_setHeadersCANCEL
/**
* @desc Sets headers for forward request from AS in case if AS acts as Proxy
* @param p_cSeq_s The current cSeq
* @param p_proxyMode true = proxyMode, false = B2BMode
*/
function f_setHeadersForwardRequestFromAS(
inout CSeq p_cSeq_s,
boolean p_proxyMode
) runs on ImsComponent {
var Request v_request;
v_request := vc_request;
if (p_proxyMode) {
vc_requestUri2 := v_request.requestLine.requestUri;
vc_to := v_request.msgHeader.toField;
vc_contact := v_request.msgHeader.contact;
f_addNewViaParameter(v_request);
f_addNewRecordRouteAndRemoveRoutParameter(v_request);
}
else {
// B2Bmode
vc_contact := m_Contact(m_SipUrl_contactIpaddr(vc_userprofile));
if (PX_SEED) {
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId()
};
} else {
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
}
}
} // end function f_setHeadersForwardRequest
/**
* @desc Sets header fields for forward request from AS in case if AS acts as Proxy
*/
function f_setHeadersForwardResponseFromAS(
) runs on ImsComponent {
var Response v_response;
v_response := vc_response;
vc_caller_To := v_response.msgHeader.toField;
vc_to := v_response.msgHeader.toField;
vc_contact := v_response.msgHeader.contact;
if (ispresent(v_response.msgHeader.recordRoute)) {
vc_recordRoute := v_response.msgHeader.recordRoute;
}
f_removeOwnViaParameter(v_response);
} // end function f_setHeadersForwardResponse
/**
* @desc Sets Invite header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersINVITE(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
if (vc_boo_route) {
vc_route := m_route_interface(vc_interfaceprofile);
}
if (vc_boo_recordRoute) {
vc_recordRoute := m_recordRoute_currIpAddr(vc_userprofile);
}
LibSip_Steps.f_setHeadersINVITE(p_cSeq_s);
} // end f_setHeadersINVITE
/**
* @desc Sets Invite header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersUPDATE(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
if (vc_boo_route) {
vc_route := m_route_interface(vc_interfaceprofile);
}
if (vc_boo_recordRoute) {
vc_recordRoute := m_recordRoute_currIpAddr(vc_userprofile);
}
LibSip_Steps.f_setHeadersUPDATE(p_cSeq_s);
} // end f_setHeadersUPDATE
/**
* @desc Sets Message header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersMESSAGE(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
LibSip_Steps.f_setHeadersMESSAGE(p_cSeq_s);
} // end f_setHeadersMESSAGE
/**
* @desc Sets Notify header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersNOTIFY(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
LibSip_Steps.f_setHeadersNOTIFY(p_cSeq_s);
vc_branch := c_branchCookie & f_getRndTag();
vc_via := {
fieldName := VIA_E,
viaBody := {valueof(m_ViaBody_virtual_XCSCF(vc_branch, vc_userprofile))}
};
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
// contact header initialization for sending of NOTIFY from CSCF component
vc_contact := m_Contact(m_SipUrl_currIpaddr_CSCF(vc_userprofile));
} // end f_setHeadersNOTIFY
/**
* @desc Sets Options header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersOPTIONS(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
LibSip_Steps.f_setHeadersOPTIONS(p_cSeq_s);
vc_branch := c_branchCookie & f_getRndTag();
vc_via := {
fieldName := VIA_E,
viaBody := {valueof(m_ViaBody_virtual_XCSCF(vc_branch, vc_userprofile))}
};
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
// contact header initialization for sending of OPTIONS from CSCF component
vc_contact := m_Contact(m_SipUrl_currIpaddr_CSCF(vc_userprofile));
} // end f_setHeadersOPTIONS
/**
* @desc Sets Publish header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersPUBLISH(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
LibSip_Steps.f_setHeadersPUBLISH(p_cSeq_s);
vc_branch := c_branchCookie & f_getRndTag();
vc_via := {
fieldName := VIA_E,
viaBody := {valueof(m_ViaBody_virtual_XCSCF(vc_branch, vc_userprofile))}
};
vc_to := f_initToHeader(p_to_user); // init of vc_to using userProfile identifier
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
if (vc_boo_route) {
vc_route := m_route_interface(vc_interfaceprofile);
}
if (vc_boo_recordRoute) {
vc_recordRoute := m_recordRoute_currIpAddr(vc_userprofile);
}
// contact header initialization for sending of PUBLISH from CSCF component
vc_contact := m_Contact(m_SipUrl_currIpaddr_CSCF(vc_userprofile));
} // end f_setHeadersPUBLISH
/**
* @desc Sets Subscribe header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersSUBSCRIBE(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in SipUrl p_from_user
) runs on ImsComponent {
vc_to := {
fieldName := TO_E,
addressField := {
nameAddr := {
displayName := omit, // optional charstring
addrSpec := p_to_user // SipUrl
}
}, // end addressField
toParams := omit
};
vc_from := f_initFromHeader(p_from_user, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
LibSip_Steps.f_setHeadersSUBSCRIBE(p_cSeq_s);
} // end f_setHeadersSUBSCRIBE
/**
* @desc Sets headers for ReINVITE method
* @param p_cSeq_s The current cSeq
* @param p_orginatingSide true in case of Re-INVITE is send from the orgination endpoint otherwise false.
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersReINVITE(
inout CSeq p_cSeq_s,
in boolean p_orginatingSide,
in SipUrl p_to_user
) runs on ImsComponent {
var integer v_tmp, i, j, v_nbroute;
var Request v_request;
v_request := vc_request;
f_setHeadersGeneral(p_cSeq_s, "INVITE"); // cseq, contact, branch, via
vc_reqHostPort := vc_requestUri.components.sip.hostPort;
vc_requestUri := p_to_user;
if (p_orginatingSide) {
vc_to := vc_caller_To;
vc_from := vc_caller_From;
}
else {
vc_to := vc_callee_To;
vc_from := vc_callee_From;
// get route from previous ACK request
// Route Management
if (isvalue(v_request.msgHeader.recordRoute)) {
vc_recordRoute := valueof(v_request.msgHeader.recordRoute);
v_nbroute := lengthof(vc_recordRoute.routeBody);
// copy and reverse the order of the routes in route header
for (i := 0; i <= (v_nbroute - 1); i := i + 1) {
j := v_nbroute - 1 - i;
vc_route.routeBody[j] := vc_recordRoute.routeBody[i];
}
vc_route.fieldName := ROUTE_E;
vc_boo_recordRoute := true;
vc_boo_route := true;
}
else {
vc_boo_recordRoute := false;
vc_boo_route := false;
}
}
v_tmp := str2int(vc_sdp_local.origin.session_id);
vc_sdp_local.origin.session_id := int2str(v_tmp + 1);
v_tmp := str2int(vc_sdp_local.origin.session_version);
vc_sdp_local.origin.session_version := int2str(v_tmp + 1);
} // end function f_setHeadersReINVITE
/**
* @desc Sets component variables related to message header fields when sending requests from the home I-CSCF (TS) to the visited P-CSCF (SUT) (message type independent: CSeq, contact, via), function uses information from userprofile and interfaceprofile
* @param p_cSeq_s The CSeq parameter
* @param p_method The method name for cSeq header field
*/
function f_setHeadersGeneral_ICSCF(
inout CSeq p_cSeq_s,
in charstring p_method
) runs on SipComponent {
p_cSeq_s.fieldName := CSEQ_E;
p_cSeq_s.seqNumber := p_cSeq_s.seqNumber + 1;
p_cSeq_s.method := p_method;
vc_cSeq := p_cSeq_s;
vc_contact := m_Contact(m_SipUrl_contactIpaddr(vc_userprofile));
vc_branch := c_branchCookie & f_getRndTag();
vc_branch_ICSCF := c_branchCookie & f_getRndTag();
vc_via := {
fieldName := VIA_E,
viaBody := {
valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)),
valueof(m_ViaBody_virtualUEinPCSCF(vc_branch_ICSCF, vc_userprofile))
}
};
} // end function f_setHeadersGeneral_ICSCF
/**
* @desc Sets header field for the next outgoing REGISTER message from the visited P-CSCF to the home I-CSCF
* @param p_cSeq_s The CSeq parameter to be applied
*/
function f_setHeaders_REGISTER_PCSCF(
inout CSeq p_cSeq_s
) runs on SipComponent {
var SemicolonParam_List v_params;
f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via
vc_requestUri := {
scheme := c_sipScheme,
components := {
sip := {
userInfo := omit,
hostPort := {
host := vc_userprofile.registrarDomain,
portField := omit
}
}
},
urlParameters := omit,
headers := omit
};
vc_reqHostPort := vc_requestUri.components.sip.hostPort;
if (PX_SEED) {
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId()
};
} else {
vc_callId := {
fieldName := CALL_ID_E,
callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr
};
}
vc_callIdReg := vc_callId;
vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile)));
v_params := {
{
id := c_tagId,
paramValue := {
tokenOrHost := f_getRndTag()
}
}
};
vc_from := {
fieldName := FROM_E,
addressField := vc_to.addressField,
fromParams := v_params
};
if (not vc_firstREGISTER_sent) {
v_params := {
{
id := c_expiresId,
paramValue := {
tokenOrHost := c_shortRegistration
}
}
};
vc_contact.contactBody.contactAddresses[0].contactParams := v_params;
}
vc_firstREGISTER_sent := true; // f_setHeaders_Register is called in deREGISTER function
vc_authorization := {
fieldName := AUTHORIZATION_E,
body := {f_calculatecCredentials_empty(vc_userprofile)}
};
} // end function setHeaders_REGISTER_PCSCF
/**
* @desc Sets REFER header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_to_user The selected user's SIP URL
*/
function f_setHeadersREFER(
inout CSeq p_cSeq_s,
in SipUrl p_to_user
) runs on ImsComponent {
vc_requestUri := p_to_user; // Request URI of Invite is identical with To header
if (vc_boo_route) {
vc_route := m_route_interface(vc_interfaceprofile);
}
if (vc_boo_recordRoute) {
vc_recordRoute := m_recordRoute_currIpAddr(vc_userprofile);
}
LibSip_Steps.f_setHeadersREFER(p_cSeq_s);
} // end f_setHeadersREFER
/**
* @desc Sets REFER header fields (IMS addresses) extension of general settings from LibSip basic function
* @param p_cSeq_s The current cSeq
* @param p_uri The SipUrl for request URI and To header
*/
function f_setHeadersREFER_conf(
inout CSeq p_cSeq_s,
in SipUrl p_uri
) runs on ImsComponent {
vc_to := {
fieldName := TO_E,
addressField := {
nameAddr := {
displayName := omit, // optional charstring
addrSpec := p_uri // SipUrl
}
}, // end addressField
toParams := omit
};
vc_from := f_initFromHeader(p_uri, f_getRndTag()); // init of vc_from using userProfile identifier
vc_requestUri := p_uri; // Request URI of Invite is identical with To header
if (vc_boo_route) {
vc_route := m_route_interface(vc_interfaceprofile);
}
if (vc_boo_recordRoute) {
vc_recordRoute := m_recordRoute_currIpAddr(vc_userprofile);
}
LibSip_Steps.f_setHeadersREFER(p_cSeq_s);
} // end f_setHeadersREFER_conf
} // end group fieldOperations
group awaitingMessage {
}
group sendMessage {
/**
* @desc Sends PRACK message
* @param p_mb The message body of the PRACK message
* @param p_rack_cseq The cSeq of the PRACK message
*/
function f_sendPRACK_sdp(
template(value) MessageBody p_mb,
CSeq p_rack_cseq
) runs on SipComponent {
var integer v_responseNum := 1;
var template(value) PRACK_Request v_prackReq;
f_setHeadersGeneral(vc_cSeq, "PRACK"); // cseq, contact, branch, via
if (isvalue(vc_response.msgHeader.rSeq.responseNum)) {
v_responseNum := vc_response.msgHeader.rSeq.responseNum;
}
vc_rAck := m_RAck(v_responseNum, p_rack_cseq.seqNumber, p_rack_cseq.method);
v_prackReq := m_PRACK_Request_sdp(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck, p_mb);
// added route header if required
if (isvalue(vc_response.msgHeader.recordRoute)) {
v_prackReq.msgHeader.route := f_route();
}
SIPP.send(v_prackReq) to vc_sent_label;
}
}
group globalSteps {
//NOTE STF471: removed function f_init_userprofile, have to move up to specific ATS
/**
* @desc Initializes the To header
* @param p_user Identifies the selected user's SIP URL
* @return The To header
*/
function f_initToHeader(
in SipUrl p_user
) runs on ImsComponent
return To {
var To v_to := c_empty_To;
v_to := {
fieldName := TO_E,
addressField := {
nameAddr := {
displayName := omit, // optional charstring
addrSpec := p_user // SipUrl
}
}, // end addressField
toParams := omit
};
return (v_to);
}
/**
* @desc Initializes the From header
* @param p_user Identifies the selected user' SIP URL
* @param p_tag_str The string value of the tag id
* @return The From header
*/
function f_initFromHeader(
in SipUrl p_user,
charstring p_tag_str
) runs on ImsComponent
return From {
var From v_from := c_empty_From;
v_from := {
fieldName := FROM_E,
addressField := {
nameAddr := {
displayName := omit, // optional charstring
addrSpec := p_user // SipUrl
}
}, // end addressField
fromParams := {
{
id := c_tagId,
paramValue := {
tokenOrHost := p_tag_str
}
}
}
};
return v_from;
}
//NOTE STF471: removed function f_initSipUrl, have to move up to specific ATS
//NOTE STF471: removed function f_init_interfaceprofile, have to move up to specific ATS
/**
* @desc Retrieves user DomainPort value of the user profile
* @param p_userProfile Identifies the selected user profile
* @return The Domain HostPort
*/
function f_get_userDomainPort(
in SipUserProfile p_userProfile
) runs on ImsComponent
return HostPort {
return
{
p_userProfile.homeDomain,
p_userProfile.currPort
};
}
/**
* @desc Retrieves HostPort value of the interface profile
* @param p_interface Identifies the selected interface
* @return The HostPort
*/
function f_get_interfaceHostPort(
in ImsInterfaceProfile p_interface
) runs on ImsComponent
return HostPort {
return
{
p_interface.SUTIpaddr,
p_interface.SUTPort
};
}
/**
* @desc Retrieves DomainPort value of the interface profile
* @param p_interface Identifies the selected interface
* @return The Domain HostPort
*/
function f_get_interfaceDomainPort(
in ImsInterfaceProfile p_interface
) runs on ImsComponent
return HostPort {
return
{
p_interface.SUTHomeDomain,
p_interface.SUTPort
};
}
/**
* @desc Gets the receive template for the NameAddr of the interface
* @param p_interface Identifies the selected interface
* @return The NameAddr template
*/
function f_get_interfaceNameAddr(
in ImsInterfaceProfile p_interface
) runs on ImsComponent
return template NameAddr {
return mw_SipUrl_SUTinterface(p_interface.SUTIpaddr, p_interface.SUTPort);
}
}
group registration {
/**
* @desc Registration and authentication
* @param p_cSeq_s The current cseq
* @param p_auth flag indicating if authentication is needed
* @param p_host P-CSCF domain name (formerly value from module parameter PX_IMS_TS_PCSCF_HOME_DOMAIN)
* @param p_port P-CSCF port number (formerly value from module parameter PX_IMS_TS_PCSCF_PORT)
*/
function f_Registration_IMS(
inout CSeq p_cSeq_s,
in boolean p_auth,
template(value) charstring p_host,
template(value) integer p_port
) runs on SipComponent {
f_setHeaders_REGISTER(p_cSeq_s);
f_SendREGISTER(m_REGISTER_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, m_add_Authorization_digest(vc_authorization, {c_Integrity_protected_no}), p_host, p_port)); // LibSip
// awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER
if (p_auth) {
// receiving 401 Unauthorized response.
// and Re-send REGISTER request with Authorization header
tc_ack.start;
alt {
[] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callId, p_cSeq_s)) -> value vc_response {
tc_ack.stop;
// set headers via, cseq and authorization
f_setHeaders_2ndREGISTER(p_cSeq_s);
f_SendREGISTER(m_REGISTER_Request_IMS(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, m_add_Authorization_digest(vc_authorization, {c_Integrity_protected_yes}), p_host, p_port)); // LibSip
// awaiting 200 OK REGISTER
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) {
tc_ack.stop;
log("*** " & __SCOPE__ & ": INCONC: Authorization was not requested as expected ***");
setverdict(inconc);
}
}
}
else {
f_awaitingOkResponse(p_cSeq_s);
f_getServiceRouteMapIntoRouteInRegistration(vc_response);
}
} // end function f_Registration_IMS
/**
* @desc awaiting UE1 registration (with authentication)
* @param p_cSeq_s The current cseq
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
* @param p_register The expected REGISTER_Request - default: mw_REGISTER_authorizedRequest_IMS
*/
function f_awaitingRegistration_IMS(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in charstring p_qop,
in template(present) REGISTER_Request p_register :=
mw_REGISTER_authorizedRequest_IMS(
mw_Authorization_digest(
mw_digestResponse(
(c_Integrity_protected_yes, c_Integrity_protected_ip_assoc_pending)
)
)
)
) runs on ImsComponent {
var SipUrl v_passociated_url;
// Awaiting 1st REGISTER
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 401 response
f_sendResponse(
m_Response_WWWauthenticate_IMS(
c_statusLine401,
vc_callId,
p_cSeq_s,
vc_caller_From,
vc_caller_To,
vc_via,
m_wwwAuthenticate(
f_calculatecChallenge_forWWWAuthorization(
p_qop,
valueof(vc_authorization.body[0].digestResponse)
)
)
)
);
// Awaiting 2nd REGISTER with authorization header
f_awaitingREGISTER(p_register);
// 200OK to complete the request
if (isvalue(vc_request.msgHeader.contact)) {
vc_contact := valueof(vc_request.msgHeader.contact);
vc_contact.contactBody.contactAddresses[0].contactParams := {
{
"expires",
{
tokenOrHost := int2str(3600)
}
}
};
}
v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec;
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, p_cSeq_s, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
} // end function f_awaitingRegistration_IMS
/**
* @desc Awaiting UE1 registration (with authentication, without security headers)
* @param p_cSeq_s The current cseq
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
*/
function f_awaitingRegistration_IMS_gm(
inout CSeq p_cSeq_s,
in SipUrl p_to_user,
in charstring p_qop
) runs on ImsComponent {
vc_ignore_subscribe := true; // handle SUBSCRIBE during the call
f_awaitingRegistration_IMS(p_cSeq_s, p_to_user, p_qop, mw_REGISTER_authorizedRequest_wo_securityheaders_IMS);
vc_DeregDone := false;
} // end function f_awaitingRegistration_IMS_gm
/**
* @desc Remove registration
* @param p_cSeq_s The current cseq
* @param p_host P-CSCF domain name (formerly value from module parameter PX_IMS_TS_PCSCF_HOME_DOMAIN)
* @param p_port P-CSCF port number (formerly value from module parameter PX_IMS_TS_PCSCF_PORT)
*/
function f_removeRegistration_IMS(
inout CSeq p_cSeq_s,
template(value) charstring p_host,
template(value) integer p_port
) runs on SipComponent {
var template(value) REGISTER_Request v_request;
if (PX_SIP_REGISTRATION) {
f_setHeaders_deREGISTER(p_cSeq_s);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
v_request.msgHeader.route := f_route();
f_SendREGISTER(v_request);
if (PX_SIP_REGISTER_AUTHENTICATION_ENABLED) {
// receiving 401 Unauthorized response.
// and Re-send REGISTER request with Authorization header
tc_ack.start;
alt {
[] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq_s)) -> value vc_response {
tc_ack.stop;
// set headers via, cseq and authorization
f_setHeaders_2ndREGISTER(p_cSeq_s);
v_request := m_REGISTER_Request_expires_IMS(vc_requestUri, vc_callIdReg, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_authorization, p_host, p_port, "0");
v_request.msgHeader.route := f_route();
// Re-send protected REGISTER
f_SendREGISTER(v_request); // LibSip
// awaiting 200 OK REGISTER
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s));
}
[] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s)) -> value vc_response {
tc_ack.stop;
f_setHeadersOnReceiptOfResponse(vc_response);
log("*** " & __SCOPE__ & ": INFO: Authorization was not requested as expected ***");
}
}
}
else {
f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq_s));
}
}
} // end f_RemoveRegistration_IMS
} // end group registration
group preambles {
/**
* @desc Sets variables and default initialization for user profile where proxy role is present
* @param p_userprofile User profile of call
* @param p_cSeq_s The current cseq
*/
function f_IMS_preamble_MGCF(
inout CSeq p_cSeq_s
) runs on ImsComponent {
vc_boo_recordRoute := true;
vc_boo_route := true;
//NOTE STF471: removed f_init_interfaceprofile(c_interfaceProfile_IMS_SUT_MGCF);
f_IMS_preamble_woRegistration(p_cSeq_s);
}
/**
* @desc Sets variables and default initialization for user profile
* @param p_cSeq_s The current cseq
*/
function f_IMS_preamble_woRegistration(
inout CSeq p_cSeq_s
) runs on ImsComponent {
// avoid deregistration in default behavior
vc_DeregDone := true;
vc_boo_route := true;
vc_boo_recordRoute := true;
// Variables & defaults initialization
LibSip_Steps.f_init_component(p_cSeq_s);
// Preamble
//NOTE STF471: removed f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable
vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_DYN, PX_SIP_SDP_ENCODING, PX_SIP_SDP_CLOCKRATE, omit), vc_userprofile));
vc_contact := m_Contact(m_SipUrl_contactIpaddr(vc_userprofile));
}
//NOTE STF471 added
/**
* @desc Sets variables and default initialization for user profile
* @param p_cSeq_s The current cseq
*/
function f_IMS_preamble_woRegistration_as(
inout CSeq p_cSeq_s
) runs on ImsComponent {
// avoid deregistration in default behavior
vc_DeregDone := true;
vc_boo_route := true;
vc_boo_recordRoute := true;
// Variables & defaults initialization
LibSip_Steps.f_init_component(p_cSeq_s);
// Preamble
//NOTE STF471: removed f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable
vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_DYN, PX_SIP_SDP_ENCODING, PX_SIP_SDP_CLOCKRATE, omit), vc_userprofile));
}
/**
* @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5
* @param p_cSeq_s The current cseq
* @param p_register Register template
*/
function f_IMS_preamble_withEmergencyRegistration(
inout CSeq p_cSeq_s,
template REGISTER_Request p_register
) runs on ImsComponent {
//NOTE STF471: removed f_init_interfaceprofile(p_interface);
// Variables & defaults initialization
f_IMS_preamble_woRegistration(p_cSeq_s);
// Preamble
f_Registration(p_cSeq_s, p_register, PX_SIP_REGISTER_AUTHENTICATION_ENABLED, true);
// deregistration in case of successful registration
vc_DeregDone := false;
}
/**
* @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5
* @param p_cSeq_s The current cseq
* @param p_register Register template
*/
function f_IMS_preamble_withRegistration(
inout CSeq p_cSeq_s,
out template REGISTER_Request p_register
) runs on ImsComponent {
//NOTE STF471: removed f_init_interfaceprofile(p_interface);
// Variables & defaults initialization
f_IMS_preamble_woRegistration(p_cSeq_s);
// Preamble
f_Registration(p_cSeq_s, p_register, PX_SIP_REGISTER_AUTHENTICATION_ENABLED);
// deregistration in case of successful registration
vc_DeregDone := false;
f_setHeaders_SUBSCRIBE(p_cSeq_s);
f_Subscription(p_cSeq_s, m_SUBSCRIBE_Request_UE(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_route_REG));
}
//NOTE STF471 added
/**
* @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5
* @param p_cSeq_s The current cseq
* @param p_register Register template
*/
function f_IMS_preamble_withRegistrationWoSubscription(
inout CSeq p_cSeq_s,
out template REGISTER_Request p_register
) runs on ImsComponent {
//NOTE STF471: removed f_init_interfaceprofile(p_interface);
// Variables & defaults initialization
f_IMS_preamble_woRegistration(p_cSeq_s);
// Preamble
f_Registration(p_cSeq_s, p_register, PX_SIP_REGISTER_AUTHENTICATION_ENABLED);
// deregistration in case of successful registration
vc_DeregDone := false;
}
/**
* @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5 (basic registration template)
* @param p_cSeq_s The current cseq
* @param p_host P-CSCF domain name (formerly value from module parameter PX_IMS_TS_PCSCF_HOME_DOMAIN)
* @param p_port P-CSCF port number (formerly value from module parameter PX_IMS_TS_PCSCF_PORT)
*/
function f_IMS_preamble_withRegistrationBasic(
inout CSeq p_cSeq_s,
template(value) charstring p_host,
template(value) integer p_port
) runs on ImsComponent {
//NOTE STF471: removed f_init_interfaceprofile(p_interface);
// Variables & defaults initialization
f_IMS_preamble_woRegistration(p_cSeq_s);
// Preamble
f_Registration_IMS(p_cSeq_s, PX_SIP_REGISTER_AUTHENTICATION_ENABLED, p_host, p_port);
f_setHeaders_SUBSCRIBE(p_cSeq_s);
f_Subscription(p_cSeq_s, m_SUBSCRIBE_Request_UE(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via, vc_contact, vc_route_REG));
}
/**
* @desc Sets variables and default initialization for user profile and handle registration and authentication with MD5 (basic registration template)
* @param p_cSeq_s The current cseq
*/
function f_IMS_preamble_AS(
inout CSeq p_cSeq_s
) runs on ImsComponent {
// avoid deregistration in default behavior
vc_DeregDone := true;
vc_boo_route := true;
vc_boo_recordRoute := true;
vc_cSeq := p_cSeq_s;
// Defaults
vc_def_catchSyncStop := activate(a_Sip_catchSyncStop());
vc_default := activate(a_altstep_AS());
// Preamble
//NOTE STF471: removed f_init_interfaceprofile(p_interface);
//NOTE STF471: removed f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable
vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_DYN, PX_SIP_SDP_ENCODING, PX_SIP_SDP_CLOCKRATE, omit), vc_userprofile));
vc_contact := m_Contact(m_SipUrl_contactIpaddr(vc_userprofile));
}
} // end group preambles
group postambles {
/**
* @desc Terminates component and handles deregistration
* @param p_cSeq_s The current cseq
*/
function f_IMS_postamble_withDeRegistration(
CSeq p_cSeq_s
) runs on ImsComponent {
f_RemoveRegistration(p_cSeq_s);
f_terminate_component();
}
/**
* @desc Terminates component and optionally handles deregistration on AS as TS
* @param p_deRegistration Handle deregistration?
*/
function f_IMS_postamble_AS_withDeRegistration(
boolean p_deRegistration
) runs on ImsComponent {
if (p_deRegistration == true) {
f_awaitingREGISTER_sendReply(mw_REGISTER_Request_Base, true);
}
f_terminate_component();
}
/**
* @desc Terminates component without registration
*/
function f_SIP_postamble_IMS1_withoutRegistration(
) runs on ImsComponent {
f_terminate_component();
}
/**
* @desc Terminates component without de-registration
*/
function f_IMS_postamble_withoutDeRegistration(
) runs on ImsComponent {
f_terminate_component();
}
/**
* @desc Terminates component with de-registration
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
*/
function f_SIP_postamble_IMS1_awaitDeRegistration(
in SipUrl p_to_user,
in charstring p_qop
) runs on ImsComponent {
var SipUrl v_passociated_url;
// Awaiting 1st REGISTER
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 401 response
f_sendResponse(m_Response_WWWauthenticate_IMS(c_statusLine401, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, m_wwwAuthenticate(f_calculatecChallenge_forWWWAuthorization(p_qop, valueof(vc_authorization.body[0].digestResponse)))));
// Awaiting 2nd REGISTER with authorization header
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 200OK to complete the request
v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec;
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
f_terminate_component();
}
/**
* @desc Terminates component with de-registration
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
*/
function f_IMS_postamble_awaitDeRegistration(
in SipUrl p_to_user,
in charstring p_qop
) runs on ImsComponent {
var SipUrl v_passociated_url;
// Awaiting 1st REGISTER
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 401 response
f_sendResponse(m_Response_WWWauthenticate_IMS(c_statusLine401, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, m_wwwAuthenticate(f_calculatecChallenge_forWWWAuthorization(p_qop, valueof(vc_authorization.body[0].digestResponse)))));
// Awaiting 2nd REGISTER with authorization header
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 200OK to complete the request
v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec;
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
f_terminate_component();
}
/**
* @desc Awaits de-registration
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
*/
function f_IMS_awaitDeRegistration(
in SipUrl p_to_user,
in charstring p_qop
) runs on ImsComponent {
var SipUrl v_passociated_url;
// Awaiting 1st REGISTER
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 401 response
f_sendResponse(m_Response_WWWauthenticate_IMS(c_statusLine401, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, m_wwwAuthenticate(f_calculatecChallenge_forWWWAuthorization(p_qop, valueof(vc_authorization.body[0].digestResponse)))));
// Awaiting 2nd REGISTER with authorization header
f_awaitingREGISTER(mw_REGISTER_unauthorizedRequest_IMS);
// 200OK to complete the request
v_passociated_url := vc_caller_From.addressField.nameAddr.addrSpec;
f_sendResponse(m_Response_2xxonREGISTER_IMS(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact, p_to_user, v_passociated_url));
}
//NOTE STF471: renamed f_SIP_postamble_UE(1|2)_withoutRegistration to f_SIP_postamble_UE_withoutRegistration
/**
* @desc Terminates component without registration
*/
function f_SIP_postamble_UE_withoutRegistration(
) runs on ImsComponent {
f_terminate_component();
}
/**
* @desc Sends BYE and awaits response (IMS)
* @param p_requestUri The Request URI
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
*/
function f_terminateCall_IMS(
SipUrl p_requestUri,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to
) runs on ImsComponent {
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
f_SendBYE(m_BYE_Request_IMS(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
tc_resp.start;
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
}
} // end function f_terminateCall_IMS
/**
* @desc Sends BYE and awaits response (UE)
* @param p_requestUri The Request URI
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
* @param p_recordRoute RecordRoute parameter for outgoing BYE - default: omit
*/
function f_terminateCall_UE(
SipUrl p_requestUri,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to,
template RecordRoute p_recordRoute := omit
) runs on ImsComponent {
var Route v_route;
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
if (ispresent(p_recordRoute)) {
v_route := {ROUTE_E, valueof(p_recordRoute.routeBody)};
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, v_route));
}
else {
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, valueof(p_to), vc_via, vc_route));
}
tc_resp.start;
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
}
} // end function f_terminateCall_UE
/**
* @desc Sends BYE and awaits response and De-registration
* @param p_requestUri The Request URI
* @param p_callId CallId parameter for outgoing BYE
* @param p_cSeq_s CSeq parameter for outgoing BYE
* @param p_from From parameter for outgoing BYE
* @param p_to To parameter for outgoing BYE
* @param p_qop of the peer UE (alternatively)
*/
function f_terminateCall_UE_withDeReg(
SipUrl p_requestUri,
CallId p_callId,
inout CSeq p_cSeq_s,
From p_from,
template(value) To p_to,
in charstring p_qop
) runs on ImsComponent {
LibSip_Steps.f_setHeadersBYE(p_cSeq_s);
// Sending of a BYE request to release the call and expect a final response
f_SendBYE(m_BYE_Request_UE(p_requestUri, p_callId, p_cSeq_s, p_from, p_to, vc_via, vc_route));
tc_resp.start;
alt {
[] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_callId, p_cSeq_s)) {
repeat;
}
[] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_callId, p_cSeq_s)) {
tc_resp.stop;
}
// timeout should be handled in default_alt_step
}
action("Please de-register");
f_IMS_awaitDeRegistration(p_requestUri, p_qop);
} // end function f_terminateCall_UE_withDeReg
}
group defaults {
/**
* @desc Altstep for clearing registration (IMS user)
* @param p_to_user The selected user's SIP URL
* @param p_qop of the peer UE (alternatively)
* @verdict fail for all unexpected branches
*/
altstep a_clearRegistration_IMSuser(
in SipUrl p_to_user,
in charstring p_qop
) runs on ImsComponent {
var Response v_response;
var Request v_request;
var SUBSCRIBE_Request v_subscribe_request;
var REGISTER_Request v_register_request;
var BYE_Request v_bye_request;
var CANCEL_Request v_cancel_request;
var NOTIFY_Request v_notify_request;
var INFO_Request v_info_request;
var CSeq v_cSeq;
[] any timer.timeout {
log("*** " & testcasename() & ": FAIL: Timeout while waiting for message. ***");
setverdict(fail);
all timer.stop;
vc_callId := vc_callIdReg;
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
// allow repeated INVITEs
[vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) {
repeat;
}
// allow repeated BYEs after ack of the first BYE
[vc_ignore_bye] SIPP.receive(mw_BYE_Request_Base(?)) {
repeat;
}
[] SIPP.receive(mw_ACK_Request_Base(?)) {
repeat;
}
// allow 100 replies
[] SIPP.receive(mw_Response_Base(c_statusLine100, ?, ?)) {
repeat;
}
// ignore 181 if flag is set (following TS 183004 ����4.5.2.1)
[vc_ignore181] SIPP.receive(mw_Response_Base(c_statusLine181, vc_callId, vc_cSeq)) -> value v_response sender vc_sent_label {
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_response);
repeat;
}
// according to SIP chap.8.1.3.2
[] SIPP.receive(mw_Response_Base(c_statusLine183, vc_callId, vc_cSeq)) {
repeat;
}
// ignore 484 if flag is set
[vc_ignore484] SIPP.receive(mw_Response_Base(c_statusLine484, vc_callId, vc_cSeq)) {
repeat;
}
[vc_ignore4xx] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?)) -> value v_response sender vc_sent_label {
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_response);
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
repeat;
}
[vc_ignore200OKinv] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, ?)) {
repeat;
}
[] SIPP.receive(mw_INFO_Request_Base(vc_callId)) -> value v_info_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_info_request);
f_send200OK();
repeat;
}
// awaiting of Notify
[] SIPP.receive(mw_NOTIFY_Request_Base(vc_callId)) -> value v_notify_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_notify_request);
f_send200OK();
repeat;
}
// awaiting of subscribe from UE
[vc_ignore_subscribe] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label {
f_setHeadersOnReceiptOfSUBSCRIBE(v_subscribe_request);
f_send200OK();
repeat;
}
// awaiting of subscribe on proxy
[] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label {
f_setHeadersOnReceiptOfRequest(v_subscribe_request);
f_sendResponse(m_Response_Contact(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact));
f_SendNOTIFY(m_NOTIFY_Request_contact(v_subscribe_request.msgHeader.contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact));
f_awaitingOkResponse(vc_cSeq);
repeat;
}
// unexpected BYE is acknowledged to avoid retransmissions
[] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_bye_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected BYE message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_bye_request);
f_send200OK();
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_cancel_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected CANCEL message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_cancel_request);
// Answer to the CANCEL
f_send200OK();
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
// catch 4xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?)) -> value v_response sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected 4xx response received. ***");
setverdict(fail);
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_response);
LibSip_Steps.f_setHeadersACK();
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
// catch 5xx response
[] SIPP.receive(mw_Response_Base(mw_statusLine5xx, vc_callId, ?)) -> value v_response sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected 5xx response received. ***");
setverdict(fail);
v_cSeq := valueof(v_response.msgHeader.cSeq);
f_setHeadersOnReceiptOfResponse(v_response);
LibSip_Steps.f_setHeadersACK();
f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route));
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
// catch invalid REGISTER
[] SIPP.receive(mw_REGISTER_Request_Base) -> value v_register_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected REGISTER received. ***");
setverdict(fail);
f_componentStop();
}
// any
[] SIPP.receive {
log("*** " & testcasename() & ": FAIL: Unexpected message received. ***");
setverdict(fail);
all timer.stop;
action("Please de-register");
f_IMS_awaitDeRegistration(p_to_user, p_qop);
f_componentStop();
}
}
/**
* @desc Main default altstep to handle unexpected messages and timeout
* @verdict fail for all unexpected branches
*/
altstep a_altstep_AS(
) runs on SipComponent {
var Request v_request;
var REGISTER_Request v_register_request;
var BYE_Request v_bye_request;
var CANCEL_Request v_cancel_request;
[] any timer.timeout {
log("*** " & testcasename() & ": FAIL: Timeout while waiting for message. ***");
setverdict(fail);
all timer.stop;
}
// allow repeated INVITEs
[vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) {
repeat;
}
// handle REGISTER requests
[] SIPP.receive(mw_REGISTER_Request_Base) -> value v_register_request sender vc_sent_label {
f_setHeadersOnReceiptOfREGISTER(v_register_request);
// vc_contact := vc_request.msgHeader.contact;
f_sendResponse(m_Response_Contact(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, vc_contact));
repeat;
}
// according to SIP chap.8.1.3.2
[] SIPP.receive(mw_Response_Base(c_statusLine183, vc_callId, vc_cSeq)) {
repeat;
}
// unexpected CANCEL is acknowledged to avoid retransmissions
[] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_cancel_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected CANCEL message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_cancel_request);
f_send200OK();
}
// unexpected BYE is acknowledged to avoid retransmissions
[] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_bye_request sender vc_sent_label {
log("*** " & testcasename() & ": FAIL: Unexpected BYE message received. ***");
setverdict(fail);
f_setHeadersOnReceiptOfRequest(v_bye_request);
f_send200OK();
}
[] SIPP.receive(mw_Response_Base(?, vc_callId, vc_cSeq)) -> value vc_response {
log("*** " & testcasename() & ": FAIL: Unexpected response message in " & __SCOPE__ & " received. ***");
setverdict(fail);
repeat;
}
// any
[] SIPP.receive {
log("*** " & testcasename() & ": FAIL: Unexpected message received. ***");
setverdict(fail);
all timer.stop;
}
}
}
} // module LibIms_Steps
This source diff could not be displayed because it is too large. You can view the blob instead.
sources := \
LibIot_Functions.ttcn \
LibIot_TestConfiguration.ttcn \
LibIot_TypesAndValues.ttcn \
LibIot_VxLTE_PIXITS.ttcn \
LibIot_PIXITS.ttcn \
LibIot_TestInterface.ttcn \
LibIot_VxLTE_Functions.ttcn \
LibIot_VxLTE_Templates.ttcn \
sources := \
LibMsrp_Functions.ttcn \
LibMsrp_PIXITS.ttcn \
LibMsrp_Templates.ttcn \
LibMsrp_TypesAndValues.ttcn \
../patch_lib_msrp_titan/ttcn/LibMsrp_EncDecDeclarations.ttcn \
/*
* @author TTF T010
* @version $Id:$
* @desc This module provides the functions used by the test component
*/
module LibMsrp_EncDecDeclarations {
// LibMsrp
import from LibMsrp_TypesAndValues all;
external function fx_enc_MsrpURI(in MsrpURI p_MsrpURI) return bitstring
with {extension "prototype(convert) encode(MSRPCodec)"}
external function fx_dec_MsrpURI(inout bitstring pdu, out MsrpURI p_MsrpURI) return integer
with {extension "prototype(sliding) decode(MSRPCodec)"}
} // End of module LibMsrp_EncDecDeclarations
\ No newline at end of file
/**
* @author STF160, STF471
* @version $Id: LibSip_Common.ttcn 488 2014-09-18 10:17:19Z rennoch $
* @desc This module provides the common definitions for SIP messages.
* This module is part of LibSipV3.
*/
module LibSip_Common {
type set length (1..infinity) of charstring Charstring_List;
// [20.1, 20.3, 20.4, 20.7, 20.9, 20.10, 20.11, 20.18, 20.20, 20.27, 20.28, 20.30, 20.31,
// 20.33, 20.34, 20.39, 20.42, 20.44]
type union GenValue {
charstring tokenOrHost,
charstring quotedString
}
type record GenericParam
{
charstring id,
GenValue paramValue optional
}
// [?]
type set of GenericParam SemicolonParam_List;
// [?]
type set of GenericParam AmpersandParam_List;
// [?]
type set of GenericParam CommaParam_List;
//------------------------------------------------------------------------------
}
with {
encode "LibSip V3";
} // end module LibSip_Common
module LibSip_EncdecDeclarations {
import from LibSip_SIPTypesAndValues all;
import from LibSip_SMSTypesAndValues all;
import from LibSip_SimpleMsgSummaryTypes all;
import from LibSip_MessageBodyTypes all;
external function fx_enc_Request (Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_REGISTER_Request (REGISTER_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_INVITE_Request (INVITE_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_OPTIONS_Request (OPTIONS_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_BYE_Request (BYE_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_CANCEL_Request (CANCEL_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_ACK_Request (ACK_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_PRACK_Request (PRACK_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_NOTIFY_Request (NOTIFY_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_SUBSCRIBE_Request (SUBSCRIBE_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_PUBLISH_Request (PUBLISH_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_UPDATE_Request (UPDATE_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_REFER_Request (REFER_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_MESSAGE_Request (MESSAGE_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_INFO_Request (INFO_Request p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_Response (Response p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_Raw (Raw p) return bitstring
with {extension "prototype(convert) encode(SIPCodec)"}
external function fx_enc_SMS(SimpleMsgSummary pdu) return bitstring
with { extension "prototype(convert) encode(SIPCodec)" };
external function fx_enc_MessageBody(in MessageBody pdu) return bitstring
with { extension "prototype(convert) encode(SIPCodec)" };
external function fx_dec_Request (inout bitstring pdu, out Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_REGISTER_Request (inout bitstring pdu, out REGISTER_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_INVITE_Request (inout bitstring pdu, out INVITE_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_OPTIONS_Request (inout bitstring pdu, out OPTIONS_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_BYE_Request (inout bitstring pdu, out BYE_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_CANCEL_Request (inout bitstring pdu, out CANCEL_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_ACK_Request (inout bitstring pdu, out ACK_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_PRACK_Request (inout bitstring pdu, out PRACK_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_NOTIFY_Request (inout bitstring pdu, out NOTIFY_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_SUBSCRIBE_Request (inout bitstring pdu, out SUBSCRIBE_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_PUBLISH_Request (inout bitstring pdu, out PUBLISH_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_UPDATE_Request (inout bitstring pdu, out UPDATE_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_REFER_Request (inout bitstring pdu, out REFER_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_MESSAGE_Request (inout bitstring pdu, out MESSAGE_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_INFO_Request (inout bitstring pdu, out INFO_Request p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_Response (inout bitstring pdu, out Response p) return integer
with {extension "prototype(sliding) decode(SIPCodec)"}
external function fx_dec_SMS(inout bitstring pdu, out SimpleMsgSummary p) return integer
with { extension "prototype(sliding) decode(SIPCodec)" };
external function fx_dec_MessageBody(inout bitstring pdu, out MessageBody p) return integer
with { extension "prototype(sliding) decode(SIPCodec)" };
} // End of module module LibSip_EncdecDeclarations
/******************************************************************************
* @author STF 346, STF366, STF368, STF369, STF450, STF471
* @version $Id: LibSip_MessageBodyTypes.ttcn 622 2014-07-10 14:50:54Z nikolajev $
* @desc This module provides the types used for alternative SIP message
* body variants and combinations.
* This module is part of LibSipV3.
*/
module LibSip_MessageBodyTypes {
import from LibSip_SDPTypes all;
import from LibSip_SimpleMsgSummaryTypes all;
import from LibSip_XMLTypes all;
/*
* Simple body types that can be used instead of the more detailed XML and SDP
* without codec support
* */
//type charstring XmlBody;
//type charstring SDP_Message;
type octetstring MsdBody;
group MIMETypes {
type union MIME_Encapsulated_Parts {
SDP_Message sdpMessageBody,
XmlBody xmlBody, // if there is XML body
MsdBody msdBody // RFC 8147: Minimum Set of Data octets
}
type record MIME_Encapsulated_Part {
charstring content_type,
charstring content_disposition optional,
charstring content_id optional,
MIME_Encapsulated_Parts mime_encapsulated_part
}
type record MIME_Message {
charstring boundary, // len:
MimeEncapsulatedList mimeEncapsulatedList
}
type record of MIME_Encapsulated_Part MimeEncapsulatedList;
} // group MIMETypes
type union MessageBody {
SDP_Message sdpMessageBody, // if there is only SDP part
// XMLMessage xmlMessage, // if there is XML message (with header and body)
XmlBody xmlBody, // if there is XML body
MIME_Message mimeMessageBody, // if there is SDP and encapsulated ISUP part
charstring sipfrag, // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
charstring textplain, // if content type is text/plain (for testing long messages)
SimpleMsgSummary simpleMsgSummary, // RFC 3842
octetstring smsMessage // encoded SMS message 3GPP 23.040, 24.011
}
}
with {
encode "SIPCodec"; variant "";
}
/**
* @author STF 346, STF366, STF368, STF369, STF450, STF471
* @version $Id$
* @desc This module provides module parameters used within the SIP
* protocol for timers, SDP formats etc.
* This module is part of LibSipV3.
*/
module LibSip_PIXITS {
// LibCommon
import from LibCommon_BasicTypesAndValues all;
import from LibCommon_DataStrings all;
// ____________________________ PIXIT-S_______________________________
group SIP_PIXITparameters {
group SDPParameter {
/**
* @desc charstring for SDP user name
*/
modulepar charstring PX_SIP_SDP_USER_NAME := "voicesession";
/**
* @desc charstring for SDP session identifier
*/
modulepar charstring PX_SIP_SDP_SESSION_ID := "30000";
/**
* @desc charstring for SDP dynamic port
*/
modulepar charstring PX_SIP_SDP_DYN := "0";
/**
* @desc charstring for SDP bandwidth modifier
*/
modulepar charstring PX_SIP_SDP_B_MODIFIER := "AS";
/**
* @desc integer for SDP bandwidth value
*/
modulepar integer PX_SIP_SDP_B_BANDWIDTH := 64;
/**
* @desc charstring for SDP media attribute encoding supported by the IUT
*/
modulepar charstring PX_SIP_SDP_ENCODING := "PCMU";
/**
* @desc charstring for SDP media attribute encoding clockrate supported by the IUT
*/
modulepar charstring PX_SIP_SDP_CLOCKRATE := "8000";
} // group SDP Parameter
group XMLCOnfiguration{
/**
* @desc boolean for MessageBody length calculation based on encvalue operation result
*/
modulepar boolean PX_MB_LENGTH_FROM_ENCVAL := true;
/**
* @desc boolean for MessageBody length calculation to be performed by external function
*/
modulepar boolean PX_USE_FX_FOR_XML_LENGTH := false;
}
group SupportedOptions {
/**
* @desc charstring for Used Transport in upper case "UDP"/"TCP"
*/
modulepar charstring PX_SIP_TRANSPORT := "UDP";
} // group SupportedOptions{
group RegistrationParameters {
/**
* @desc boolean for the SIP user if it have to register itself before executing a test case
*/
modulepar boolean PX_SIP_REGISTRATION := false;
/**
* @desc charstring for PX_AUTH_ALGORITHM security algorithm Possible values: MD5 or AKAv1-MD5
*/
modulepar charstring PX_AUTH_ALGORITHM := "AKAv1-MD5";
} // group Registration parameters
group SwitchToEnableAuthentication {
/**
* @desc boolean for option controlling if authentication is enabled/disabled for REGISTER messages
*/
modulepar boolean PX_SIP_REGISTER_AUTHENTICATION_ENABLED := true;
/**
* @desc boolean for option controlling if authentication is enabled/disabled for INVITE messages
*/
modulepar boolean PX_SIP_INVITE_AUTHENTICATION_ENABLED := false;
} // group SwitchToEnableAuthentication
group SIP_Timers {
/**
* @desc float for TWait default value for waiting an operator action
*/
modulepar float PX_SIP_TWAIT := 30.0;
/**
* @desc float for TAck default value for waiting an acknowledgement
*/
modulepar float PX_SIP_TACK := 8.0;
/**
* @desc float for TResp default value for waiting for a response from the IUT
*/
modulepar float PX_SIP_TRESP := 15.0;
/**
* @desc float for TNoAct default value for waiting no message from the IUT Value given for PX_TNOACT should be less than value of SHORT_REGISTRATION constant (which is currently "3" (seconds))
*/
modulepar float PX_SIP_TNOACT := 1.0;
} // group SIP_Timers
group MimePart {
/**
* @desc charstring for delimiter value used in mime multipart message to separate message body parts
*/
modulepar charstring PX_SIP_MIME_BOUNDARY := "boundary1";
} // group MimePart
} // group SIP_PIXITparameters
/**
* @desc Set to true to force fixed random value (debug mode)
*/
modulepar boolean PX_SEED := false;
} // end module LibSip_PIXITS
/**
* @author STF 346, STF366, STF368, STF369, STF450, STF471
* @version $Id$
* @desc This module defines message, attribute, structured and simple
* SDP types as well constants used by LipSip constructs. <br>
* Note that any changes made to the definitions in this module
* may be overwritten by future releases of this library
* End users are encouraged to contact the distributers of this
* module regarding their modifications or additions
* This module is part of LibSipV3.
* @remark Adding of new attributes types is ok; Adding of new optional attributes in @see SDP_attribute type is ok; Existing attribute types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org
*/
module LibSip_SDPTypes {
import from LibSip_Common all;
group Constants {
group SimpleConstants {
// SDP net_type
const charstring c_in := "IN";
// SDP addr_type
const charstring c_ip4 := "IP4";
const charstring c_ip6 := "IP6";
// SDP_media_desc: media
const charstring c_audio := "audio";
const charstring c_image := "image";
const charstring c_video := "video";
const charstring c_text := "text";
const charstring c_msrp := "msrp";
// SDP_media_desc: transport
const charstring c_rtpAvp := "RTP/AVP";
const charstring c_rtpAvpf := "RTP/AVPF";
const charstring c_msrpTcp := "TCP/MSRP";
const charstring c_udptl := "Udptl";
// SDP_attribute_list constants:
const charstring c_local := "local";
const charstring c_mandatory := "mandatory";
const charstring c_optional := "optional";
const charstring c_none := "none";
const charstring c_qos := "qos";
const charstring c_remote := "remote";
const charstring c_sendrecv := "sendrecv";
const charstring c_sendonly := "sendonly";
const charstring c_inactive := "inactive";
const charstring c_send := "send";
const charstring c_recv := "recv";
const charstring c_e2e := "e2e";
}
}
group Types {
group SubTypes {
group AttributeTypes {
type record SDP_attribute_cat {
charstring attr_value
}
type record SDP_attribute_keywds {
charstring attr_value
}
type record SDP_attribute_tool {
charstring attr_value
}
type record SDP_attribute_ptime {
charstring attr_value
}
type record SDP_attribute_recvonly {
}
type record SDP_attribute_sendrecv {
}
type record SDP_attribute_sendonly {
}
type record SDP_attribute_inactive {
}
type record SDP_attribute_orient {
charstring attr_value
}
type record SDP_attribute_type {
charstring attr_value
}
type record SDP_attribute_charset {
charstring attr_value
}
type record SDP_attribute_sdplang {
charstring attr_value
}
type record SDP_attribute_lang {
charstring attr_value
}
type record SDP_attribute_framerate {
charstring attr_value
}
type record SDP_attribute_quality {
charstring attr_value
}
type union SDP_attribute_fmtp_format_specific_params {
SemicolonParam_List paramList,
charstring unstructured
}
type record SDP_attribute_fmtp {
charstring format,
SDP_attribute_fmtp_format_specific_params params
}
type record SDP_attribute_curr {
charstring preconditionType,
charstring statusType,
charstring direction
}
type record SDP_attribute_des {
charstring preconditionType,
charstring strength,
charstring statusType,
charstring direction
}
type record SDP_attribute_conf {
charstring preconditionType,
charstring statusType,
charstring direction
}
type record SDP_attribute_rtpmap_codec {
charstring encoding,
charstring clockrate,
charstring parameters optional
}
type record SDP_attribute_rtpmap {
charstring payload_type,
SDP_attribute_rtpmap_codec codec
}
type record SDP_attribute_rtcp {
integer portnumber,
SDP_connection connection optional
}
type record SDP_attribute_msrp {
charstring attr_value
}
type record SDP_attribute_unknown {
charstring name,
charstring attr_value optional
}
type record SDP_attribute_maxptime {
charstring attr_value
}
type record SDP_attribute_tcap {
integer trpr_cap_num,
Charstring_List proto_list
}
type record SDP_attribute_pcfg {
integer config_number,
Charstring_List pot_cfg_list optional
}
type record SDP_attribute_acfg {
integer config_number,
Charstring_List sel_cfg_list optional
}
type record SDP_attribute_ecn_capable_rtp {
Charstring_List init_list,
Charstring_List parm_list optional
}
type record SDP_attribute_rtcp_fb {
charstring rtcp_fb_pt,
charstring rtcp_fb_val
}
type record SDP_attribute_rtcp_xr {
Charstring_List xr_format_list optional
}
type record SDP_attribute_rtcp_rsize {
}
type record SDP_attribute_3ge2ae {
charstring indicator
}
type record SDP_attribute_crypto {
charstring tag,
charstring crypto_suite,
charstring key_params,
Charstring_List session_params optional
}
type record SDP_attribute_content {
Charstring_List content_params
}
type record SDP_attribute_keymgmt {
charstring prtcl_id,
charstring data
}
type union SDP_attribute {
SDP_attribute_cat cat,
SDP_attribute_keywds keywds,
SDP_attribute_tool tool,
SDP_attribute_ptime ptime,
SDP_attribute_recvonly recvonly,
SDP_attribute_sendrecv sendrecv,
SDP_attribute_sendonly sendonly,
SDP_attribute_inactive inactive,
SDP_attribute_orient orient,
SDP_attribute_type sdp_type,
SDP_attribute_charset charset,
SDP_attribute_sdplang sdplang,
SDP_attribute_lang lang,
SDP_attribute_framerate framerate,
SDP_attribute_quality quality,
SDP_attribute_fmtp fmtp,
SDP_attribute_curr curr,
SDP_attribute_des des,
SDP_attribute_conf conf,
SDP_attribute_rtpmap rtpmap,
SDP_attribute_rtcp rtcp,
SDP_attribute_msrp msrp,
SDP_attribute_maxptime maxptime,
SDP_attribute_tcap tcap,
SDP_attribute_pcfg pcfg,
SDP_attribute_acfg acfg,
SDP_attribute_ecn_capable_rtp ecn_capable_rtp,
SDP_attribute_rtcp_fb rtcp_fb,
SDP_attribute_rtcp_xr rtcp_xr,
SDP_attribute_rtcp_rsize rtcp_rsize,
SDP_attribute_3ge2ae e2ae,
SDP_attribute_crypto crypto,
SDP_attribute_content content,
SDP_attribute_keymgmt keymgmt,
//* unknown has to be the last else encoding/decoding won't work!
SDP_attribute_unknown unknown
}
} //* group AttributeTypes
type set of SDP_attribute SDP_attribute_list;
type record SDP_bandwidth {
charstring modifier,
integer bandwidth
}
type set of SDP_bandwidth SDP_bandwidth_list;
type record SDP_connection {
charstring net_type,
charstring addr_type,
SDP_conn_addr conn_addr
}
type record SDP_conn_addr {
charstring addr,
integer ttl optional,
integer num_of_addr optional
}
type set of SDP_connection SDP_connection_list;
type record SDP_contact {
charstring addr_or_phone,
charstring disp_name optional
}
type SDP_contact SDP_contact_tel;
type SDP_contact SDP_contact_email;
type set of SDP_contact_email SDP_email_list;
type record of charstring SDP_fmt_list;
type record SDP_key {
charstring method,
charstring key optional
}
type record SDP_media_desc {
SDP_media_field media_field,
charstring information optional,
SDP_connection_list connections optional,
SDP_bandwidth_list bandwidth optional,
SDP_key key optional,
SDP_attribute_list attributes optional
}
type set of SDP_media_desc SDP_media_desc_list;
type record SDP_media_port {
integer port_number,
integer num_of_ports optional
}
type record SDP_media_field {
charstring media,
SDP_media_port ports,
charstring transport,
SDP_fmt_list fmts
}
type record SDP_time {
SDP_time_field time_field,
SDP_repeat_list time_repeat optional
}
type record SDP_time_field {
charstring start_time,
//* field is numeric strings that may not fit into 32-bit signed int
charstring
stop_time //* field is numeric strings that may not fit into 32-bit signed int
}
type record SDP_repeat {
SDP_typed_time repeat_interval,
SDP_typed_time active,
SDP_typed_time_list offsets
}
type set of SDP_repeat SDP_repeat_list;
type record SDP_typed_time {
integer time,
charstring unit optional
}
type set of SDP_typed_time SDP_typed_time_list;
type set of SDP_time SDP_time_list;
type record SDP_timezone {
charstring adjustment_time,
SDP_typed_time offset
}
type set of SDP_timezone SDP_timezone_list;
type record SDP_Origin {
charstring user_name,
charstring session_id,
//* field is numeric strings that may not fit into 32-bit signed int
charstring session_version,
//* field is numeric strings that may not fit into 32-bit signed int
charstring net_type,
charstring addr_type,
charstring addr
}
type set of SDP_contact_tel SDP_phone_list;
} //* group SubTypes
group MessageTypes {
type record SDP_Message {
integer protocol_version,
SDP_Origin origin,
charstring session_name,
charstring information optional,
charstring uri optional,
SDP_email_list emails optional,
SDP_phone_list phone_numbers optional,
SDP_connection connection optional,
SDP_bandwidth_list bandwidth optional,
SDP_time_list times,
SDP_timezone_list timezone_adjustments optional,
SDP_key key optional,
SDP_attribute_list attributes optional,
SDP_media_desc_list media_list optional
}
with {
encode "SDPCodec";
}
} // group MessageTypes
} // group Types
} // end module LibSip_SDPTypes
/**
* @author STF 346, STF366, STF368, STF369, STF450, STF471, STF160
* @version $Id$
* @desc This module defines message, header, structured and simple SIP
* types as well constants used by LipSip constructs. <br>
* Note that any changes made to the definitions in this module
* may be overwritten by future releases of this library
* End users are encouraged to contact the distributers of this
* module regarding their modifications or additions
* This module is part of LibSipV3.
* @remark Adding of new message and header types is ok; Adding of new optional header fields in
* @see MessageHeader type is ok but should be done at same time as dummy template updates; Existing message or header types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org
*/
module LibSip_SIPTypesAndValues {
import from LibSip_MessageBodyTypes all;
import from LibSip_Common all;
group Constants {
group SimpleConstants {
// SIP name protocol plus version
const charstring c_sipNameVersion := "SIP/2.0";
// SIP name protocol
const charstring c_sipName := "SIP";
// SIP version
const charstring c_sipVersion := "2.0";
// SIP scheme
const charstring c_sipScheme := "sip";
// TEL scheme
const charstring c_telScheme := "tel";
// URN schema
const charstring c_urnScheme := "urn";
// TAG_ID
const charstring c_tagId := "tag";
// BRANCH_ID
const charstring c_branchId := "branch";
// BRANCH_COOKIE
const charstring c_branchCookie := "z9hG4bK";
// EXPIRES_ID
const charstring c_expiresId := "expires";
// MADDR_ID
const charstring c_maddrId := "maddr";
// METHOD_ID
const charstring c_methodId := "method";
// RECEIVED_ID
const charstring c_receivedId := "received";
// TTL_ID
const charstring c_ttlId := "ttl";
// USER_ID
const charstring c_userId := "user";
// SDP name application
const charstring c_sdpApplication := "application/sdp";
// XML name application
const charstring c_xmlApplication := "application/xml";
// XML name application
const charstring c_xmlreginfoApplication := "application/reginfo+xml";
// XML name resource-list
const charstring c_xmlresourcelistApplication := "application/resource-lists+xml";
// IMS 3GPP name application
const charstring c_ims3gppApplication := "application/3gpp-ims+xml";
// IMS 3GPP name CW application
const charstring c_ims3gppCwApplication := "application/vnd.3gpp.cw+xml";
// IMS ETSI name MCID application
const charstring c_imsEtsiMcidApplication := "application/vnd.etsi.mcid+xml";
// IMS ETSI name CUG application
const charstring c_imsEtsiCugApplication := "application/vnd.etsi.cug+xml";
// IMS ETSI name Simservs application(TIP/TIR, ACR, CDIV, OIP/OIR, CUG)
const charstring c_imsEtsiSimservsApplication := "application/vnd.etsi.simservs+xml";
// OCTET-STREAM name application
const charstring c_octetApplication := "application/octet-stream";
// PLAIN-TEXT name application
const charstring c_plainText := "text/plain";
// SIP fragment message
const charstring c_sipfragMessage := "message/sipfrag";
// text content of 1300 bytes for messages with message body
const charstring c_longMessageContent_1300Bytes :=
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" &
"0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & oct2char('0D'O) & oct2char('0A'O); // CRLF
// Default SIP port number : 5060
const integer c_defaultSipPort := 5060;
// Default SIP protocol : UDP
const charstring c_defaultSipProt := "UDP";
// Fixed IP multicast address
const charstring c_mcastSipIpaddr := "224.0.1.75";
// Short delta-second used in expires parameter to acknowledge a registration
const charstring c_shortRegistration := "3600";
// ([RFC3891 ] Sec 6.1)
const charstring c_earlyFlag := "early-only";
// option tag replaces ([RFC3261 ] )
const charstring c_replaces := "replaces";
// option tag 100rel (reliable provisional response [RFC3262 ] )
const charstring c_tag100rel := "100rel";
// option tag from-change ([RFC4916 ] )
const charstring c_tagFromChange := "from-change";
// option tag precondition (ch.11 [RFC3312 ] )
const charstring c_tagPrecond := "precondition";
// due to problem with TAU compiler because hardcoded return statement constant is created
const HostPort c_hostport_dummy := {
host := "",
portField := c_defaultSipPort
};
// CLIP/CLIR information
const PrivacyValue c_privacy_none := "none";
const PrivacyValue c_privacy_id := "id";
const PrivacyValue c_privacy_header := "header";
const PrivacyValue c_privacy_user := "user";
const PrivacyValue c_privacy_critical := "critical";
const PrivacyValue c_privacy_session := "session";
//
const charstring c_AT := "@"; // MRO
const charstring c_SP := oct2char('20'O);
const charstring c_SLASH := oct2char('2F'O);
const charstring c_LT := oct2char('3C'O);
const charstring c_GT := oct2char('3E'O);
// * (wildchard) sign
const charstring c_WILDCARD := "*";
const integer c_CRlen := 2;
// length of new line (0d0a)
const GenericParam c_Integrity_protected_yes := {"integrity-protected", {tokenOrHost := "yes"}};
const GenericParam c_Integrity_protected_no := {"integrity-protected", {tokenOrHost := "no"}};
const GenericParam c_Integrity_protected_ip_assoc_pending := {"integrity-protected", {tokenOrHost := "ip-assoc-pending"}};
const charstring c_algorithm := "MD5";
} // end group SimpleConstants
group AuthorizationConstants {
const charstring c_ik := "";
const charstring c_ck := "";
const charstring c_nonce := "";
const charstring c_nonce_value := "0edff6c521cc3f407f2d9e01cf6ed82b";
} // end group AuthorizationConstants
group PChargingVectorConstants {
const charstring c_icid := "icid-value";
const charstring c_icid_value := "123abc";
const charstring c_icid_generated_at := "icid-generated-at";
const charstring c_orig_ioi := "orig-ioi";
const charstring c_term_ioi := "term-ioi";
const charstring c_access_network_charging_info := "access-network-charging-info";
} // end group PChargingVectorConstants
group HeaderFieldConstants {
const CallId c_empty_CallId := {
fieldName := CALL_ID_E,
callid := ""
};
const ContentType c_empty_ContentType := {
fieldName := CONTENT_TYPE_E,
mTypeSubtype := "",
mParams := omit
};
const CSeq c_empty_cSeq := {
fieldName := CSEQ_E,
seqNumber := 0,
method := "EMPTY"
};
const From c_empty_From := {
fieldName := FROM_E,
addressField := {
nameAddr := {
displayName := omit,
addrSpec := {
scheme := c_sipScheme,
components := {
sip := {
userInfo := omit,
hostPort := {
host := "127.0.0.1",
portField := c_defaultSipPort
}
}
},
urlParameters := omit,
headers := omit
}
}
},
fromParams := omit
};
const MaxForwards c_maxForwards70 := {
fieldName := MAX_FORWARDS_E,
forwards := 70
};
const SipUrl c_empty_RequestUri := {
scheme := c_sipScheme,
components := {
sip := {
userInfo := omit,
hostPort := {
host := "127.0.0.1",
portField := c_defaultSipPort
}
}
},
urlParameters := omit,
headers := omit
};
const SipUrl c_unavailableUri := {
scheme := c_sipScheme,
components := {
sip := {
userInfo := {
userOrTelephoneSubscriber := "unavailable",
password := omit
},
hostPort := {
host := "anonymous.invalid",
portField := c_defaultSipPort
}
}
},
urlParameters := omit,
headers := omit
};
const To c_empty_To := { // value of To header
fieldName := TO_E,
addressField := {
nameAddr := {
displayName := omit,
addrSpec := {
scheme := c_sipScheme,
components := {
sip := {
userInfo := omit,
hostPort := {
host := "127.0.0.1",
portField := c_defaultSipPort
}
}
},
urlParameters := omit,
headers := omit
}
}
},
toParams := omit
};
const Via c_empty_Via := {
fieldName := VIA_E,
viaBody := {
{
sentProtocol := {
protocolName := c_sipName,
protocolVersion := c_sipVersion,
transport := c_defaultSipProt
},
sentBy := {
host := "127.0.0.1",
portField := c_defaultSipPort
},
viaParams := omit
}
}
};
}
group UserProfileConstants {
// number of user profile from 1-10 for SIP profile
const integer c_userProfile_SIP1_home := 1;
const integer c_userProfile_SIP2_home := 2;
} // end group UserProfileConstants
group StatusLines {
const StatusLine c_statusLine100 := {c_sipNameVersion, 100, "Trying"};
const StatusLine c_statusLine180 := {c_sipNameVersion, 180, "Ringing"};
const StatusLine c_statusLine181 := {c_sipNameVersion, 181, "Call Is Being Forwarded"};
const StatusLine c_statusLine182 := {c_sipNameVersion, 182, "Queued"};
const StatusLine c_statusLine183 := {c_sipNameVersion, 183, "Session Progress"};
const StatusLine c_statusLine200 := {c_sipNameVersion, 200, "OK"};
const StatusLine c_statusLine202 := {c_sipNameVersion, 202, "Accepted"};
const StatusLine c_statusLine300 := {c_sipNameVersion, 300, "Multiple Choices"};
const StatusLine c_statusLine301 := {c_sipNameVersion, 301, "Moved Permanently"};
const StatusLine c_statusLine302 := {c_sipNameVersion, 302, "Moved Temporarily"};
const StatusLine c_statusLine305 := {c_sipNameVersion, 305, "Use Proxy"};
const StatusLine c_statusLine380 := {c_sipNameVersion, 380, "Alternative Service"};
const StatusLine c_statusLine400 := {c_sipNameVersion, 400, "Bad Request"};
const StatusLine c_statusLine401 := {c_sipNameVersion, 401, "Unauthorized"};
const StatusLine c_statusLine402 := {c_sipNameVersion, 402, "Payment Required"};
const StatusLine c_statusLine403 := {c_sipNameVersion, 403, "Forbidden"};
const StatusLine c_statusLine404 := {c_sipNameVersion, 404, "Not Found"};
const StatusLine c_statusLine405 := {c_sipNameVersion, 405, "Method Not Allowed"};
const StatusLine c_statusLine406 := {c_sipNameVersion, 406, "Not Acceptable"};
const StatusLine c_statusLine407 := {c_sipNameVersion, 407, "Proxy Authentication Required"};
const StatusLine c_statusLine408 := {c_sipNameVersion, 408, "Request Timeout"};
const StatusLine c_statusLine410 := {c_sipNameVersion, 410, "Gone"};
const StatusLine c_statusLine413 := {c_sipNameVersion, 413, "Request Entity Too Large"};
const StatusLine c_statusLine414 := {c_sipNameVersion, 414, "Request-URI Too Long"};
const StatusLine c_statusLine415 := {c_sipNameVersion, 415, "Unsupported Media Type"};
const StatusLine c_statusLine416 := {c_sipNameVersion, 416, "Unsupported URI Scheme"};
const StatusLine c_statusLine420 := {c_sipNameVersion, 420, "Bad Extension"};
const StatusLine c_statusLine421 := {c_sipNameVersion, 421, "Extension Required"};
const StatusLine c_statusLine422 := {c_sipNameVersion, 422, "Session Interval Too Small"};
const StatusLine c_statusLine423 := {c_sipNameVersion, 423, "Interval Too Brief"};
const StatusLine c_statusLine433 := {c_sipNameVersion, 433, "Anonymity Disallowed"};
const StatusLine c_statusLine480 := {c_sipNameVersion, 480, "Temporarily Unavailable"};
const StatusLine c_statusLine481 := {c_sipNameVersion, 481, "Call/Transaction Does Not Exist"};
const StatusLine c_statusLine482 := {c_sipNameVersion, 482, "Loop Detected"};
const StatusLine c_statusLine483 := {c_sipNameVersion, 483, "Too Many Hops"};
const StatusLine c_statusLine484 := {c_sipNameVersion, 484, "Address Incomplete"};
const StatusLine c_statusLine485 := {c_sipNameVersion, 485, "Ambiguous"};
const StatusLine c_statusLine486 := {c_sipNameVersion, 486, "Busy Here"};
const StatusLine c_statusLine487 := {c_sipNameVersion, 487, "Request Terminated"};
const StatusLine c_statusLine488 := {c_sipNameVersion, 488, "Not Acceptable Here"};
const StatusLine c_statusLine493 := {c_sipNameVersion, 493, "Undecipherable"};
const StatusLine c_statusLine500 := {c_sipNameVersion, 500, "Server Internal Error"};
const StatusLine c_statusLine501 := {c_sipNameVersion, 501, "Not implemented"};
const StatusLine c_statusLine502 := {c_sipNameVersion, 502, "Bad Gateway"};
const StatusLine c_statusLine503 := {c_sipNameVersion, 503, "Service Unavailable"};
const StatusLine c_statusLine504 := {c_sipNameVersion, 504, "Server Time-out"};
const StatusLine c_statusLine505 := {c_sipNameVersion, 505, "Version Not Supported"};
const StatusLine c_statusLine513 := {c_sipNameVersion, 513, "Message Too Large"};
const StatusLine c_statusLine580 := {c_sipNameVersion, 580, "Precondition Failure"};
const StatusLine c_statusLine600 := {c_sipNameVersion, 600, "Busy Everywhere"};
const StatusLine c_statusLine603 := {c_sipNameVersion, 603, "Decline"};
const StatusLine c_statusLine604 := {c_sipNameVersion, 604, "Does Not Exist Anywhere"};
const StatusLine c_statusLine606 := {c_sipNameVersion, 606, "Not Acceptable"};
} // end StatusLines
group SIPSyncPointNames {
const charstring c_Ringing := "Ringing";
const charstring c_uPlane := "uPlane";
const charstring c_sync1 := "sync1";
const charstring c_sync2 := "sync2";
const charstring c_sync3 := "sync3";
const charstring c_sync4 := "sync4";
const charstring c_uPlaneStop := "uPlaneStop";
const charstring c_annoucA := "announcementA";
const charstring c_annoucB := "announcementB";
const charstring c_annouc := "announcement";
const charstring c_voicem := "voiceMessage";
}
} // end group Constants
group Types {
group SubTypes {
// Subtypes
group TokenTypes // TokensTypes
{
// [20 ]
type enumerated FieldName {
ACCEPT_E,
ACCEPT_ENCODING_E,
ACCEPT_LANGUAGE_E,
ALERT_INFO_E,
ALLOW_E,
AUTHENTICATION_INFO_E,
AUTHORIZATION_E,
CALL_ID_E,
CALL_INFO_E,
CONTACT_E,
CONTENT_DISPOSITION_E,
CONTENT_ENCODING_E,
CONTENT_LANGUAGE_E,
CONTENT_LENGTH_E,
CONTENT_TYPE_E,
CSEQ_E,
DATE_E,
ERROR_INFO_E,
EXPIRES_E,
FROM_E,
IN_REPLY_TO_E,
MAX_FORWARDS_E,
MIME_VERSION_E,
MIN_EXPIRES_E,
ORGANIZATION_E,
PRIORITY_E,
PROXY_AUTHENTICATE_E,
PROXY_AUTHORIZATION_E,
PROXY_REQUIRE_E,
RECORD_ROUTE_E,
REPLY_TO_E,
REQUIRE_E,
RETRY_AFTER_E,
ROUTE_E,
SERVER_E,
SUBJECT_E,
SUPPORTED_E,
TIMESTAMP_E,
TO_E,
UNSUPPORTED_E,
USER_AGENT_E,
VIA_E,
WARNING_E,
WWW_AUTHENTICATE_E,
// [3262/7.1 ]
RACK_E,
RSEQ_E,
// [3265/7.2 ]
ALLOW_EVENTS_E,
EVENT_E,
SUBSCRIPTION_STATE_E,
// [3313 ]
P_MEDIA_AUTHORIZATION_E,
// [3323 ]
PRIVACY_E,
// [3325 ]
P_ASSERTED_ID_E,
P_PREFERRED_ID_E,
P_PREFERRED_SERVICE_E,
// [3326 ]
REASON_E,
// [3515 ] - REFER method
REFER_TO_E,
// [4488 ] - REFER method
REFER_SUB_E,
// [3891 ]
REPLACES_E,
// [3892 ] - REFER method
REFERRED_BY_E,
// [4244 ]
HISTORY_INFO_E,
// [3313 ]
P_MEDIA_AUTH_E,
// [3327 ]
PATH_E,
// [3329 ]
SECURITY_CLIENT_E,
SECURITY_SERVER_E,
SECURITY_VERIFY_E,
// [3455 ]
P_ACCESS_NETWORK_INFO_E,
P_ASSOCIATED_URI_E,
P_CALLED_PARTY_E,
P_CHARGING_FUNCTION_ADDRESSES_E,
P_CHARGING_VECTOR_E,
P_VISITED_NETWORK_E,
// [3608 ]
SERVICE_ROUTE_E,
// [3841 ]
ACCEPT_CONTACT_E,
REQUEST_DISPOSITION_E,
// [4028 ]
MIN_SE_E,
SESSION_EXPIRES_E,
P_ASSERTED_SERVICE_E,
// [5009 ]
P_EARLY_MEDIA_E,
// http://tools.ietf.org/html/draft-johnston-sipping-cc-uui-07
// Transporting User to User Call Control Information in SIP for ISDN Interworking
USER_TO_USER_E,
// [6442 ] /*
GEOLOCATION_E,
GEOLOCATION_ROUTING_E,
SESSION_ID_E,
SIP_ETAG_E,
SIP_IF_MATCH_E,
FEATURE_CAPS_E,
// 6086
RECV_INFO_E,
INFO_PACKAGE_E,
// 2616
HOST_E,
//
RESOURCE_PRIORITY_E, //4412
ANSWER_MODE_E, //5373
PRIV_ANSWER_MODE_E, //5373
TARGET_DIALOG_E, //4538
P_ANSWER_STATE_E //4964
}
// [7.1 ]
type enumerated Method {
ACK_E,
BYE_E,
CANCEL_E,
INVITE_E,
OPTIONS_E,
REGISTER_E,
PRACK_E // Note: this element is not defined in [5 ]
,
SUBSCRIBE_E,
NOTIFY_E // [3265 ]
,
PUBLISH_E // [3903/12 ]
,
REFER_E // [3515 ]
,
UPDATE_E // [3311 ]
,
MESSAGE_E // [3428 ]
,
INFO_E // [2976 ]
,
UNKNOWN_METHOD_E
}
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39, 20.42, 20.43 ]
type record HostPort {
charstring host optional, // hostname, IPv4 or IPv6
integer portField optional // represented as an integer
}
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ]
/**
* @desc identifier for user or telephone subscriber
* @member userOrTelephoneSubscriber provides the username or a phone name identifying the subscriber
* @member password related password information
*/
type record UserInfo {
charstring userOrTelephoneSubscriber,
charstring password optional
}
// [19.1.1 ;used in: 20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ]
/**
* @desc Uniform Resource Identifier (URI)
* @member scheme distinguishes call types, e.g. voice, fax etc. or related address scheme, e.g. tel, sip
* @member userInfo Contains user information (also in non-SIP URLs) with optional parameter as passwords
* @member hostPort Hostname or IP address information and port identifier of the target
* @member urlParameters Contains either SIP or TEL URL parameters, separated by semicolons, e.g. transport=tcp or user=phone
* @member headers Additional information added after the parameters, e.g. priority=urgent
*/
type record SipUriComponents { // sip-uri acc. to RFC 3261 cl. 19.1
UserInfo userInfo optional,
HostPort hostPort
}
type record TelUriComponents { // tel-uri acc. to RFC 3966
charstring subscriber
}
type record UrnUriComponents { // urn-uri acc. to RFC 2141
charstring namespaceId, // e.g. "service" as acc. to RFC 5031
charstring namespaceSpecificString // e.g. "sos"
}
type union UriComponents {
SipUriComponents sip, // scheme: "sip" or sips"
TelUriComponents tel, // scheme: "tel"
UrnUriComponents urn, // scheme: "urn"
charstring other // scheme: none of the above schemes
}
type record SipUrl {
charstring scheme, // e.g "sip" or "tel"
UriComponents components, // corresponding to the scheme
SemicolonParam_List urlParameters optional,
AmpersandParam_List headers optional
}
// [20.1, RFC2616 14.1 ]
type record AcceptBody {
charstring mediaRange,
SemicolonParam_List acceptParam optional
}
// [20.1, RFC2616 14.1 ]
type set of AcceptBody AcceptBody_List;
// [20.4 ]
type record AlertInfoBody {
charstring url, // any URI
SemicolonParam_List genericParams optional
}
// [20.4 ]
type set of AlertInfoBody AlertInfoBody_List;
// [20.8 ]
type charstring CallidString;
// token ["
// [20.8 ]
type set of CallidString CallidString_List;
// [20.9 ]
type record CallInfoBody {
charstring url, // any URI
SemicolonParam_List infoParams optional
}
// [20.9 ]
type set of CallInfoBody CallInfoBody_List;
// [20.27, 20.44, .......10.32, 10.48; RFC2616 14.33, 14.47; RFC2617 1.2 ]
type union Challenge {
CommaParam_List digestCln,
OtherAuth otherChallenge
}
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ]
type union DisplayName
{
charstring token,
charstring quotedString
}
// [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ]
type record NameAddr {
DisplayName displayName optional,
SipUrl addrSpec
}
// [20.10, 20.20, 20.31, 20.39 ]
type union Addr_Union {
NameAddr nameAddr,
SipUrl addrSpecUnion // STS: "Union" added to filed name to avoid dangerous name equivalence with 2nd NameAddr field
}
// [20.10 ]
type record ContactAddress {
Addr_Union addressField,
SemicolonParam_List contactParams optional
}
// [20.10 ]
type set of ContactAddress ContactAddress_List; // 1 or more elements
// [20.10 ]
type union ContactBody {
charstring wildcard,
ContactAddress_List contactAddresses
}
// [20.2, 20.12; RFC2616 14.3, 14.11 ]
type charstring ContentCoding;
// [20.2, 20.12; RFC2616 14.3, 14.11 ]
type set of ContentCoding ContentCoding_List;
// [20.7, 20.28; RFC2616 14.35 RFC2617 1.2 ]
type union Credentials {
CommaParam_List digestResponse,
OtherAuth otherResponse
}
// allow multiple Authorization headers due to RFC3261 ch. 20.7 and 20.28
type record of Credentials CredentialsList;
// [20.19, 20.23, 20.33 ]
type charstring DeltaSec; // an external operation can handle this field
// [20.18 ]
type record ErrorInfoBody {
charstring uri, // any URI
SemicolonParam_List genericParams optional
}
// [20.18 ]
type set of ErrorInfoBody ErrorInfoBody_List;
// [20.3 RFC2616 14.4 ]
type record LanguageBody {
charstring languageRange,
SemicolonParam_List acceptParam optional
}
// [20.3 RFC2616 14.4 ]
type set of LanguageBody LanguageBody_List;
// [20.13; RFC2616 14.12 ]
type charstring LanguageTag;
// [20.13; RFC2616 14.12 ]
type set of LanguageTag LanguageTag_List;
// [20.5 ]
type set of charstring Method_List;
// [20.29, 20.32, 20.37, 20.40 ]
type charstring OptionTag;
// [20.29, 20.32, 20.37, 20.40 ]
type set of OptionTag OptionTag_List;
// [20.7, 20.27, 20.28, 20.44 ; RFC2616 14.33, 14.47; RFC2617 1.2 ]
type record OtherAuth {
charstring authScheme,
CommaParam_List authParams
}
type record Payload {
integer payloadlength,
charstring payloadvalue
}
// [20.30,20.34 ]
type record RouteBody {
NameAddr nameAddr,
SemicolonParam_List rrParam optional
}
// [20.30,20.34 ]
type record of RouteBody RouteBody_List;
// [20.42 ]
type record SentProtocol {
charstring protocolName,
charstring protocolVersion,
charstring transport
}
// [20.35, 20.41; RFC2616 14.43 ]
type charstring ServerVal;
// [20.35, 20.41; RFC2616 14.43 ]
type set of ServerVal ServerVal_List;
// [20.38 ]
type record TimeValue {
integer majorDigit, // represented as an integer
integer minorDigit optional // represented as an integer
}
// [20.42 ]
type record ViaBody {
SentProtocol sentProtocol,
HostPort sentBy,
SemicolonParam_List viaParams optional
}
// [20.42 ]
type record of ViaBody ViaBody_List;
// [20.43 ]
type union WarnAgent {
HostPort hostPort,
charstring pseudonym
}
// [20.43 ]
type record WarningValue {
integer warnCode, // represented as an integer
WarnAgent warnAgent,
charstring warnText
}
// [20.43 ]
type set of WarningValue WarningValue_List;
type Addr_Union PAssertedIDValue;
type record of PAssertedIDValue PAssertedIDValue_List;
type charstring PAssertedServiceValue;
type Addr_Union PPreferredIDValue;
type record of PPreferredIDValue PPreferredIDValue_List;
type charstring PrivacyValue;
type record of PrivacyValue PrivacyValue_List;
type set of FcValue FcValue_List;
type record FcValue {
charstring wildcard(c_WILDCARD),
SemicolonParam_List fcParams optional
}
} // end group TokensType
group HeaderFieldTypes // Header Fields
{
group CommonHeaderFieldTypes {
// [20.1, RFC2616 14.1 ]
type record Accept {
FieldName fieldName (ACCEPT_E) ,
AcceptBody_List acceptArgs optional
}
// [20.2, RFC2616 14.3 ]
type record AcceptEncoding {
FieldName fieldName (ACCEPT_ENCODING_E) ,
ContentCoding_List contentCoding optional
}
// [20.3, RFC2616 14.4 ]
type record AcceptLanguage {
FieldName fieldName (ACCEPT_LANGUAGE_E) ,
LanguageBody_List languageBody optional
}
// [20.4 ]
type record AlertInfo {
FieldName fieldName (ALERT_INFO_E) ,
AlertInfoBody_List alertInfoBody optional
}
// [20.5 ]
type record Allow {
FieldName fieldName (ALLOW_E) ,
Method_List methods optional
}
// [20.6 ]
type record AuthenticationInfo {
FieldName fieldName (AUTHENTICATION_INFO_E) ,
CommaParam_List ainfo
}
// [20.7 RFC2617 3.2.2 ]
type record Authorization {
FieldName fieldName (AUTHORIZATION_E) ,
CredentialsList body // changed from Credentials to allow multiple Authorization headers
}
// [20.8 ]
type record CallId {
FieldName fieldName (CALL_ID_E) ,
CallidString callid
}
// [20.9 ]
type record CallInfo {
FieldName fieldName (CALL_INFO_E) ,
CallInfoBody_List callInfoBody optional
}
// [20.10 ]
type record Contact {
FieldName fieldName (CONTACT_E) ,
ContactBody contactBody
}
// [20.11 ]
type record ContentDisposition {
FieldName fieldName (CONTENT_DISPOSITION_E) ,
charstring dispositionType,
SemicolonParam_List dispositionParams optional
}
// [20.12 RFC2616 14.11 ]
type record ContentEncoding {
FieldName fieldName (CONTENT_ENCODING_E) ,
ContentCoding_List contentCoding
}
// [20.13 RFC2616 14.12 ]
type record ContentLanguage {
FieldName fieldName (CONTENT_LANGUAGE_E) ,
LanguageTag_List languageTag
}
// [20.14 ]
type record ContentLength {
FieldName fieldName (CONTENT_LENGTH_E) ,
integer len // this field is represented as an integer
}
// [20.15 ]
type record ContentType {
FieldName fieldName (CONTENT_TYPE_E) ,
charstring mTypeSubtype ,
SemicolonParam_List mParams optional
}
// [20.16 ]
type record CSeq {
FieldName fieldName (CSEQ_E) ,
integer seqNumber, // this field is represented as an integer
charstring method
}
// [20.17 ]
type record Date {
FieldName fieldName (DATE_E) ,
charstring sipDate
}
// [20.18 ]
type record ErrorInfo {
FieldName fieldName (ERROR_INFO_E) ,
ErrorInfoBody_List errorInfo optional
}
// [20.19 ]
type record Expires {
FieldName fieldName (EXPIRES_E) ,
DeltaSec deltaSec
}
//[6809]
type record FeatureCaps {
FieldName fieldName(FEATURE_CAPS_E),
FcValue_List fcValues
}
// [20.20 ]
type record From {
FieldName fieldName (FROM_E) ,
Addr_Union addressField,
SemicolonParam_List fromParams optional
}
// [2616]
type record Host {
FieldName fieldName(HOST_E),
charstring host, // an empty value is represented by the empty charstring ""
integer portField optional
}
// [20.21 ]
type record InReplyTo {
FieldName fieldName (IN_REPLY_TO_E) ,
CallidString_List callids
}
// [20.22 ]
type record MaxForwards {
FieldName fieldName (MAX_FORWARDS_E) ,
integer forwards // this field is represented as an integer
}
// [20.23 ]
type record MinExpires {
FieldName fieldName (MIN_EXPIRES_E) ,
DeltaSec deltaSec
}
// [20.24 RFC2616 19.4.1 ]
type record MimeVersion {
FieldName fieldName (MIME_VERSION_E) ,
integer majorNumber, // this field is represented as an integer
integer minorNumber // this field is represented as an integer
}
// [20.25 ]
type record Organization {
FieldName fieldName (ORGANIZATION_E) ,
charstring organization
}
// [20.26 ]
type record Priority {
FieldName fieldName (PRIORITY_E) ,
charstring priorityValue
}
// [20.27 RFC2616 14.33 RFC2617 1.2 ]
type record ProxyAuthenticate {
FieldName fieldName (PROXY_AUTHENTICATE_E) ,
Challenge challenge
}
// [20.28 RFC2616 14.35 RFC2617 1.2 ]
type record ProxyAuthorization {
FieldName fieldName (PROXY_AUTHORIZATION_E) ,
CredentialsList
credentials // changed from Credentials to allow multiple Authorization headers
}
// [20.29 ]
type record ProxyRequire {
FieldName fieldName (PROXY_REQUIRE_E) ,
OptionTag_List optionsTags
}
// [20.30 ]
type record RecordRoute {
FieldName fieldName (RECORD_ROUTE_E) ,
RouteBody_List routeBody
}
type set of InfoPackage_Type InfoPackage_List;
type record InfoPackage_Type {
charstring infoPackageName,
SemicolonParam_List infoPackageParams optional
}
//[6086]
type record RecvInfo {
FieldName fieldName(RECV_INFO_E),
InfoPackage_List infoPackageList
}
//[6086]
type record InfoPackage {
FieldName fieldName(INFO_PACKAGE_E),
InfoPackage_Type infoPackageType
}
// [20.31 ]
type record ReplyTo {
FieldName fieldName (REPLY_TO_E) ,
Addr_Union addressField,
SemicolonParam_List replyToParams optional
}
// [20.32 ]
type record Require {
FieldName fieldName (REQUIRE_E) ,
OptionTag_List optionsTags
}
// [20.33 ]
type record RetryAfter {
FieldName fieldName (RETRY_AFTER_E) ,
DeltaSec deltaSec,
charstring comment optional,
SemicolonParam_List retryParams optional
}
// [20.34 ]
type record Route {
FieldName fieldName (ROUTE_E) ,
RouteBody_List routeBody
}
// [20.35 RFC2616 14.38 ]
type record Server {
FieldName fieldName (SERVER_E) ,
ServerVal_List serverBody
}
// [20.36 ]
type record Subject {
FieldName fieldName (SUBJECT_E) ,
charstring summary
}
// [20.37 ]
type record Supported {
FieldName fieldName (SUPPORTED_E) ,
OptionTag_List optionsTags optional
}
// [20.38 ]
type record Timestamp {
FieldName fieldName (TIMESTAMP_E) ,
TimeValue timeValue optional,
TimeValue delay optional
}
// [20.39 ]
type record To {
FieldName fieldName (TO_E) ,
Addr_Union addressField,
SemicolonParam_List toParams optional
}
// [20.40 ]
type record Unsupported {
FieldName fieldName (UNSUPPORTED_E) ,
OptionTag_List optionsTags
}
// Undefined header field
type record UndefinedHeader {
charstring headerName,
charstring headerValue
}
type set of UndefinedHeader UndefinedHeader_List;
// [20.41 RFC2616 14.43 ]
type record UserAgent {
FieldName fieldName (USER_AGENT_E) ,
ServerVal_List userAgentBody
}
// [20.42 ]
type record Via {
FieldName fieldName (VIA_E) ,
ViaBody_List viaBody
}
// [20.43 ]
type record Warning {
FieldName fieldName (WARNING_E) ,
WarningValue_List warningValue
}
// [20.44 RFC2616 14.47 RFC2617 1.2 ]
type record WwwAuthenticate {
FieldName fieldName (WWW_AUTHENTICATE_E) ,
Challenge challenge
}
} // end group CommonHeaderFieldTypes
group RFC3262HeaderFieldTypes {
// [3262/7.1 ]
type record RSeq {
FieldName fieldName (RSEQ_E) ,
integer responseNum
}
// [3262/7.2 ]
type record RAck {
FieldName fieldName (RACK_E) ,
integer responseNum,
integer seqNumber,
charstring method
}
} // end group RFC3262HeaderFieldTypes
group RFC3265HeaderFieldTypes {
// [3265/7.2 ]
type record AllowEvents {
FieldName fieldName (ALLOW_EVENTS_E) ,
EventType_List eventTypes
}
type set of EventType EventType_List;
type charstring EventType;
// [3265/7.2 ]
type record Event {
FieldName fieldName (EVENT_E) ,
EventType eventType,
SemicolonParam_List eventParams optional
}
// [3265/7.2 ]
type record SubscriptionState {
FieldName fieldName (SUBSCRIPTION_STATE_E) ,
SubState subState,
SemicolonParam_List substateParams optional
}
type charstring SubState;
} // end group RFC3265HeaderFieldTypes
group RFC3313HeaderFieldTypes {
// [3313/5 ]
type record PMediaAuthorization {
FieldName fieldName (P_MEDIA_AUTHORIZATION_E) ,
PMediaAuthorization_List pMediaAuthorizations
}
type charstring PMediaAuthValue; // HEXDIG "0"-"9", "A"-"F"
type record of PMediaAuthValue PMediaAuthorization_List;
} // end group RFC3265HeaderFieldTypes
group RFC3323HeaderFieldTypes {
// [3323 ]
type record Privacy {
FieldName fieldName (PRIVACY_E) ,
PrivacyValue_List privValueList
}
} // end group RFC3323HeaderFieldTypes
group RFC3325HeaderFieldTypes {
// [3325 ]
type record PAssertedID {
FieldName fieldName (P_ASSERTED_ID_E) ,
PAssertedIDValue_List pAssertedIDValueList
}
// [3325 ]
type record PPreferredID {
FieldName fieldName (P_PREFERRED_ID_E) ,
PPreferredIDValue_List pPreferredIDValueList
}
// draft-drage-sipping-service-identification-01 (July 2007)
type record PPreferredService {
FieldName fieldName (P_PREFERRED_SERVICE_E) ,
charstring serviceId
}
} // end group RFC3325HeaderFieldTypes
group RFC3326HeaderFieldTypes {
// [3326 ]
type record of ReasonValue ReasonValues;
type record ReasonValue {
charstring token,
SemicolonParam_List reasonParams optional
}
type record Reason {
FieldName fieldName (REASON_E) ,
ReasonValues reasonValues
}
} // end group RFC3326HeaderFieldTypes
group RFC3327HeaderFieldTypes {
// [3327 ]
type record Path {
FieldName fieldName (PATH_E) ,
PathValues pathValues
}
type record of PathValue PathValues;
type record PathValue {
NameAddr nameAddr,
SemicolonParam_List rrParam optional
}
} // end group RFC3515HeaderFieldTypes
group RFC4488HeaderFieldTypes {
// [4488 ]
type record ReferSub {
FieldName fieldName (REFER_SUB_E) ,
boolean referSubValue,
SemicolonParam_List referSubParams optional
}
} // end group RFC4488HeaderFieldTypes
group RFC3329HeaderFieldTypes {
// [RFC3329/2.2 ]
type record SecurityMechanism {
charstring mechName,
SemicolonParam_List mechParams optional
}
type set of SecurityMechanism SecurityMechanism_List;
type record SecurityClient {
FieldName fieldName (SECURITY_CLIENT_E) ,
SecurityMechanism_List securityMech
}
type record SecurityServer {
FieldName fieldName (SECURITY_SERVER_E) ,
SecurityMechanism_List securityMech
}
type record SecurityVerify {
FieldName fieldName (SECURITY_VERIFY_E) ,
SecurityMechanism_List securityMech
}
} // end group RFC3329HeaderFieldTypes
group RFC3455HeaderFieldTypes {
type record of NameAddrParam NameAddrParam_List;
type record NameAddrParam {
NameAddr nameAddr,
SemicolonParam_List genericParams optional
}
// [3455/5.1 ]
type record PAssociatedURI {
FieldName fieldName (P_ASSOCIATED_URI_E) ,
NameAddrParam_List nameAddrList
}
// [3455/5.2 ]
type record PCalledPartyID {
FieldName fieldName (P_CALLED_PARTY_E) ,
NameAddrParam nameAddParams
}
type record of VnetworkSpec VnetworkSpec_List;
type record VnetworkSpec {
charstring vNetworkSpecToken,
SemicolonParam_List genericParams optional
}
// [3455/5.3 ]
type record PVisitedNetworkID {
FieldName fieldName (P_VISITED_NETWORK_E) ,
VnetworkSpec_List vNetWorkSpec
}
// [3455/5.4 ]
type record PAccessNetworkInfo {
FieldName fieldName (P_ACCESS_NETWORK_INFO_E) ,
charstring accessType,
SemicolonParam_List genericParams optional
}
// [3455/5.5 ]
type record PChargingFunctionAddresses {
FieldName fieldName (P_CHARGING_FUNCTION_ADDRESSES_E) ,
SemicolonParam_List chargeAddrParams optional
}
// [3455/5.6 ]
type record PChargingVector {
FieldName fieldName (P_CHARGING_VECTOR_E) ,
charstring icidValue,
SemicolonParam_List chargeParams optional
}
} // end group RFC33455HeaderFieldTypes
group RFC3515HeaderFieldTypes {
// [3515 ]
type record ReferTo {
FieldName fieldName (REFER_TO_E) ,
NameAddr nameAddr,
SemicolonParam_List referToParams optional
}
} // end group RFC3515HeaderFieldTypes
group RFC3608HeaderFieldTypes {
// [3608 ]
type record ServiceRoute {
FieldName fieldName (SERVICE_ROUTE_E) ,
RouteBody_List routeBody
}
} // end group RFC33608HeaderFieldTypes
group RFC3841HeaderFieldTypes {
// [3841 ]
type record AcceptContact {
FieldName fieldName (ACCEPT_CONTACT_E) ,
AcRcValue_List acValues
}
type set of AcRcValue AcRcValue_List;
type record AcRcValue {
charstring wildcard (c_WILDCARD) ,
SemicolonParam_List acRcParams optional
}
// [RFC 3841 ]
type charstring Directive;
type set of Directive Directive_List;
type record RequestDisposition {
FieldName fieldName (REQUEST_DISPOSITION_E) ,
Directive_List directives
}
} // end group RFC3841HeaderFieldTypes
group RFC3891HeaderFieldTypes {
// [3891 ]
type record Replaces {
FieldName fieldName (REPLACES_E) ,
CallidString callid,
SemicolonParam_List replacesParams optional
}
} // end group RFC3891HeaderFieldTypes
group RFC3892HeaderFieldTypes {
// [3892 ]
type record ReferredBy {
FieldName fieldName (REFERRED_BY_E) ,
NameAddr nameAddr,
SemicolonParam_List referredbyIdParams optional
}
} // end group RFC3892HeaderFieldTypes
group RFC4028HeaderFieldTypes {
// [4028 ]
type record MinSE {
FieldName fieldName (MIN_SE_E) ,
DeltaSec deltaSec,
SemicolonParam_List minSeParam optional
}
// [4028 ]
type record SessionExpires {
FieldName fieldName (SESSION_EXPIRES_E) ,
DeltaSec deltaSec,
SemicolonParam_List seParam optional
}
} // end group RFC4028HeaderFieldTypes
group RFC4244HeaderFieldTypes {
// [4244 ]
type record HistoryInfo {
FieldName fieldName (HISTORY_INFO_E) ,
HistoryInfo_List historyInfoList
}
type record of HistoryInfoEntry HistoryInfo_List;
type record of integer IntegerList;
type record HistoryInfoEntry {
NameAddr nameAddr,
IntegerList hiIndex optional,
SemicolonParam_List hiExtention optional
}
type record of charstring StringList;
} // end group RFC4244HeaderFieldTypes
group RFC5009PEarlyMediaHeader {
// [5009 ]
type record PEarlyMedia {
FieldName fieldName (P_EARLY_MEDIA_E) ,
EM_Param_List em_param
}
type charstring EM_Param;
type set of EM_Param EM_Param_List;
} // end group RFC5009PEarlyMediaHeader
// http://tools.ietf.org/html/draft-johnston-sipping-cc-uui-07, expires 16.Aug.2009
// Transporting User to User Call Control Information in SIP for ISDN Interworking
// type definition of SIP header mechanism
group UserToUser_PreliminaryRFCDraft {
type record UserToUser {
FieldName fieldName (USER_TO_USER_E) ,
charstring uuiData length(256),
/*length limitation due to ISDN, max of allowed 128 hex digits are represented by 256 characters*/
GenericParam uuiParam
}
} // end group UserToUser_PreliminaryRFCDraft
type record PAssertedService {
FieldName fieldName (P_ASSERTED_SERVICE_E) ,
PAssertedServiceValue pAssertedServiceValue
}
group RFC6442GeolocationConveyance {
// [6442 ]
type record Geolocation {
// RFC6442 clause 4.1
FieldName fieldName (GEOLOCATION_E) ,
SipUrl addrSpec,
SemicolonParam_List geolocParam optional
}
type enumerated GeolocationRoutingState {
GEOLOCATION_ROUTING_YES_E, GEOLOCATION_ROUTING_NO_E, GEOLOCATION_ROUTING_OTHER_E
}
type record GeolocationRouting {
// RFC6442 clause 4.2
FieldName fieldName (GEOLOCATION_ROUTING_E) ,
GeolocationRoutingState state,
GenericParam genericValue optional
}
} // end group RFC6442GeolocationConveyance
type charstring SessIdString length(32);
type record SessionId {
FieldName fieldName (SESSION_ID_E) ,
SessIdString sessid,
GenericParam sessidParam optional
}
type charstring EntityTag;
type record SIP_ETag {
FieldName fieldName (SIP_ETAG_E) ,
EntityTag entityTag
}
type record SIP_If_Match {
FieldName fieldName (SIP_IF_MATCH_E) ,
EntityTag entityTag
}
// RFC4412
type record ResourcePriority {
FieldName fieldName (RESOURCE_PRIORITY_E) ,
ResourcePriority_List resourcePriorityList
}
type set of R_Value ResourcePriority_List;
type record R_Value {
charstring namespace,
charstring rPriority
}
// RFC5373
type record AnswerMode {
FieldName fieldName (ANSWER_MODE_E),
AnswerMode_Value answerMode_Value,
SemicolonParam_List answerModeParams optional
}
type record PrivAnswerMode {
FieldName fieldName (PRIV_ANSWER_MODE_E),
AnswerMode_Value answerMode_Value,
SemicolonParam_List answerModeParams optional
}
type charstring AnswerMode_Value;
// RFC4538
type record TargetDialog {
FieldName fieldName (TARGET_DIALOG_E),
CallidString callid,
TdParam tdParam optional
}
type record TdParam {
charstring remoteParam optional,
charstring localParam optional,
SemicolonParam_List genericParams optional
}
// RFC4964
type record PAnswerState {
FieldName fieldName (P_ANSWER_STATE_E),
charstring answerType,
SemicolonParam_List genericParams optional
}
} // end group HeaderFieldTypes
group MessageHeaderTypes {
// Message-Header for all SIP requests and responses [20 ]
type set MessageHeader {
Accept accept optional,
AcceptContact acceptContact optional,
AcceptEncoding acceptEncoding optional,
AcceptLanguage acceptLanguage optional,
AlertInfo alertInfo optional,
Allow allow optional,
AllowEvents allowEvents optional,
// 3265/7.2
AuthenticationInfo authenticationInfo optional,
// only in responses
Authorization authorization optional,
// only in requests
CallId callId optional,
// optional only in Invalid test cases mandatory otherwise
CallInfo callInfo optional,
Contact contact optional,
// optional in response and all requests except INVITE where mandatory
ContentDisposition contentDisposition optional,
ContentEncoding contentEncoding optional,
ContentLanguage contentLanguage optional,
ContentLength contentLength optional,
// optional in responses and all requests except ACK where mandatory
ContentType contentType optional,
CSeq cSeq optional,
// optional only in Invalid test cases mandatory otherwise
Date date optional,
ErrorInfo errorInfo optional,
// only in responses
Event event optional,
// 3265/7.2
Expires expires optional,
FeatureCaps featureCaps optional, // 6809
From fromField,
Geolocation geolocation optional,
// 6442
GeolocationRouting geolocationRouting optional,
// 6442
HistoryInfo historyInfo optional,
// 4244
InfoPackage infoPackage optional,
// 6086
InReplyTo inReplyTo optional,
// only in requests
MaxForwards maxForwards optional,
// mandatory in requests not required in responses!
MimeVersion mimeVersion optional,
MinExpires minExpires optional,
// only in responses
MinSE minSE optional,
// 4028
Organization organization optional,
PAccessNetworkInfo pAccessNetworkInfo optional,
// 3455
PAssertedID pAssertedID optional,
// 3325
PAssertedService pAssertedService optional,
PAssociatedURI pAssociatedURI optional,
// 3455
Path path optional,
// 3327
PCalledPartyID pCalledPartyID optional,
// 3455
PChargingFunctionAddresses pChargingFunctionAddresses optional,
// 3455
PChargingVector pChargingVector optional,
// 3455
PEarlyMedia pEarlyMedia optional,
// 5009
PMediaAuthorization pMediaAuthorization optional,
// 3313
PPreferredID pPreferredID optional,
// 3325
PPreferredService pPreferredService optional,
// draft-drage-sipping-service-identification-01 (July 2007)
Priority priority optional,
// only in requests
Privacy privacy optional,
// 3323
ProxyAuthenticate proxyAuthenticate optional,
// only in responses
ProxyAuthorization proxyAuthorization optional,
// only in requests
ProxyRequire proxyRequire optional,
// only in requests
PVisitedNetworkID pVisitedNetworkID optional,
// 3455
RAck rAck optional,
// 3262/7.1
RSeq rSeq optional,
// 3262/7.1
Reason reason optional,
// 3326
RecordRoute recordRoute optional,
RecvInfo recvInfo optional,
// 6086
RequestDisposition requestDisposition optional,
// 3841
ReferredBy referredBy optional,
// 3892 - REFER method
ReferTo referTo optional,
// 3515 - REFER method
ReferSub referSub optional,
// 4488 - REFER method
Replaces replaces optional,
// 3891
ReplyTo replyTo optional,
// optional in responses and INVITE requests
Require require optional,
RetryAfter retryAfter optional,
// only in responses
Route route optional,
// only in requests
SecurityClient securityClient optional,
// 3329
SecurityServer securityServer optional,
// 3329
SecurityVerify securityVerify optional,
// 3329
Server server optional,
// only in responses
ServiceRoute serviceRoute optional,
// 3608
SessionExpires sessionExpires optional,
// 4028
SessionId sessionId optional,
SIP_ETag sipETag optional,
SIP_If_Match sipIfMatch optional,
Subject subject optional,
// only in requests
SubscriptionState subscriptionState optional,
// 3265/7.2
Supported supported optional,
Timestamp timestamp_ optional,
To toField,
Unsupported unsupported optional,
// only in responses
UserToUser userToUser optional,
UserAgent userAgent optional,
Via via,
Warning warning optional,
WwwAuthenticate wwwAuthenticate optional,
ResourcePriority resourcePriority optional,
// RFC4412
AnswerMode answerMode optional,
// RFC5373
PrivAnswerMode privAnswerMode optional,
// RFC5373
TargetDialog targetDialog optional,
// RFC4538
PAnswerState pAnswerState optional,
// RFC4964
// only in responses
UndefinedHeader_List undefinedHeader_List optional
}
} // end group MessageHeaderTypes
group StartLineTypes {
// Request-Line [7.1 ]
type record RequestLine {
Method method,
SipUrl requestUri,
charstring sipVersion
}
// Status-Line [7.2 ]
type record StatusLine {
charstring sipVersion,
integer statusCode,
charstring reasonPhrase
}
} // end group StartLineTypes
group otherTypes {
type record SipUserProfile {
/**
* @desc integer for the userprofile identifier
*/
integer id,
/**
* @desc integer for Port number to exchange SIP messages
*/
integer currPort,
/**
* @desc charstring for IP address to exchange SIP messages
*/
charstring currIpaddr,
/**
* @desc integer for Port number to exchange SIP messages
*/
integer contactPort,
/**
* @desc charstring for IP address to exchange SIP messages
*/
charstring contactIpaddr,
/**
* @desc charstring for IP address used by the TS to exchange media streams
*/
charstring bearerIpaddr,
/**
* @desc charstring for identity of the tester local domain
*/
charstring homeDomain,
/**
* @desc charstring for identity of the tester local user
*/
charstring publUsername,
/**
* @desc charstring for RFC 2617 3.2.1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection.
*/
charstring qop,
/**
* @desc charstring for RFC 2617 3.2.2 username for authentication The name of user in the specified realm
*/
charstring privUsername,
/**
* @desc charstring for RFC 2617 3.2.2.2 passwd: A known shared secret, the password of user of the specified username
*/
charstring passwd,
/**
* @desc charstring for registrar domain for authentication and request line
*/
charstring registrarDomain
}
} // end group otherTypes
} // end group Subtypes
group MSGtypes {
group RequestTypes {
// [7.1 ]
/**
* @desc generic type of a SIP request message
* @member statusLine contains a method name, a Request-URI, and the protocol version
* @member msgHeader include all possible header fields that are allowed to be present according to RFCs and other standards
* @member messageBody depends on the request method, includes e.g. SDP message.
* @member payload contains the whole message as it has been received in its text format
*/
type record Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// Note: the introduction of the following specific types is to enable better means for logging
// on the other side the generic type is useful for functions dealing with multiple SIP message types
type record REGISTER_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record INVITE_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record OPTIONS_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record BYE_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record CANCEL_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record ACK_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// [3262/7.1 ]
type record PRACK_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// [3265/7.1 ]
type record NOTIFY_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// [3265/7.1 ]
type record SUBSCRIBE_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// [3903/11.1 ]
type record PUBLISH_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
// [3311/7 ]
type record UPDATE_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record REFER_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record MESSAGE_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type record INFO_Request {
RequestLine requestLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
type union RequestUnion {
REGISTER_Request Register,
INVITE_Request Invite,
OPTIONS_Request Options,
BYE_Request Bye,
CANCEL_Request Cancel,
ACK_Request Ack,
PRACK_Request Prack,
NOTIFY_Request Notify,
SUBSCRIBE_Request Subscribe,
PUBLISH_Request Publish,
UPDATE_Request Update,
REFER_Request Refer,
MESSAGE_Request Message,
INFO_Request Info// [2976 ]
}
} // end group RequestTypes
group ResponseTypes {
// [7.2 ]
/**
* @desc generic type of a SIP response message
* @member statusLine consists of the protocol version followed by a numeric Status-Code and its associated textual phrase
* @member msgHeader include all possible header fields that are allowed to be present according to RFCs and other standards
* @member messageBody depends on the response method, includes e.g. SDP message.
* @member payload contains the whole message as it has been received in its text format
*/
type record Response {
StatusLine statusLine,
MessageHeader msgHeader,
MessageBody messageBody optional,
Payload payload optional
}
} // end group ResponseTypes
// This MSG type is defined for sending synctactic variations, ans syntactically
// erroneous messages, and receving messages failed parsing.
group SyntacticTypes {
type charstring Raw;
} // end group SyntacticTypes
// This type is defined for particular SIP message body types like SDP
} // end group MSGTypes
} // end group Types
}
with {
encode "SIPCodec"; variant "";
} // end module LibSip_SIPTypesAndValues
/**
* @author STF 435, 471
* @version $Id$
* @desc This module provides the functions used by the test component
* for SIP-SMS over IMS as specified in 3GPP 24-341 tests.
* This module is part of LibSipV3.
*/
module LibSip_SMSFunctions {
import from LibSip_SMSTypesAndValues all;
function f_IA5_2oct(
charstring p_ASCII_String
) return octetstring {
var integer i;
var integer j;
var integer v_Length := lengthof(p_ASCII_String);
var integer v_Temp;
var octetstring v_Noctets := ''O;
var bitstring v_TempBitSrc := ''B;
var bitstring v_TempBitDes := ''B;
if ((v_Length <= 0) or (v_Length > 160) or (((v_Length * 7) mod 8) != 0)) {
log("*** " & __SCOPE__ & "INFO: Invalid value of input string length ***");
}
for (i := 0; i < v_Length; i := i + 1) {
v_Temp := char2int(p_ASCII_String[i]);
v_TempBitSrc := int2bit(v_Temp, 8);
for (j := 1; j <= 7; j := j + 1) {
v_TempBitDes := v_TempBitSrc[8 - j] & v_TempBitDes;
if (((7 * i + j) mod 8) == 0) {
v_Noctets := v_Noctets & bit2oct(v_TempBitDes);
v_TempBitDes := ''B;
}
}
}
return v_Noctets;
} // f_IA5_2oct
external function fx_GetSC_TimeStamp(
integer p_TimeZone
) return TP_ServiceCentreTimeStamp_Type;
} // End of module LibSip_SMSFunctions
\ No newline at end of file
/**
* @author STF 435, STF 471
* @version $Id$
* @desc This module provides the types used by the test component
* for SIP-SMS over IMS as specified in 3GPP 24-341 tests.
* This module is part of LibSipV3.
*/
module LibSip_SMSTemplates {
import from LibCommon_DataStrings all;
import from LibSip_SMSTypesAndValues all;
import from LibSip_SMSFunctions all;
group SMS_Templates_Group {
/* Non-SMS Type Constraints */
template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlanAny := {
extBit := ?,
typeOfNumber := ?,
numberingPlanId := ?
}
template(value) TypeOfNumberingPlan m_TypeOfNumberingPlan := {
extBit := '1'B,
typeOfNumber := '001'B, // international number
numberingPlanId :=
'0001'B // ISDN/telephony numbering plan (Rec. E.164/E.163)
}
template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlan := mw_TypeOfNumberingPlanAny;
/* End Non-SMS Type Constraints */
template(value) RP_OriginatorAddress_dl m_RP_OriginatorAddress_dl := {
spare := omit,
iei := omit,
iel := '06'O, // 6 semi-octets
typeOfNumberingPlan := m_TypeOfNumberingPlan,
digits := '001122'O
}
template(present) RP_OriginatorAddress_ul mw_RP_OriginatorAddress_ul := {
spare := omit,
iei := omit,
iel := '00'O
}
template(present) RP_DestinationAddress_ul mw_RP_DestinationAddress_ul := {
spare := omit,
iei := omit,
iel := ?,
typeOfNumberingPlan := mw_TypeOfNumberingPlan,
digits := ?
}
template(omit) RP_DestinationAddress_dl m_RP_DestinationAddress_dl := {
spare := omit,
iei := omit,
iel := '00'O
}
template(omit) RP_UserData m_RP_UserData_DELIVER(
octetstring p_Digits
) := {
spare := omit,
iei := omit,
iel := int2oct((153 + lengthof(p_Digits)), 1),
tP_PDU := {SMS_DELIVER := m_SMS_DELIVER(p_Digits)}
}
template(value) RP_UserData m_RP_UserData_SUBMIT_REPORT := {
spare := '0'B,
iei := c_IEI_RP_UserData,
iel := '0A'O, // the TPDU data length is 10 octets
tP_PDU := {SMS_SUBMIT_REPORT := m_SMS_SUBMIT_REPORT}
}
template(value) RP_UserData m_RP_UserData_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RecipientAddress,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
) modifies m_RP_UserData_SUBMIT_REPORT := {
tP_PDU := {SMS_STATUS_REPORT := m_SMS_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)}
}
template(present) RP_UserData mw_RP_UserData_SUBMIT := {
spare := omit,
iei := omit,
iel := ?,
tP_PDU := {SMS_SUBMIT := mw_SMS_SUBMIT_VPF_REF}
}
template(present) RP_UserData mw_RP_UserData_DELIVER_REPORT := {
spare := '0'B,
iei := c_IEI_RP_UserData,
iel := ?,
tP_PDU := {SMS_DELIVER_REPORT := mw_SMS_DELIVER_REPORT}
}
/* End SM-RP Type Constraints */
/* SM-RP PDU Constraints */
template(value) RP_DATA_dl_Type m_RP_DATA_dl_base := {
spare5 := '00000'B,
rP_MessageTypeIndicator := c_MT_RP_DATA_dl,
rP_MessageReference := '00'O,
rP_OriginatorAddress := m_RP_OriginatorAddress_dl,
rP_DestinationAddress := m_RP_DestinationAddress_dl,
rP_UserData := m_RP_UserData_DELIVER('0000'O)
}
template(value) RP_DATA_dl_Type m_RP_DATA_dl_DELIVER(
octetstring p_Digits
) modifies m_RP_DATA_dl_base := {rP_UserData := m_RP_UserData_DELIVER(p_Digits)}
template(value) RP_DATA_dl_Type m_RP_DATA_dl_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RecipientAddress,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
) modifies m_RP_DATA_dl_base := {
rP_UserData := m_RP_UserData_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)
}
template(present) RP_DATA_ul_Type mw_RP_DATA_ul_SUBMIT := {
spare5 := '00000'B,
rP_MessageTypeIndicator := c_MT_RP_DATA_ul,
rP_MessageReference := ?,
rP_OriginatorAddress := mw_RP_OriginatorAddress_ul,
rP_DestinationAddress := mw_RP_DestinationAddress_ul,
rP_UserData := mw_RP_UserData_SUBMIT
}
template(value) RP_ACK_Type m_RP_ACK_SUBMIT_REPORT(
template(value) Oct1 p_msgReference := '00'O
) := {
spare5 := '00000'B,
rP_MessageTypeIndicator := c_MT_RP_ACK_dl,
rP_MessageReference := p_msgReference,
rP_UserData := m_RP_UserData_SUBMIT_REPORT
}
template(present) RP_ACK_Type mw_RP_ACK_DELIVER_REPORT := {
spare5 := '00000'B,
rP_MessageTypeIndicator := c_MT_RP_ACK_ul,
rP_MessageReference := ?,
rP_UserData := mw_RP_UserData_DELIVER_REPORT
}
/* End SM-RP PDU Constraints */
/* SM-TP Type Constraints */
template(value) TP_ProtocolIdentifier_Type mw_TP_ProtocolIdentifier := {
pidType := '01'B,
interworking := '0'B,
pidValue := '00000'B
}
template(value) TP_ProtocolIdentifier_Type m_TP_ProtocolIdentifier := {
pidType := '01'B,
interworking := '0'B,
pidValue := '00000'B
}
template(value) TP_DataCodingScheme_Type m_TP_DataCodingScheme := {
codingGroup := '0000'B,
codeValue := '0000'B
}
template(present) TP_Address_Type mw_TP_AddressAny := {
iel := ?,
typeOfNumberingPlan := mw_TypeOfNumberingPlanAny,
digits := *
}
template(value) TP_Address_Type m_TP_Address(
octetstring p_Digits
) := {
iel := int2oct(2 * lengthof(p_Digits), 1),
// length is number of useful semi-octets
// as p_digits is declared as octetstring the number must be even
typeOfNumberingPlan := m_TypeOfNumberingPlan,
digits := p_Digits
}
template(value) TP_ParameterIndicator_Type m_TP_ParameterIndicator := {
extBit1 := '0'B,
spare4 := '0000'B,
tP_UDL := '0'B,
tP_DCS := '0'B,
tP_PID := '1'B
}
/* End SM-TP Type Constraints */
/* SM-TP PDU Constraints */
template(value) SMS_DELIVER_Type m_SMS_DELIVER(
octetstring p_Digits
) := {
tP_ReplyPath := '0'B,
tP_UserDataHeaderIndicator := '0'B,
tP_StatusReportIndication := '1'B,
spare2 := '00'B,
tP_MoreMessagesToSend := '0'B,
tP_MessageTypeIndicator := c_MT_SMS_DELIVER,
tP_OriginatingAddress := m_TP_Address(p_Digits),
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := m_TP_DataCodingScheme,
tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed
tP_UserDataLength := int2oct(160, 1),
tP_UserData := f_IA5_2oct(c_Fox)
}
template(present) SMS_DELIVER_REPORT_Type mw_SMS_DELIVER_REPORT := {
spare1 := '0'B,
tP_UserDataHeaderIndicator := '0'B,
spare4 := '0000'B,
tP_MessageTypeIndicator := c_MT_SMS_DELIVER_REPORT,
tP_FailureCause := omit,
tP_ParameterIndicator := ?,
tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := *,
tP_UserDataLength := *,
tP_UserData := *
}
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT := {
tP_ReplyPath := '0'B,
tP_UserDataHeaderIndicator := '0'B,
tP_StatusReportRequest := '1'B,
tP_ValidityPeriodFormat := '??'B,
tP_RejectDuplicates := '0'B,
tP_MessageTypeIndicator := c_MT_SMS_SUBMIT,
tP_MessageReference := ?,
tP_DestinationAddress := mw_TP_AddressAny,
tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := ?,
tP_ValidityPeriod := *,
tP_UserDataLength := int2oct(160, 1),
tP_UserData :=
? // any data will do: 140 octets
}
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_NP modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '00'B,
tP_ValidityPeriod := omit
}
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_REF modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '10'B,
tP_ValidityPeriod := ?
}
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ENH modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '01'B,
tP_ValidityPeriod := ?
}
template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ABS modifies mw_SMS_SUBMIT := {
tP_ValidityPeriodFormat := '11'B,
tP_ValidityPeriod := ?
}
template(value) SMS_SUBMIT_REPORT_Type m_SMS_SUBMIT_REPORT := {
spare1 := '0'B,
tP_UserDataHeaderIndicator := '0'B,
spare4 := '0000'B,
tP_MessageTypeIndicator := c_MT_SMS_SUBMIT_REPORT,
tP_FailureCause := omit,
tP_ParameterIndicator := m_TP_ParameterIndicator,
tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := omit,
tP_UserDataLength := omit,
tP_UserData := omit
}
template(value) SMS_STATUS_REPORT_Type m_SMS_STATUS_REPORT(
template(value) TP_MessageReference_Type p_MessageRef,
template(value) TP_Address_Type p_RA,
template(value) TP_ServiceCentreTimeStamp_Type p_SCTP
) := {
// TS 34.229-1 clause A.7.5
spare1 := '0'B,
tP_UserDataHeaderIndicator := '0'B,
tP_StatusReportQualifier := '0'B,
spare2 := '00'B,
tP_MoreMessagesToSend := '0'B,
tP_MessageTypeIndicator := c_MT_SMS_STATUS_REPORT,
tP_MessageReference := p_MessageRef,
tP_RecipientAddress := p_RA,
tP_ServiceCentreTimeStamp := p_SCTP,
tP_DischargeTime := '00000000000000'H,
tP_Status := {
reserved := '0'B,
status := '0000000'B
},
tP_ParameterIndicator := m_TP_ParameterIndicator,
tP_ProtocolIdentifier := m_TP_ProtocolIdentifier,
tP_DataCodingScheme_Type := omit,
tP_UserDataLength := omit,
tP_UserData := omit
}
/* End SM-TP PDU Constraints */
} // group SMS_Templates_Group
} // End of module LibSip_SMSTypesAndValues
\ No newline at end of file
/******************************************************************************
* @author STF 435, STF471
* @version $Id$
* @desc This module contains the type definitions for SMS messages as specified in
* 3GPP 24-011 and 3GPP 23-040 Rel 8 and 9.
* SMS over IMS is specified in 3GPP 24-341.
* This module is part of LibSipV3.
*/
module LibSip_SMSTypesAndValues {
import from LibCommon_DataStrings all;
group SMS_Declarations {
const RP_MessageTypeIndicator_Type c_MT_RP_DATA_ul := '000'B;
/* RP_DATA_ul */
const RP_MessageTypeIndicator_Type c_MT_RP_DATA_dl := '001'B;
/* RP_DATA_dl */
const RP_MessageTypeIndicator_Type c_MT_RP_ACK_ul := '010'B;
/* RP_ACK_ul */
const RP_MessageTypeIndicator_Type c_MT_RP_ACK_dl := '011'B;
/* RP_ACK_dl */
const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_ul := '100'B;
/* RP_ERROR_ul */
const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_dl := '101'B;
/* RP_ERROR_dl */
const RP_MessageTypeIndicator_Type c_MT_RP_SMMA := '110'B;
/* RP_SMMA */
const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER := '00'B;
/* SMS DELIVER */
const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER_REPORT := '00'B;
/* SMS DELIVER REPORT */
const TP_MessageTypeIndicator_Type c_MT_SMS_STATUS_REPORT := '10'B;
/* SMS STATUS REPORT */
const TP_MessageTypeIndicator_Type c_MT_SMS_COMMAND := '10'B;
/* SMS COMMAND */
const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT := '01'B;
/* SMS SUBMIT, SMS SUBMIT REPORT */
const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT_REPORT := '01'B;
/* SMS SUBMIT, SMS SUBMIT REPORT */
const Bit7 c_IEI_RP_UserData := '1000001'B;
/* 24.011 cl. 8.2.5.3 */
const charstring c_Fox := "The quick brown fox jumps over the lazy dog's back. Kaufen Sie Ihrer Frau vier bequeme Pelze. - 0123456789 - THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG'S BACK.";
type record TypeOfNumberingPlan {
/* 24.008 cl. 10.5.4.7, 10.5.4.9, 10.5.4.13 */
Bit1 extBit,
/* Extension Bit */
Bit3 typeOfNumber,
/* Type Of Number */
Bit4 numberingPlanId /* Numbering Plan Identification */
}
/* SM-RP Type Declarations */
type Bit3 RP_MessageTypeIndicator_Type;
/* 24.011 cl. 8.2.2 */
type Oct1 RP_MessageReference_Type;
/* 24.011 cl. 8.2.3 */
type record RP_OriginatorAddress_dl {
/* 24.011 cl. 8.2.5.1 */
Bit1 spare optional,
/* 0 */
Bit7 iei optional,
/* 0101 1110 */
Oct1 iel,
/* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan,
/* */
octetstring digits length(1 .. 10)
}
type record RP_OriginatorAddress_ul {
/* 24.011 cl. 8.2.5.1 */
Bit1 spare optional,
/* 0 */
Bit7 iei optional,
/* 0101 1110 */
Oct1 iel /* 0 */
}
type record RP_DestinationAddress_ul {
/* 24.011 cl. 8.2.5.2 */
Bit1 spare optional,
/* 0 */
Bit7 iei optional,
/* 0101 1110 */
Oct1 iel,
/* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan,
/* */
octetstring digits length(1 .. 10)
}
type record RP_DestinationAddress_dl {
/* 24.011 cl. 8.2.5.2 */
Bit1 spare optional,
/* 0 */
Bit7 iei optional,
/* 0101 1110 */
Oct1 iel /* 0 */
}
type record RP_UserData {
/* 24.011 cl. 8.2.5.3 */
Bit1 spare optional,
/* 0, present in case of TLV; omit in case of LV */
Bit7 iei optional,
/* 1000001, present in case of TLV; omit in case of LV */
Oct1 iel,
/* */
TP_PDU_Type tP_PDU /* <= 232 octets */
}
type record RP_Cause {
/* 24.011 cl. 8.2.5.4 */
Bit1 spare optional,
/* present in case of TLV; omit in case of LV */
Bit7 iei optional,
/* present in case of TLV; omit in case of LV */
Oct1 iel,
/* 2 or 3 */
Bit1 extBit1,
/* 0 */
Bit7 causeValue1,
/* Table 8.4/3GPP TS 24.011 */
Bit1 extBit2,
/* 0 */
Bit7 causeValue2,
/* Table 8.4/3GPP TS 24.011 */
Oct1 diagnostic optional /* Parameters included in the return error from MAP */
}
/* End SM-RP Type Declarations */
/* SM-RP PDU Declarations */
type record RP_DATA_dl_Type {
/* 24.011 cl. 7.3.1.1
Direction: n -> ue */
Bit5 spare5,
/* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator,
/* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference,
/* cl. 8.2.3 M LV 1 */
RP_OriginatorAddress_dl rP_OriginatorAddress,
/* cl. 8.2.5.1 M LV 1-12 octets */
RP_DestinationAddress_dl rP_DestinationAddress,
/* cl. 8.2.5.2 M LV 1 */
RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */
}
type record RP_DATA_ul_Type {
/* 24.011 cl. 7.3.1.2
Direction: ue -> n */
Bit5 spare5,
/* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator,
/* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference,
/* cl. 8.2.3 M LV 1 */
RP_OriginatorAddress_ul rP_OriginatorAddress,
/* cl. 8.2.5.1 M LV 1 */
RP_DestinationAddress_ul rP_DestinationAddress,
/* cl. 8.2.5.2 M LV 1 */
RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */
}
type record RP_SMMA_Type {
/* 24.011 cl. 7.3.2
Direction: ue -> n */
Bit5 spare5,
/* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator,
/* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference /* cl. 8.2.3 M LV 1 */
}
type record RP_ACK_Type {
/* 24.011 cl. 7.3.3
Direction: ue <-> n */
Bit5 spare5,
/* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator,
/* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference,
/* cl. 8.2.3 M LV 1 */
RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */
}
type record RP_ERROR_Type {
/* 24.011 cl. 7.3.4
Direction: ue <-> n */
Bit5 spare5,
/* cl. 8.2.2 M V 5 bits */
RP_MessageTypeIndicator_Type rP_MessageTypeIndicator,
/* cl. 8.2.2 M V 3 bits */
RP_MessageReference_Type rP_MessageReference,
/* cl. 8.2.3 M LV 1 */
RP_Cause rP_Cause,
/* cl. 8.2.5.4 M LV 2-3 */
RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */
}
type union RP_PDU_Type {
RP_DATA_dl_Type RP_DATA_dl,
RP_DATA_ul_Type RP_DATA_ul,
RP_SMMA_Type RP_SMMA,
RP_ACK_Type RP_ACK,
RP_ERROR_Type RP_ERROR
}
/* End SM-RP PDU Declarations */
/* SM-TP Type Declarations */
type record TP_Address_Type {
/* 23.040 cl. 9.1.2.5 */
Oct1 iel,
/* min value 2 and max value is 11 */
TypeOfNumberingPlan typeOfNumberingPlan,
octetstring digits length(0 .. 10) optional
}
type Bit2 TP_MessageTypeIndicator_Type;
/* 23.040 cl. 9.2.3.1 */
type Oct1 TP_MessageReference_Type;
/* 23.040 cl. 9.2.3.6 */
type Oct1 TP_UserDataLength_Type;
/* 23.040 cl. 9.2.3.16 */
type record TP_ProtocolIdentifier_Type {
/* 23.040 cl. 9.2.3.9 */
Bit2 pidType,
/* */
Bit1 interworking,
/* */
Bit5 pidValue /* */
}
type record TP_DataCodingScheme_Type {
/* 23.040 cl. 9.2.3.10 + 23.040 cl. 4 */
Bit4 codingGroup,
/* */
Bit4 codeValue /* */
}
type hexstring TP_ServiceCentreTimeStamp_Type length(14);
/* 23.040 cl. 9.2.3.11 */
type Oct1 TP_ValidityPeriodRelative_Type;
/* 23.040 cl. 9.2.3.12.1 */
type hexstring TP_ValidityPeriodAbsolute_Type length(14);
/* 23.040 cl. 9.2.3.12.2 */
type record TP_ValidityPeriodEnhanced_Type {
/* 23.040 cl. 9.2.3.12.3 */
Bit1 extBit,
/* */
Bit1 singleShot,
/* */
Bit3 spare3,
/* */
Bit3 validityPeriodFormat,
/* */
Oct6 validityPeriod /* */
}
type union TP_ValidityPeriod_Type {
/* 23.040 cl. 9.2.3.3 */
TP_ValidityPeriodRelative_Type TP_ValidityPeriodRelative,
/* Relative format */
TP_ValidityPeriodAbsolute_Type TP_ValidityPeriodAbsolute,
/* Absolute format */
TP_ValidityPeriodEnhanced_Type TP_ValidityPeriodEnhanced /* Enhanced format */
}
type record TP_Status_Type {
/* 23.040 cl. 9.2.3.15 */
Bit1 reserved,
/* */
Bit7 status /* */
}
type Bit8 TP_Command_Type;
/* 23.040 cl. 9.2.3.19 */
type record TP_ParameterIndicator_Type {
/* 23.040 cl. 9.2.3.27 */
Bit1 extBit1,
/* */
Bit4 spare4,
/* */
Bit1 tP_UDL,
/* */
Bit1 tP_DCS,
/* */
Bit1 tP_PID /* */
}
/* End SM-TP Type Declarations */
/* SM-TP PDU Declarations */
type record SMS_DELIVER_Type {
/* 23.040 cl. 9.2.2.1
Direction: n -> ue */
Bit1 tP_ReplyPath,
/* 23.040 cl. 9.2.3.17 */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportIndication,
/* 23.040 cl. 9.2.3.4 */
Bit2 spare2,
/* */
Bit1 tP_MoreMessagesToSend,
/* 23.040 cl. 9.2.3.2 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
TP_Address_Type tP_OriginatingAddress,
/* 23.040 cl. 9.1.2.5 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier,
/* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type,
/* 23.040 cl. 9.2.3.10 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp,
/* 23.040 cl. 9.2.3.11 */
TP_UserDataLength_Type tP_UserDataLength,
/* 23.040 cl. 9.2.3.16, derived from SUBMIT */
octetstring tP_UserData length(0 .. 140) optional /* 23.040 cl. 9.2.3.24, derived from SUBMIT */
}
type record SMS_DELIVER_REPORT_Type {
/* 23.040 cl. 9.2.2.1a
Direction: ue -> n */
Bit1 spare1,
/* */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit4 spare4,
/* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
Oct1 tP_FailureCause optional,
/* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */
TP_ParameterIndicator_Type tP_ParameterIndicator,
/* 23.040 cl. 9.2.3.27 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional,
/* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional,
/* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional,
/* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length(0 .. 159) optional /* 23.040 cl. 9.2.3.24 */
}
type record SMS_SUBMIT_Type {
/* 23.040 cl. 9.2.2.2
Direction: ue -> n */
Bit1 tP_ReplyPath,
/* 23.040 cl. 9.2.3.17 */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportRequest,
/* 23.040 cl. 9.2.3.5 */
Bit2 tP_ValidityPeriodFormat,
/* 23.040 cl. 9.2.3.3 */
Bit1 tP_RejectDuplicates,
/* 23.040 cl. 9.2.3.25 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference,
/* 23.040 cl. 9.2.3.6 */
TP_Address_Type tP_DestinationAddress,
/* 23.040 cl. 9.1.2.5 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier,
/* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type,
/* 23.040 cl. 9.2.3.10 */
// one of the subsequent ValidityPeriod solutions has be removed
TP_ValidityPeriod_Type tP_ValidityPeriod optional,
/* 23.040 cl. 9.2.3.12 */
// TP_ValidityPeriodRelative_Type tP_ValidityPeriodRelative optional, /* 23.040 cl. 9.2.3.12.1 */
// TP_ValidityPeriodAbsolute_Type tP_ValidityPeriodAbsolute optional, /* 23.040 cl. 9.2.3.12.2 */
// TP_ValidityPeriodEnhanced_Type tP_ValidityPeriodEnhanced optional, /* 23.040 cl. 9.2.3.12.3 */
TP_UserDataLength_Type tP_UserDataLength,
/* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length(0 .. 140) optional /* 23.040 cl. 9.2.3.24 */
}
type record SMS_SUBMIT_REPORT_Type {
/* 23.040 cl. 9.2.2.2a
Direction: n -> ue */
Bit1 spare1,
/* */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit4 spare4,
/* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
Oct1 tP_FailureCause optional,
/* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */
TP_ParameterIndicator_Type tP_ParameterIndicator,
/* 23.040 cl. 9.2.3.27 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp,
/* 23.040 cl. 9.2.3.11 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional,
/* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional,
/* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional,
/* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length(0 .. 152) optional /* 23.040 cl. 9.2.3.24 */
}
type record SMS_STATUS_REPORT_Type {
/* 23.040 cl. 9.2.2.3
Direction: n -> ue */
Bit1 spare1,
/* */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatusReportQualifier,
/* 23.040 cl. 9.2.3.26 */
Bit2 spare2,
/* */
Bit1 tP_MoreMessagesToSend,
/* 23.040 cl. 9.2.3.2 */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference,
/* 23.040 cl. 9.2.3.6 */
TP_Address_Type tP_RecipientAddress,
/* 23.040 cl. 9.1.2.5 */
TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp,
/* 23.040 cl. 9.2.3.11 */
TP_ServiceCentreTimeStamp_Type tP_DischargeTime,
/* 23.040 cl. 9.2.3.12 */
TP_Status_Type tP_Status,
/* 23.040 cl. 9.2.3.15 */
TP_ParameterIndicator_Type tP_ParameterIndicator optional,
/* 23.040 cl. 9.2.3.27 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional,
/* 23.040 cl. 9.2.3.9 */
TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional,
/* 23.040 cl. 9.2.3.10 */
TP_UserDataLength_Type tP_UserDataLength optional,
/* 23.040 cl. 9.2.3.16 */
octetstring tP_UserData length(0 .. 143) optional /* 23.040 cl. 9.2.3.24 */
}
type record SMS_COMMAND_Type {
/* 23.040 cl. 9.2.2.4
Direction: ue -> n */
Bit1 spare1,
/* */
Bit1 tP_UserDataHeaderIndicator,
/* 23.040 cl. 9.2.3.23 */
Bit1 tP_StatRptReq,
/* Table 8.4/3GPP TS 24.011 */
Bit3 spare3,
/* */
TP_MessageTypeIndicator_Type tP_MessageTypeIndicator,
/* 23.040 cl. 9.2.3.1 */
TP_MessageReference_Type tP_MessageReference,
/* 23.040 cl. 9.2.3.6 */
TP_ProtocolIdentifier_Type tP_ProtocolIdentifier,
/* 23.040 cl. 9.2.3.9 */
TP_Command_Type tP_CommandType,
/* 23.040 cl. 9.2.3.19 */
TP_MessageReference_Type tP_MessageNumber,
/* 23.040 cl. 9.2.3.18 */
TP_Address_Type tP_DestinationAddress,
/* 23.040 cl. 9.1.2.5 */
TP_UserDataLength_Type tP_CommandDataLength,
/* 23.040 cl. 9.2.3.20 (number of octets) */
octetstring tP_CommandData length(0 .. 156) optional /* 23.040 cl. 9.2.3.21 */
}
type union TP_PDU_Type {
SMS_DELIVER_Type SMS_DELIVER,
SMS_DELIVER_REPORT_Type SMS_DELIVER_REPORT,
SMS_SUBMIT_Type SMS_SUBMIT,
SMS_SUBMIT_REPORT_Type SMS_SUBMIT_REPORT,
SMS_STATUS_REPORT_Type SMS_STATUS_REPORT,
SMS_COMMAND_Type SMS_COMMAND
}
/* End SM-TP PDU Declarations */
}
with {
encode "SMSCodec";
} // group SMS_Declarations
}
with {
encode "SIPCodec"; variant "";
} // End of module LibSip_SMSTypesAndValues
/**
* @author STF 406, 471
* @version $Id: LibSip_SimpleMsgSummaryTypes.ttcn 488 2010-11-08 10:17:19Z pintar $
* @desc This module provides the SMS type system for SIP tests.
* This module is part of LibSipV3.
*/
module LibSip_SimpleMsgSummaryTypes {
// RFC 3842
group SMSConstants {
// IMS ETSI name MWI application
const charstring c_imsEtsiMwiApplication := "application/simple-message-summary";
// msg_status line := "Message-Waiting"
const charstring c_messageWaiting := "Message-Waiting";
// msg_status line := "Message-Account"
const charstring c_messageAccount := "Message-Account";
// msg_summary line := "Voice-Message"
const charstring c_voiceMessage := "Voice-Message";
}
group SMSTypes {
type record SimpleMsgSummary {
// Simple_message_summary
Msg_status_line msg_status_line,
Msg_account msg_account optional,
Msg_summary_line_list msg_summary_line_list optional,
Opt_msg_headers opt_msg_headers optional
}
type record Msg_status_line {
charstring msg_type,
charstring msg_status
}
type record Msg_account {
charstring msg_type_account,
charstring account_URI
}
type set of Msg_summary_line Msg_summary_line_list;
type record Msg_summary_line {
charstring msg_context_class,
charstring msgs,
charstring urgent_msgs optional
}
type set of charstring Opt_msg_headers;
// type integer msgcount length(1); //msgs and urgent_msgs can be dividet into subtypes
}
}
with {
encode "SIPCodec"; variant "";
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* @author STF 346, STF366, STF368, STF369, STF471
* @version $Id$
* @desc
* This module provides the XML type system for SIP tests. The types have been generated automatically, followed by manual modifications: - bitType substituted by OneBitType - twobitType substituted by TwoBitType - addition of pattern for: OneBitType, TwoBitType, ThreeBitType, FourBitType, FourBitType, SixBitType - application of enumerated for: State_type, Endpoint_status_type, Joining_type, Disconnection_type, Media_status_type, Originating_identity_presentation_restriction, Terminating_identity_presentation_restriction - addition of length value: NetworkIdentityType, SixteenbitType - addition of value restriction: CugIndexType - substitution of "content" by "choice": Call_type, Mcid - additional type renaming (upper first letter): AbsService, Anonymous, Busy, Communication_diverted,
* Conference_description_type, Conference_info, Conference_media_type, Conference_medium_type, Conference_state_type, Conference_type, Cug, CugRequestType, Empty_element_type, Endpoint_type, Execution_type, Host_type, Keywords_type, Media, Media_type, No_answer, Not_reachable, Not_registered, Originating_identity_presentation, Presence_status, Presence_status_activity_type, RequestType, ResponseType, Roaming, Rule_deactivated, Sidebars_by_val_type, Simservs, SimservType, Terminating_identity_presentation, Uri_type, Uris_type, User_roles_type, User_languages_type, User_type, Users_type - new group CDIV added by STF369 - new group ACR_CD added by STF38 - new types RegInfo and Pidf_Lo added by STF160.
* This module is part of LibSipV3.
*/
module LibSip_XMLTypes {
import from http_www_w3_org_XML_1998_namespace language "XSD" all
with {
extension "File:../xsd/xml.xsd";
}
import from urn_ietf_params_xml_ns_common_policy language "XSD" all
with {
extension "File:../xsd/common-policy.xsd";
}
import from urn_ietf_params_xml_ns_resource_lists language "XSD" all
with {
extension "File:../xsd/ResourceList.xsd";
}
import from http_uri_etsi_org_ngn_params_xml_simservs_xcap language "XSD" all
with {
extension "File:../xsd/SupplementaryServices.xsd";
}
import from http_uri_etsi_org_ngn_params_xml_simservs_mcid language "XSD" all
with {
extension "File:../xsd/MCID.xsd";
}
import from NoTargetNamespace language "XSD" all
with {
extension "File:../xsd/Ims3gpp.xsd";
}
import from urn_3gpp_ns_cw_1_0 language "XSD" all
with {
extension "File:../xsd/cw.xsd";
}
import from urn_ietf_params_xml_ns_conference_info language "XSD" all
with {
extension "File:../xsd/CONF.xsd";
}
import from http_uri_etsi_org_ngn_params_xml_simservs_pstn language "XSD" all
with {
extension "File:../xsd/PSTN.xsd";
}
import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all
with {
extension "File:../xsd/CDIVN.xsd";
}
import from urn_oma_xml_xdm_common_policy language "XSD" all
with {
extension "File:../xsd/xdm_commonPolicy-v1_0.xsd";
}
// RFC 3680 Registration Info
import from urn_ietf_params_xml_ns_reginfo language "XSD" all
with {
extension "File:../xsd/regInfo.xsd";
}
// RFC 3863 Presence Information Data Format
import from urn_ietf_params_xml_ns_pidf language "XSD" all
with {
extension "File:../xsd/pidf.xsd";
}
// RFC 4119 Presence Information Data Format, Location Object extension
import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all
with {
extension "File:../xsd/geopriv10basic.xsd";
}
// RFC 4119 Presence Information Data Format, Location Object extension
import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all
with {
extension "File:../xsd/pidf_lo.xsd";
}
group XmlTypes {
type union XmlBody {
Mcid mcid,
// if there is XML Mcid
Comm_div_info_type cdivn,
// if there is XML cdivn
Simservs simservs,
// if there is XML simservs (Oip/r, Tip/r, Call Diversion, ICB, OCB ...)
Conference_type conference,
// if there is XML conf
Ims_cw cw,
// if there is XML cw (defined in X_3gpp_ns_cw_1_0.ttcn3view)
Cug cug,
// if there is XML cug (defined in org_etsi_uri__ngn_params_xml_simservs_xcap.ttcn3view)
TIMS3GPP ims3gpp,
// if there is XML IMS 3GPP
PSTN_transit pstnTransit,
// if there is XML PSTN_transit
Resource_lists resourceLists,
// if there is XML Resource List data
Reginfo regInfo,
// if it is a NG 112 event
Presence presence, // if it is a Presence Information Data Format Location Object
// if it is a registration event
Geopriv geopriv // if it is a Presence Information Data Format Location Object
}
}
}
/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
// File: http_uri_etsi_org_ngn_params_xml_comm_div_info.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated: Fri Mar 4 09:23:30 2016
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
// Generated from file(s):
// - CDIVN.xsd
// /* xml version = "1.0" */
// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/comm-div-info" */
////////////////////////////////////////////////////////////////////////////////
// Modification header(s):
//-----------------------------------------------------------------------------
// Modified by:
// Modification date:
// Description:
// Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
module http_uri_etsi_org_ngn_params_xml_comm_div_info {
import from XSD all;
import from http_www_w3_org_XML_1998_namespace all;
/* This import brings in the XML language definition */
/* Communication Diversion Information. This is the top-level XML element */
type Comm_div_info_type Comm_div_info
with {
variant "name as 'comm-div-info'";
variant "element";
};
/* Communication Diversion Information Type. This is the top-level XML element */
type record Comm_div_info_type
{
XSD.AnyURI entity,
Comm_div_subs_info_type comm_div_subs_info optional,
Comm_div_ntfy_info_type comm_div_ntfy_info optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-info-type'";
variant (entity) "attribute";
variant (comm_div_subs_info) "name as 'comm-div-subs-info'";
variant (comm_div_ntfy_info) "name as 'comm-div-ntfy-info'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* -
Communication Diversion Subscription Type.
Used at Subscription time to
select Communication Diversions for notification,
when to notify them and
what to notify. */
type record Comm_div_subs_info_type
{
record of XSD.String attr optional,
Comm_div_selection_criteria_type comm_div_selection_criteria optional,
Comm_div_ntfy_trigger_criteria_type comm_div_ntfy_trigger_criteria optional,
Comm_div_info_selection_criteria_type comm_div_info_selection_criteria optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-subs-info-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (comm_div_selection_criteria) "name as 'comm-div-selection-criteria'";
variant (comm_div_ntfy_trigger_criteria) "name as 'comm-div-ntfy-trigger-criteria'";
variant (comm_div_info_selection_criteria) "name as 'comm-div-info-selection-criteria'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* -
Communication Diversion Notification Information Type
Used while notifying the User about the Communication Diversion */
type record Comm_div_ntfy_info_type
{
record of XSD.String attr optional,
User_info_type originating_user_info optional,
XSD.AnyURI diverting_user_info optional,
XSD.AnyURI diverted_to_user_info optional,
XSD.DateTime diversion_time_info optional,
Diversion_reason_info_type diversion_reason_info optional,
Diversion_rule_info_type diversion_rule_info optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-ntfy-info-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (originating_user_info) "name as 'originating-user-info'";
variant (diverting_user_info) "name as 'diverting-user-info'";
variant (diverted_to_user_info) "name as 'diverted-to-user-info'";
variant (diversion_time_info) "name as 'diversion-time-info'";
variant (diversion_reason_info) "name as 'diversion-reason-info'";
variant (diversion_rule_info) "name as 'diversion-rule-info'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* COMMUNICATION DIVERSION SELECTION CRITERIA */
type record Comm_div_selection_criteria_type
{
record of XSD.String attr optional,
User_selection_criteria_type originating_user_selection_criteria optional,
XSD.AnyURI diverting_user_selection_criteria optional,
XSD.AnyURI diverted_to_user_selection_criteria optional,
Time_range_selection_criteria_type diversion_time_selection_criteria optional,
Diversion_reason_selection_criteria_type diversion_reason_selection_criteria optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (originating_user_selection_criteria) "name as 'originating-user-selection-criteria'";
variant (diverting_user_selection_criteria) "name as 'diverting-user-selection-criteria'";
variant (diverted_to_user_selection_criteria) "name as 'diverted-to-user-selection-criteria'";
variant (diversion_time_selection_criteria) "name as 'diversion-time-selection-criteria'";
variant (diversion_reason_selection_criteria) "name as 'diversion-reason-selection-criteria'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* COMMUNICATION DIVERSION NOTIFICATION TRIGGER CRITERIA */
type record Comm_div_ntfy_trigger_criteria_type
{
record of XSD.String attr optional,
Time_range_selection_criteria_type notification_time_selection_criteria optional,
Presence_status_selection_criteria_type presence_status_selection_criteria optional,
XSD.Integer notification_buffer_interval (-infinity .. 86400) optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-ntfy-trigger-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (notification_time_selection_criteria) "name as 'notification-time-selection-criteria'";
variant (presence_status_selection_criteria) "name as 'presence-status-selection-criteria'";
variant (notification_buffer_interval) "name as 'notification-buffer-interval'";
variant (notification_buffer_interval) "defaultForEmpty as '86400'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* COMMUNICATION DIVERSION INFORMATION SELECTION CRITERIA */
type record Comm_div_info_selection_criteria_type
{
record of XSD.String attr optional,
XSD.Boolean disable_originating_user_info optional,
XSD.Boolean disable_diverting_user_info optional,
XSD.Boolean disable_diverted_to_user_info optional,
XSD.Boolean disable_diversion_time_info optional,
XSD.Boolean disable_diversion_reason_info optional,
XSD.Boolean disable_diversion_rule_info optional,
record of XSD.String elem_list
}
with {
variant "name as 'comm-div-info-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (disable_originating_user_info) "name as 'disable-originating-user-info'";
variant (disable_originating_user_info) "defaultForEmpty as 'false'";
//variant (disable_originating_user_info) "text 'true' as '1'";
//variant (disable_originating_user_info) "text 'false' as '0'";
variant (disable_diverting_user_info) "name as 'disable-diverting-user-info'";
variant (disable_diverting_user_info) "defaultForEmpty as 'false'";
//variant (disable_diverting_user_info) "text 'true' as '1'";
//variant (disable_diverting_user_info) "text 'false' as '0'";
variant (disable_diverted_to_user_info) "name as 'disable-diverted-to-user-info'";
variant (disable_diverted_to_user_info) "defaultForEmpty as 'false'";
//variant (disable_diverted_to_user_info) "text 'true' as '1'";
//variant (disable_diverted_to_user_info) "text 'false' as '0'";
variant (disable_diversion_time_info) "name as 'disable-diversion-time-info'";
variant (disable_diversion_time_info) "defaultForEmpty as 'false'";
//variant (disable_diversion_time_info) "text 'true' as '1'";
//variant (disable_diversion_time_info) "text 'false' as '0'";
variant (disable_diversion_reason_info) "name as 'disable-diversion-reason-info'";
variant (disable_diversion_reason_info) "defaultForEmpty as 'false'";
//variant (disable_diversion_reason_info) "text 'true' as '1'";
//variant (disable_diversion_reason_info) "text 'false' as '0'";
variant (disable_diversion_rule_info) "name as 'disable-diversion-rule-info'";
variant (disable_diversion_rule_info) "defaultForEmpty as 'false'";
//variant (disable_diversion_rule_info) "text 'true' as '1'";
//variant (disable_diversion_rule_info) "text 'false' as '0'";
variant (elem_list) "untagged";
variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
};
/* User Info Type */
type record User_info_type
{
record of XSD.String attr optional,
XSD.String user_name optional,
XSD.AnyURI user_URI
}
with {
variant "name as 'user-info-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (user_name) "name as 'user-name'";
variant (user_URI) "name as 'user-URI'";
};
/* DIVERSION REASON INFO */
type record of Diversion_reason_info_type Diversion_reason_info_types
with {
variant "name as 'diversion-reason-info-types'";
variant "list";
};
type enumerated Diversion_reason_info_type
{
int302(302),
int404(404),
int408(408),
int480(480),
int486(486),
int487(487),
int503(503)
}
with {
variant "useNumber";
variant "name as 'diversion-reason-info-type'";
};
/* DIVERSION RULE INFO */
type record Diversion_rule_info_type
{
record of XSD.String attr optional,
XSD.String diversion_rule
}
with {
variant "name as 'diversion-rule-info-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (diversion_rule) "name as 'diversion-rule'";
};
/* ORIGINATING USER SELECTION CRITERIA */
type record User_selection_criteria_type
{
record of XSD.String attr optional,
record of User_info_type user_info_list
}
with {
variant "name as 'user-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (user_info_list) "untagged";
variant (user_info_list[-]) "name as 'user-info'";
};
/* DIVERSION REASON SELECTION CRITERIA */
type record Diversion_reason_selection_criteria_type
{
record of XSD.String attr optional,
Diversion_reason_info_types diversion_reason_info
}
with {
variant "name as 'diversion-reason-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (diversion_reason_info) "name as 'diversion-reason-info'";
};
/* TIME RANGE SELECTION CRITERIA */
type record Time_range_selection_criteria_type
{
record of XSD.String attr optional,
record of Time_range_type time_range_list
}
with {
variant "name as 'time-range-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (time_range_list) "untagged";
variant (time_range_list[-]) "name as 'time-range'";
};
/* TIME RANGE INFO */
type record Time_range_type
{
record of XSD.String attr optional,
XSD.DateTime start_time,
XSD.DateTime end_time
}
with {
variant "name as 'time-range-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (start_time) "name as 'start-time'";
variant (end_time) "name as 'end-time'";
};
/* PRESENCE STATUS SELECTION CRITERIA */
type record Presence_status_selection_criteria_type
{
record of XSD.String attr optional,
record of Presence_status_info_type presence_status_info_list
}
with {
variant "name as 'presence-status-selection-criteria-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (presence_status_info_list) "untagged";
variant (presence_status_info_list[-]) "name as 'presence-status-info'";
};
/* PRESENCE STATUS INFo */
type record Presence_status_info_type
{
record of XSD.String attr optional,
XSD.String presence_status
}
with {
variant "name as 'presence-status-info-type'";
variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'";
variant (presence_status) "name as 'presence-status'";
};
}
with {
encode "XML";
variant "namespace as 'http://uri.etsi.org/ngn/params/xml/comm-div-info' prefix 'tns'";
variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
variant "elementFormQualified";
}
/*******************************************************************************
* Copyright (c) 2000-2016 Ericsson Telecom AB
*
* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
//
// File: http_uri_etsi_org_ngn_params_xml_simservs_mcid.ttcn
// Description:
// References:
// Rev:
// Prodnr:
// Updated: Fri Mar 4 09:23:30 2016
// Contact: http://ttcn.ericsson.se
//
////////////////////////////////////////////////////////////////////////////////
// Generated from file(s):
// - MCID.xsd
// /* xml version = "1.0" */
// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/mcid" */
////////////////////////////////////////////////////////////////////////////////
// Modification header(s):
//-----------------------------------------------------------------------------
// Modified by:
// Modification date:
// Description:
// Modification contact:
//------------------------------------------------------------------------------
////////////////////////////////////////////////////////////////////////////////
module http_uri_etsi_org_ngn_params_xml_simservs_mcid {
import from XSD all;
/* XML Schema Definition to the mcid request-response to the Malicious Communication */
/* Identification simulation service */
/* Definition of simple types */
type XSD.String BitType (pattern "[0-1]")
with {
variant "name as uncapitalized";
};
/* Definition of complex types */
type record RequestType
{
BitType mcidRequestIndicator,
BitType holdingIndicator
}
with {
variant "name as uncapitalized";
variant (mcidRequestIndicator) "name as capitalized";
variant (holdingIndicator) "name as capitalized";
};
type record ResponseType
{
BitType mcidResponseIndicator,
BitType holdingProvidedIndicator
}
with {
variant "name as uncapitalized";
variant (mcidResponseIndicator) "name as capitalized";
variant (holdingProvidedIndicator) "name as capitalized";
};
/* Definition of document structure */
type record Mcid
{
union {
RequestType request,
ResponseType response
} choice
}
with {
variant "name as uncapitalized";
variant "element";
variant (choice) "untagged";
};
}
with {
encode "XML";
variant "namespace as 'http://uri.etsi.org/ngn/params/xml/simservs/mcid'";
variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'";
variant "elementFormQualified";
}