Loading MWI/MWI_TC_Functions.ttcn +72 −312 Original line number Diff line number Diff line Loading @@ -2,15 +2,17 @@ module MWI_TC_Functions { import from LibIms_Templates all; import from LibIms_SIPTypesAndValues {const c_userProfile_UE1atSUThome, c_userProfile_AS1;} import from LibIms_Steps {function f_IMS_postamble_awaitDeRegistration, f_initSipUrl;} import from LibIms_Steps {function f_IMS_postamble_awaitDeRegistration, f_initSipUrl, f_initFromHeader;} import from LibCommon_Sync all; import from LibSip_Templates all; import from LibSip_Steps language "TTCN-3:2005" all; import from IMS_SS_Functions all; import from LibSip_SIPTypesAndValues language "TTCN-3:2005" all; import from LibSip_SMSTypes all; import from LibIms_Interface {type ImsComponent;} import from LibIms_PIXITS all; import from LibSip_PIXITS {modulepar PX_SIP_TWAIT;} import from MWI_Templates all; modulepar { /** @desc charstring, for the public service identity of the Message Account (MA) Loading @@ -24,291 +26,6 @@ module MWI_TC_Functions { float PX_Timeout_Subscription := 12.0; } // IMS ETSI name MWI application const charstring c_imsEtsiMwiApplication := "application/simple-message-summary"; group SMSTypes{//TODO group shall be moved into LibSIPTypesAndValues or into new module LibSip_SMSTypes //TODO add (SMS sms) into type union MessageBody{ in module LibSIPTypesAndValues type record SMS { //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, SipUrl 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 } group Templates { group Templates_SMS { // //TODO shall be moved into LibSip_Templates // template MessageBody m_mBody_SMS(template SMS p_SMS):= // { // sms := p_SMS // }; // // //TODO shall be moved into LibSip_Templates // template MessageBody mw_mBody_SMS(template SMS p_SMS):= // { // sms := p_SMS // }; template SMS m_SMS(template Msg_summary_line_list p_summaryLineList) := { msg_status_line := m_msgStatusLine_yes, msg_account := m_msgAccount, msg_summary_line_list :=p_summaryLineList, opt_msg_headers := omit } template SMS mw_SMS := { msg_status_line := ?, msg_account := *, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yes := { msg_status_line := mw_msgStatusLine_yes, msg_account := *, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yesUri := { msg_status_line := mw_msgStatusLine_yes, msg_account := mw_msgAccount, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yesVoice := { msg_status_line := mw_msgStatusLine_yes, msg_account := *, msg_summary_line_list := {mw_msgSummaryLine("voice-message")}, opt_msg_headers := * } template SMS mw_SMS_yesUriVoice := { msg_status_line := mw_msgStatusLine_yes, msg_account := mw_msgAccount, msg_summary_line_list := {mw_msgSummaryLine("voice-message")}, opt_msg_headers := * } template Msg_status_line m_msgStatusLine_yes:= { msg_type := "Message-Waiting", msg_status := "yes" } template Msg_status_line mw_msgStatusLine_yes:= { msg_type := "Message-Waiting", msg_status := "yes" } template Msg_account m_msgAccount := { msg_type_account := "Message-Account", account_URI := m_SipUrl_NumberHostParam(PX_IMS_SUT_UE2_PUBLIC_USER,PX_IMS_SUT_UE2_HOME_DOMAIN,omit) } template Msg_account mw_msgAccount := { msg_type_account := "Message-Account", account_URI := ? } template Msg_summary_line m_msgSummaryLine(template charstring p_msgContexClass,template charstring p_msgs,template charstring p_urgent_msgs) := { msg_context_class := p_msgContexClass, msgs := p_msgs, urgent_msgs := p_urgent_msgs } template Msg_summary_line mw_msgSummaryLine(template charstring p_msgContexClass) := { msg_context_class := p_msgContexClass, msgs := ?, urgent_msgs :=* } } //end group Templates_SMS template Event m_Event_mwi := { fieldName := EVENT_E, eventType := "message-summary", eventParams := omit }; template Event mw_Event_mwi := { fieldName := EVENT_E, eventType := "message-summary", eventParams := * }; template Accept m_Accept_mwi := { fieldName := ACCEPT_E, acceptArgs := {{mediaRange := "application/simple-message-summary", acceptParam := omit}} }; template Accept mw_Accept_mwi := { fieldName := ACCEPT_E, acceptArgs := {{mediaRange := "application/simple-message-summary", acceptParam := *}} }; template SubscriptionState mw_SubscriptionState_active := { fieldName := SUBSCRIPTION_STATE_E, subState := "active", substateParams := {{id:="expires",paramValue:=?}} } template SubscriptionState mw_SubscriptionState_active_expires := { fieldName := SUBSCRIPTION_STATE_E, subState := "active", substateParams := omit } template SubscriptionState mw_SubscriptionState_terminated := { fieldName := SUBSCRIPTION_STATE_E, subState := "terminated", substateParams := {{id:="reason",paramValue:="timeout"}} } template SUBSCRIBE_Request m_SUBSCRIBE_Request_MWI (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Accept p_accept, template Event p_event, template Expires p_expires) modifies m_SUBSCRIBE_Request_Base := { requestLine := { requestUri := p_requestUri, method := SUBSCRIBE_E }, msgHeader := { accept := p_accept, event := p_event, expires := p_expires } } template SUBSCRIBE_Request mw_SUBSCRIBE_Request_MWI(template SipUrl p_requestUri, template Accept p_accept, template Event p_event, template Expires p_expires) modifies mw_SUBSCRIBE_Request_Base := { requestLine := { requestUri := p_requestUri, method := SUBSCRIBE_E }, msgHeader := { accept := p_accept, event := p_event, expires := p_expires } } template NOTIFY_Request m_NOTIFY_Request_MWI(SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template MessageBody p_mb) modifies m_NOTIFY_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_imsEtsiMwiApplication}, event := m_Event_mwi, subscriptionState := m_SubscriptionState_active }, messageBody := p_mb } template NOTIFY_Request mw_NOTIFY_Request_MWI(template CallId p_callId, template SubscriptionState p_subState, template MessageBody p_mb) modifies mw_NOTIFY_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= ?/*f_MessageBodyLength(valueof(p_mb))*/}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_imsEtsiMwiApplication}, event := mw_Event_mwi, subscriptionState := p_subState }, messageBody := p_mb } }//end group Templates group Steps{ /** * @desc await NOTIFY request */ function f_awaitingNOTIFY(in template NOTIFY_Request p_MSG) runs on ImsComponent { var NOTIFY_Request v_MSG; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_MSG)-> value v_MSG sender vc_sent_label { tc_wait.stop; f_getRouteMapIntoRecordRoute(vc_cSeq, v_MSG); f_setHeadersOnReceiptOfRequest(v_MSG); } } } // end of f_awaitingNOTIFY_sendReply } group ActionsAtTheUE { function f_TC_MWI_U01_001(CSeq p_CSeq) runs on ImsComponent { Loading Loading @@ -475,6 +192,7 @@ group ActionsAtTheUE { }// end function f_TC_MWI_U01_005 function f_TC_MWI_U01_006(CSeq p_CSeq) runs on ImsComponent { var charstring v_uri := "sip:"&PX_IMS_SUT_UE2_PUBLIC_USER&"@"&PX_IMS_SUT_UE2_HOME_DOMAIN; f_init_gm_pcscf(p_CSeq); // ---- preamble -----> Loading @@ -496,12 +214,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading @@ -514,6 +231,7 @@ group ActionsAtTheUE { }// end function f_TC_MWI_U01_006 function f_TC_MWI_U01_007(CSeq p_CSeq) runs on ImsComponent { var charstring v_uri := "sip:"&PX_IMS_SUT_UE2_PUBLIC_USER&"@"&PX_IMS_SUT_UE2_HOME_DOMAIN; f_init_gm_pcscf(p_CSeq); // ---- preamble -----> Loading @@ -535,12 +253,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading @@ -550,12 +267,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","5/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","5/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading Loading @@ -590,7 +306,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -616,7 +332,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_terminated, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_terminated, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -642,7 +358,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); //SUBSCRIBE 2 f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( Loading @@ -658,7 +374,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -685,7 +401,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); // Await till subscription expires f_awaitingDelayTimer(v_SubscriptionExpiryTimer); Loading Loading @@ -728,7 +444,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -754,7 +470,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_sendResponse(m_Response_Base(c_statusLine481, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); Loading Loading @@ -786,7 +502,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -812,7 +528,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesUri)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesUri))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -838,7 +554,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesVoice)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesVoice))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -864,9 +580,9 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS))); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -892,13 +608,57 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yes))); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesUriVoice)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesUriVoice))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); }// end function f_TC_MWI_N01_11 function f_TC_MWI_N01_012(CSeq p_CSeq) runs on ImsComponent { f_init_ics_scscf(p_CSeq); // ---- test body -----> // send SUBSCRIBE 1 LibIms_Steps.f_setHeadersSUBSCRIBE(vc_cSeq, f_initSipUrl(c_userProfile_AS1)); f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, m_Accept_mwi, m_Event_mwi, m_Expires("7200"))); f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); vc_callId := valueof(m_CallId("11111111")); vc_from := f_initFromHeader(vc_userprofile.id, f_getRndTag()); //SUBSCRIBE 2 f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, m_Accept_mwi, m_Event_mwi, m_Expires("7200"))); f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); }// end function f_TC_MWI_N01_012 }// end group ActionsAtTheAS }// end module MWI_TC_Functions No newline at end of file MWI/MWI_Templates.ttcn 0 → 100644 +142 −0 File added.Preview size limit exceeded, changes collapsed. Show changes MWI/MWI_TestCases.ttcn +27 −1 Original line number Diff line number Diff line Loading @@ -472,5 +472,31 @@ module MWI_TestCases { // tear down test configuration f_cf_as_down(v_scscf); }// end testcase TC_MWI_N01_011 /** * @desc * <p> NOTIFY indicates state change due to a message after successful subscription, opt-msg-headers are present</p><p> * Verify that after a successfully subscription a NOTIFY message is sent immediately. Afterwards verify that an * additional NOTIFY request is sent with a body containing a message summary indicating “Messages-Waiting : yes” * and containing opt-msg-headers that describe newly added message(s) when a change in the subscribed state occurs, * e.g. a new message has been received at the Message account. The From header tag and the Call-ID in the two * NOTIFY requests are equal.</p> */ testcase TC_MWI_N01_012(inout CSeq p_CSeq) runs on ServerSyncComp system TestAdapter { // variable declaration var ImsComponent v_scscf; // setup test configuration f_cf_as_up(v_scscf); // start component v_scscf.start(f_TC_MWI_N01_012(p_CSeq)); // synchronize component f_serverSync1Client({c_tbDone}); // tear down test configuration f_cf_as_down(v_scscf); }// end testcase TC_MWI_N01_012 }// end group ActionsAtTheAS }// end module MWI_TestCases No newline at end of file Loading
MWI/MWI_TC_Functions.ttcn +72 −312 Original line number Diff line number Diff line Loading @@ -2,15 +2,17 @@ module MWI_TC_Functions { import from LibIms_Templates all; import from LibIms_SIPTypesAndValues {const c_userProfile_UE1atSUThome, c_userProfile_AS1;} import from LibIms_Steps {function f_IMS_postamble_awaitDeRegistration, f_initSipUrl;} import from LibIms_Steps {function f_IMS_postamble_awaitDeRegistration, f_initSipUrl, f_initFromHeader;} import from LibCommon_Sync all; import from LibSip_Templates all; import from LibSip_Steps language "TTCN-3:2005" all; import from IMS_SS_Functions all; import from LibSip_SIPTypesAndValues language "TTCN-3:2005" all; import from LibSip_SMSTypes all; import from LibIms_Interface {type ImsComponent;} import from LibIms_PIXITS all; import from LibSip_PIXITS {modulepar PX_SIP_TWAIT;} import from MWI_Templates all; modulepar { /** @desc charstring, for the public service identity of the Message Account (MA) Loading @@ -24,291 +26,6 @@ module MWI_TC_Functions { float PX_Timeout_Subscription := 12.0; } // IMS ETSI name MWI application const charstring c_imsEtsiMwiApplication := "application/simple-message-summary"; group SMSTypes{//TODO group shall be moved into LibSIPTypesAndValues or into new module LibSip_SMSTypes //TODO add (SMS sms) into type union MessageBody{ in module LibSIPTypesAndValues type record SMS { //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, SipUrl 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 } group Templates { group Templates_SMS { // //TODO shall be moved into LibSip_Templates // template MessageBody m_mBody_SMS(template SMS p_SMS):= // { // sms := p_SMS // }; // // //TODO shall be moved into LibSip_Templates // template MessageBody mw_mBody_SMS(template SMS p_SMS):= // { // sms := p_SMS // }; template SMS m_SMS(template Msg_summary_line_list p_summaryLineList) := { msg_status_line := m_msgStatusLine_yes, msg_account := m_msgAccount, msg_summary_line_list :=p_summaryLineList, opt_msg_headers := omit } template SMS mw_SMS := { msg_status_line := ?, msg_account := *, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yes := { msg_status_line := mw_msgStatusLine_yes, msg_account := *, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yesUri := { msg_status_line := mw_msgStatusLine_yes, msg_account := mw_msgAccount, msg_summary_line_list := *, opt_msg_headers := * } template SMS mw_SMS_yesVoice := { msg_status_line := mw_msgStatusLine_yes, msg_account := *, msg_summary_line_list := {mw_msgSummaryLine("voice-message")}, opt_msg_headers := * } template SMS mw_SMS_yesUriVoice := { msg_status_line := mw_msgStatusLine_yes, msg_account := mw_msgAccount, msg_summary_line_list := {mw_msgSummaryLine("voice-message")}, opt_msg_headers := * } template Msg_status_line m_msgStatusLine_yes:= { msg_type := "Message-Waiting", msg_status := "yes" } template Msg_status_line mw_msgStatusLine_yes:= { msg_type := "Message-Waiting", msg_status := "yes" } template Msg_account m_msgAccount := { msg_type_account := "Message-Account", account_URI := m_SipUrl_NumberHostParam(PX_IMS_SUT_UE2_PUBLIC_USER,PX_IMS_SUT_UE2_HOME_DOMAIN,omit) } template Msg_account mw_msgAccount := { msg_type_account := "Message-Account", account_URI := ? } template Msg_summary_line m_msgSummaryLine(template charstring p_msgContexClass,template charstring p_msgs,template charstring p_urgent_msgs) := { msg_context_class := p_msgContexClass, msgs := p_msgs, urgent_msgs := p_urgent_msgs } template Msg_summary_line mw_msgSummaryLine(template charstring p_msgContexClass) := { msg_context_class := p_msgContexClass, msgs := ?, urgent_msgs :=* } } //end group Templates_SMS template Event m_Event_mwi := { fieldName := EVENT_E, eventType := "message-summary", eventParams := omit }; template Event mw_Event_mwi := { fieldName := EVENT_E, eventType := "message-summary", eventParams := * }; template Accept m_Accept_mwi := { fieldName := ACCEPT_E, acceptArgs := {{mediaRange := "application/simple-message-summary", acceptParam := omit}} }; template Accept mw_Accept_mwi := { fieldName := ACCEPT_E, acceptArgs := {{mediaRange := "application/simple-message-summary", acceptParam := *}} }; template SubscriptionState mw_SubscriptionState_active := { fieldName := SUBSCRIPTION_STATE_E, subState := "active", substateParams := {{id:="expires",paramValue:=?}} } template SubscriptionState mw_SubscriptionState_active_expires := { fieldName := SUBSCRIPTION_STATE_E, subState := "active", substateParams := omit } template SubscriptionState mw_SubscriptionState_terminated := { fieldName := SUBSCRIPTION_STATE_E, subState := "terminated", substateParams := {{id:="reason",paramValue:="timeout"}} } template SUBSCRIBE_Request m_SUBSCRIBE_Request_MWI (SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template Accept p_accept, template Event p_event, template Expires p_expires) modifies m_SUBSCRIBE_Request_Base := { requestLine := { requestUri := p_requestUri, method := SUBSCRIBE_E }, msgHeader := { accept := p_accept, event := p_event, expires := p_expires } } template SUBSCRIBE_Request mw_SUBSCRIBE_Request_MWI(template SipUrl p_requestUri, template Accept p_accept, template Event p_event, template Expires p_expires) modifies mw_SUBSCRIBE_Request_Base := { requestLine := { requestUri := p_requestUri, method := SUBSCRIBE_E }, msgHeader := { accept := p_accept, event := p_event, expires := p_expires } } template NOTIFY_Request m_NOTIFY_Request_MWI(SipUrl p_requestUri, CallId p_callId, CSeq p_cSeq, From p_from, To p_to, Via p_via, template MessageBody p_mb) modifies m_NOTIFY_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= f_MessageBodyLength(valueof(p_mb))}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_imsEtsiMwiApplication}, event := m_Event_mwi, subscriptionState := m_SubscriptionState_active }, messageBody := p_mb } template NOTIFY_Request mw_NOTIFY_Request_MWI(template CallId p_callId, template SubscriptionState p_subState, template MessageBody p_mb) modifies mw_NOTIFY_Request_Base := { msgHeader := { contentLength := {fieldName := CONTENT_LENGTH_E, len:= ?/*f_MessageBodyLength(valueof(p_mb))*/}, contentType := {fieldName := CONTENT_TYPE_E, mediaType := c_imsEtsiMwiApplication}, event := mw_Event_mwi, subscriptionState := p_subState }, messageBody := p_mb } }//end group Templates group Steps{ /** * @desc await NOTIFY request */ function f_awaitingNOTIFY(in template NOTIFY_Request p_MSG) runs on ImsComponent { var NOTIFY_Request v_MSG; tc_wait.start(PX_SIP_TWAIT); alt { [] SIPP.receive(p_MSG)-> value v_MSG sender vc_sent_label { tc_wait.stop; f_getRouteMapIntoRecordRoute(vc_cSeq, v_MSG); f_setHeadersOnReceiptOfRequest(v_MSG); } } } // end of f_awaitingNOTIFY_sendReply } group ActionsAtTheUE { function f_TC_MWI_U01_001(CSeq p_CSeq) runs on ImsComponent { Loading Loading @@ -475,6 +192,7 @@ group ActionsAtTheUE { }// end function f_TC_MWI_U01_005 function f_TC_MWI_U01_006(CSeq p_CSeq) runs on ImsComponent { var charstring v_uri := "sip:"&PX_IMS_SUT_UE2_PUBLIC_USER&"@"&PX_IMS_SUT_UE2_HOME_DOMAIN; f_init_gm_pcscf(p_CSeq); // ---- preamble -----> Loading @@ -496,12 +214,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading @@ -514,6 +231,7 @@ group ActionsAtTheUE { }// end function f_TC_MWI_U01_006 function f_TC_MWI_U01_007(CSeq p_CSeq) runs on ImsComponent { var charstring v_uri := "sip:"&PX_IMS_SUT_UE2_PUBLIC_USER&"@"&PX_IMS_SUT_UE2_HOME_DOMAIN; f_init_gm_pcscf(p_CSeq); // ---- preamble -----> Loading @@ -535,12 +253,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","4/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading @@ -550,12 +267,11 @@ group ActionsAtTheUE { vc_from, vc_to, vc_via, /*m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","5/1","(2/0)"), m_mBody_SMS(m_SMS({m_msgSummaryLine("Voice-Message","5/1","(2/0)"), m_msgSummaryLine("Video-Message","3/1","(1/0)"), m_msgSummaryLine("Fax-Message","2/1","(0/1)") }))*/ m_mBody_plainText("blabla") ));//TODO MBody },v_uri)) )); f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)); Loading Loading @@ -590,7 +306,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -616,7 +332,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_terminated, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_terminated, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -642,7 +358,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); //SUBSCRIBE 2 f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( Loading @@ -658,7 +374,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -685,7 +401,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); // Await till subscription expires f_awaitingDelayTimer(v_SubscriptionExpiryTimer); Loading Loading @@ -728,7 +444,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -754,7 +470,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY(mw_NOTIFY_Request_MWI(vc_callId, *, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_sendResponse(m_Response_Base(c_statusLine481, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); Loading Loading @@ -786,7 +502,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -812,7 +528,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesUri)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesUri))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -838,7 +554,7 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesVoice)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesVoice))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -864,9 +580,9 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS))); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active_expires, mw_mBody_SMS(mw_SMS_yes))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); Loading @@ -892,13 +608,57 @@ group ActionsAtTheAS { f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yes)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yes))); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, /*mw_mBody_SMS(mw_SMS_yesUriVoice)*/m_mBody_plainText("blabla")));//TODO MBody f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, mw_SubscriptionState_active, mw_mBody_SMS(mw_SMS_yesUriVoice))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); }// end function f_TC_MWI_N01_11 function f_TC_MWI_N01_012(CSeq p_CSeq) runs on ImsComponent { f_init_ics_scscf(p_CSeq); // ---- test body -----> // send SUBSCRIBE 1 LibIms_Steps.f_setHeadersSUBSCRIBE(vc_cSeq, f_initSipUrl(c_userProfile_AS1)); f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, m_Accept_mwi, m_Event_mwi, m_Expires("7200"))); f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); vc_callId := valueof(m_CallId("11111111")); vc_from := f_initFromHeader(vc_userprofile.id, f_getRndTag()); //SUBSCRIBE 2 f_SendSUBSCRIBE(m_SUBSCRIBE_Request_MWI( vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, m_Accept_mwi, m_Event_mwi, m_Expires("7200"))); f_awaitingResponse(mw_Response_Base((c_statusLine200, c_statusLine202), vc_callId, vc_cSeq)); f_awaitingNOTIFY_sendReply(mw_NOTIFY_Request_MWI(vc_callId, *, mw_mBody_SMS(mw_SMS))); f_selfOrClientSyncAndVerdict(c_tbDone, f_getVerdict()); }// end function f_TC_MWI_N01_012 }// end group ActionsAtTheAS }// end module MWI_TC_Functions No newline at end of file
MWI/MWI_Templates.ttcn 0 → 100644 +142 −0 File added.Preview size limit exceeded, changes collapsed. Show changes
MWI/MWI_TestCases.ttcn +27 −1 Original line number Diff line number Diff line Loading @@ -472,5 +472,31 @@ module MWI_TestCases { // tear down test configuration f_cf_as_down(v_scscf); }// end testcase TC_MWI_N01_011 /** * @desc * <p> NOTIFY indicates state change due to a message after successful subscription, opt-msg-headers are present</p><p> * Verify that after a successfully subscription a NOTIFY message is sent immediately. Afterwards verify that an * additional NOTIFY request is sent with a body containing a message summary indicating “Messages-Waiting : yes” * and containing opt-msg-headers that describe newly added message(s) when a change in the subscribed state occurs, * e.g. a new message has been received at the Message account. The From header tag and the Call-ID in the two * NOTIFY requests are equal.</p> */ testcase TC_MWI_N01_012(inout CSeq p_CSeq) runs on ServerSyncComp system TestAdapter { // variable declaration var ImsComponent v_scscf; // setup test configuration f_cf_as_up(v_scscf); // start component v_scscf.start(f_TC_MWI_N01_012(p_CSeq)); // synchronize component f_serverSync1Client({c_tbDone}); // tear down test configuration f_cf_as_down(v_scscf); }// end testcase TC_MWI_N01_012 }// end group ActionsAtTheAS }// end module MWI_TestCases No newline at end of file