[22] | 1 | /**
|
---|
| 2 | * @author STF 370
|
---|
| 3 | * @version $Id: $
|
---|
| 4 | * @desc This module provides common function for TestCoordinator component.
|
---|
| 5 | */
|
---|
| 6 | module AtsImsIot_Functions {
|
---|
| 7 |
|
---|
| 8 | import from AtsImsIot_Templates {template mw_SIP_URI_Base;}
|
---|
| 9 |
|
---|
| 10 | import from LibSip_SIPTypesAndValues all;
|
---|
| 11 |
|
---|
| 12 | import from AtsImsIot_TestSystem {
|
---|
| 13 | type ImsTestCoordinator, ImsInterfaceMonitor;
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | import from LibIot_PIXITS {modulepar PX_MAX_MSG_WAIT, PX_PRODUCTS, PX_AVAILABLE_INTERFACES;}
|
---|
| 17 | import from LibIot_Functions {
|
---|
| 18 | function f_setConformanceVerdict;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | import from AtsImsIot_TypesAndValues {
|
---|
| 22 | type SipMessage, SipMessageList, SkipType;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | import from LibIms_UpperTester all;
|
---|
| 26 |
|
---|
| 27 | import from LibIot_TestInterface {
|
---|
| 28 | type InterfaceMonitor, TestCoordinator, EquipmentUser;
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | import from LibIot_Functions {function f_getE2EVerdict;}
|
---|
| 32 |
|
---|
| 33 | import from LibIot_TypesAndValues {type DefaultList;}
|
---|
| 34 |
|
---|
| 35 | group ue {
|
---|
| 36 |
|
---|
| 37 | /**
|
---|
| 38 | * @desc
|
---|
| 39 | * Starts user component behavior for triggering the registration
|
---|
| 40 | * procedures at the UE from test coordinator.
|
---|
| 41 | * @return
|
---|
| 42 | * true in case of successfull execution of the trigger command
|
---|
| 43 | * otherwise false
|
---|
| 44 | */
|
---|
| 45 | function f_mtc_userRegistration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
| 46 | runs on TestCoordinator
|
---|
| 47 | return boolean {
|
---|
| 48 | var boolean v_status := true;
|
---|
| 49 | // TODO Investigate if f_PR_user_home_registration is to be removed
|
---|
| 50 | // Reason: Thre is no difference when triggering UE to register in home or visiting NW
|
---|
| 51 | if( p_userInfo.publicId == "dummy" ) { return false; }
|
---|
| 52 |
|
---|
| 53 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
| 54 | return v_status;
|
---|
| 55 | }
|
---|
| 56 |
|
---|
| 57 | /**
|
---|
| 58 | * @desc
|
---|
| 59 | * Starts user component behavior for checking the successful
|
---|
| 60 | * registration.
|
---|
| 61 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 62 | * @return
|
---|
| 63 | * true in case of successfull execution of the trigger command
|
---|
| 64 | * otherwise false
|
---|
| 65 | */
|
---|
| 66 | function f_mtc_userCheckRegistration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
| 67 | runs on TestCoordinator return boolean {
|
---|
| 68 | var boolean v_status := true;
|
---|
| 69 | if( p_userInfo.publicId == "dummy" ) { return false; }
|
---|
| 70 | v_status := f_mtc_userCheckRegistrationSuccessful(p_userCompRef);
|
---|
| 71 | return v_status;
|
---|
| 72 | }
|
---|
| 73 |
|
---|
| 74 | /**
|
---|
| 75 | * @desc
|
---|
| 76 | * Starts user component behavior for checking that UE
|
---|
| 77 | * is not registerd.
|
---|
| 78 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 79 | * @return
|
---|
| 80 | * true in case of successfull execution of the trigger command
|
---|
| 81 | * otherwise false
|
---|
| 82 | **/
|
---|
| 83 | function f_mtc_userCheckNoRegistration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
| 84 | runs on TestCoordinator return boolean {
|
---|
| 85 | var boolean v_status := true;
|
---|
| 86 | if( p_userInfo.publicId == "dummy" ) { return true; }
|
---|
| 87 | v_status := f_mtc_userCheckRegistrationUnsuccessful(p_userCompRef);
|
---|
| 88 | return v_status;
|
---|
| 89 | }
|
---|
| 90 |
|
---|
| 91 | /**
|
---|
| 92 | * @desc Trigger UE given by p_ueRef to initiate an MO call
|
---|
| 93 | * @param p_ueRef Reference to IMS UE user component
|
---|
| 94 | * @param p_calledParty ImsUserInfo of called party
|
---|
| 95 | * @return
|
---|
| 96 | * true in case of successfull execution of the trigger command
|
---|
| 97 | * otherwise false
|
---|
| 98 | */
|
---|
| 99 | function f_mtc_userInitiateCall(EquipmentUser p_ueRef, ImsUserInfo p_calledParty)
|
---|
| 100 | runs on TestCoordinator return boolean {
|
---|
| 101 | var boolean v_status := true;
|
---|
| 102 | if( p_calledParty.publicId == "dummy" ) { return true; }
|
---|
| 103 | v_status := f_mtc_userInitiateCallSuccessful(p_ueRef);
|
---|
| 104 | return v_status;
|
---|
| 105 | }
|
---|
| 106 |
|
---|
| 107 | /**
|
---|
| 108 | *
|
---|
| 109 | * @desc Starts user component behaviour for checking that the User
|
---|
| 110 | * Call has been initiated
|
---|
| 111 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 112 | * @return
|
---|
| 113 | * true in case of successfull execution of the trigger command
|
---|
| 114 | * otherwise false
|
---|
| 115 | */
|
---|
| 116 | function f_mtc_userInitiateCallSuccessful(EquipmentUser p_userCompRef)
|
---|
| 117 | runs on TestCoordinator return boolean {
|
---|
| 118 | var boolean v_success := false;
|
---|
| 119 |
|
---|
| 120 | p_userCompRef.start(f_checkUserCallIsInitiated());
|
---|
| 121 |
|
---|
| 122 | p_userCompRef.done;
|
---|
| 123 |
|
---|
| 124 | if(f_getE2EVerdict() == pass) {
|
---|
| 125 | v_success := true;
|
---|
| 126 | }
|
---|
| 127 | return v_success;
|
---|
| 128 | }
|
---|
| 129 |
|
---|
| 130 | /**
|
---|
| 131 | * @desc Answer call
|
---|
| 132 | * @param p_ueRef Reference to IMS UE user component
|
---|
| 133 | * @return
|
---|
| 134 | * true in case of successfull execution of the trigger command
|
---|
| 135 | * otherwise false
|
---|
| 136 | */
|
---|
| 137 | function f_mtc_userAnswerCall(EquipmentUser p_ueRef)
|
---|
| 138 | runs on TestCoordinator return boolean {
|
---|
| 139 | var boolean v_status := true;
|
---|
| 140 | v_status := f_mtc_userAnswerCallSuccessful(p_ueRef);
|
---|
| 141 | return v_status;
|
---|
| 142 | }
|
---|
| 143 |
|
---|
| 144 | /**
|
---|
| 145 | *
|
---|
| 146 | * @desc Starts user component behaviour for checking that the User
|
---|
| 147 | * Call has been answered
|
---|
| 148 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 149 | * @return
|
---|
| 150 | * true in case of successfull execution of the trigger command
|
---|
| 151 | * otherwise false
|
---|
| 152 | */
|
---|
| 153 | function f_mtc_userAnswerCallSuccessful(EquipmentUser p_userCompRef)
|
---|
| 154 | runs on TestCoordinator return boolean {
|
---|
| 155 | var boolean v_success := false;
|
---|
| 156 |
|
---|
| 157 | p_userCompRef.start(f_checkUserCallIsAnswered());
|
---|
| 158 |
|
---|
| 159 | p_userCompRef.done;
|
---|
| 160 |
|
---|
| 161 | if(f_getE2EVerdict() == pass) {
|
---|
| 162 | v_success := true;
|
---|
| 163 | }
|
---|
| 164 | return v_success;
|
---|
| 165 | }
|
---|
| 166 |
|
---|
| 167 | /**
|
---|
| 168 | * @desc End the call
|
---|
| 169 | * @param p_ueRef Reference to IMS UE user component
|
---|
| 170 | * @return
|
---|
| 171 | * true in case of successfull execution of the trigger command
|
---|
| 172 | * otherwise false
|
---|
| 173 | */
|
---|
| 174 | function f_mtc_EndCall(EquipmentUser p_ueRef)
|
---|
| 175 | runs on TestCoordinator return boolean {
|
---|
| 176 | var boolean v_status := true;
|
---|
| 177 | v_status := f_mtc_userEndCallSuccessful(p_ueRef);
|
---|
| 178 | return v_status;
|
---|
| 179 | }
|
---|
| 180 |
|
---|
| 181 | /**
|
---|
| 182 | *
|
---|
| 183 | * @desc Starts user component behaviour for checking that the User
|
---|
| 184 | * Call has been ended
|
---|
| 185 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 186 | * @return
|
---|
| 187 | * true in case of successfull execution of the trigger command
|
---|
| 188 | * otherwise false
|
---|
| 189 | */
|
---|
| 190 | function f_mtc_userEndCallSuccessful(EquipmentUser p_userCompRef)
|
---|
| 191 | runs on TestCoordinator return boolean {
|
---|
| 192 | var boolean v_success := false;
|
---|
| 193 |
|
---|
| 194 | p_userCompRef.start(f_checkUserCallIsEnded());
|
---|
| 195 |
|
---|
| 196 | p_userCompRef.done;
|
---|
| 197 |
|
---|
| 198 | if(f_getE2EVerdict() == pass) {
|
---|
| 199 | v_success := true;
|
---|
| 200 | }
|
---|
| 201 | return v_success;
|
---|
| 202 | }
|
---|
| 203 |
|
---|
| 204 | /**
|
---|
| 205 | * @desc Trigger UE given by p_ueRef to add a new media stream
|
---|
| 206 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 207 | * @return
|
---|
| 208 | * true in case of successfull execution of the trigger command
|
---|
| 209 | * otherwise false
|
---|
| 210 | */
|
---|
| 211 | function f_mtc_userAddNewMediaStream(EquipmentUser p_ueRef)
|
---|
| 212 | runs on TestCoordinator return boolean {
|
---|
| 213 | var boolean v_status := true;
|
---|
| 214 | v_status := f_mtc_userAddNewMediaStreamSuccessful(p_ueRef);
|
---|
| 215 | return v_status;
|
---|
| 216 | }
|
---|
| 217 |
|
---|
| 218 | /**
|
---|
| 219 | *
|
---|
| 220 | * @desc Starts user component behaviour for checking that
|
---|
| 221 | * a new media stream has been added
|
---|
| 222 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 223 | * @return
|
---|
| 224 | * true in case of successfull execution of the trigger command
|
---|
| 225 | * otherwise false
|
---|
| 226 | */
|
---|
| 227 | function f_mtc_userAddNewMediaStreamSuccessful(EquipmentUser p_userCompRef)
|
---|
| 228 | runs on TestCoordinator return boolean {
|
---|
| 229 | var boolean v_success := false;
|
---|
| 230 |
|
---|
| 231 | p_userCompRef.start(f_checkUserAddNewMediaStream());
|
---|
| 232 |
|
---|
| 233 | p_userCompRef.done;
|
---|
| 234 |
|
---|
| 235 | if(f_getE2EVerdict() == pass) {
|
---|
| 236 | v_success := true;
|
---|
| 237 | }
|
---|
| 238 | return v_success;
|
---|
| 239 | }
|
---|
| 240 |
|
---|
| 241 | /**
|
---|
| 242 | * @desc Trigger UE given by p_ueRef to remove a media stream
|
---|
| 243 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 244 | * @return
|
---|
| 245 | * true in case of successfull execution of the trigger command
|
---|
| 246 | * otherwise false
|
---|
| 247 | */
|
---|
| 248 | function f_mtc_userRemoveMediaStream(EquipmentUser p_ueRef)
|
---|
| 249 | runs on TestCoordinator return boolean {
|
---|
| 250 | var boolean v_status := true;
|
---|
| 251 | v_status := f_mtc_userRemoveNewMediaStreamSuccessful(p_ueRef);
|
---|
| 252 | return v_status;
|
---|
| 253 | }
|
---|
| 254 |
|
---|
| 255 | /**
|
---|
| 256 | *
|
---|
| 257 | * @desc Starts user component behaviour for checking that
|
---|
| 258 | * a new media stream has been added
|
---|
| 259 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 260 | * @return
|
---|
| 261 | * true in case of successfull execution of the trigger command
|
---|
| 262 | * otherwise false
|
---|
| 263 | */
|
---|
| 264 | function f_mtc_userRemoveNewMediaStreamSuccessful(EquipmentUser p_userCompRef)
|
---|
| 265 | runs on TestCoordinator return boolean {
|
---|
| 266 | var boolean v_success := false;
|
---|
| 267 |
|
---|
| 268 | p_userCompRef.start(f_checkUserRemoveNewMediaStream());
|
---|
| 269 |
|
---|
| 270 | p_userCompRef.done;
|
---|
| 271 |
|
---|
| 272 | if(f_getE2EVerdict() == pass) {
|
---|
| 273 | v_success := true;
|
---|
| 274 | }
|
---|
| 275 | return v_success;
|
---|
| 276 | }
|
---|
| 277 |
|
---|
| 278 |
|
---|
| 279 | /**
|
---|
| 280 | * @desc Trigger UE given by p_ueRef to check the remove of a media stream
|
---|
| 281 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 282 | * @return
|
---|
| 283 | * true in case of successfull execution of the trigger command
|
---|
| 284 | * otherwise false
|
---|
| 285 | */
|
---|
| 286 | function f_mtc_userCheckRemoveMediaStream(EquipmentUser p_ueRef)
|
---|
| 287 | runs on TestCoordinator return boolean {
|
---|
| 288 | var boolean v_status := true;
|
---|
| 289 | // TODO
|
---|
| 290 | return v_status;
|
---|
| 291 | }
|
---|
| 292 |
|
---|
| 293 | /**
|
---|
| 294 | * @desc Trigger UE given by p_ueRef to add a new media stream
|
---|
| 295 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 296 | * @return
|
---|
| 297 | * true in case of successfull execution of the trigger command
|
---|
| 298 | * otherwise false
|
---|
| 299 | */
|
---|
| 300 | function f_mtc_userModifiyMediaStream(EquipmentUser p_ueRef)
|
---|
| 301 | runs on TestCoordinator return boolean {
|
---|
| 302 | var boolean v_status := true;
|
---|
| 303 | // TODO
|
---|
| 304 | return v_status;
|
---|
| 305 | }
|
---|
| 306 |
|
---|
| 307 | /**
|
---|
| 308 | * @desc Trigger UE given by p_ueRef to add a new media stream
|
---|
| 309 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 310 | * @return
|
---|
| 311 | * true in case of successfull execution of the trigger command
|
---|
| 312 | * otherwise false
|
---|
| 313 | */
|
---|
| 314 | function f_mtc_userCheckNewMediaStream(EquipmentUser p_ueRef)
|
---|
| 315 | runs on TestCoordinator return boolean {
|
---|
| 316 | var boolean v_status := true;
|
---|
| 317 | // TODO
|
---|
| 318 | return v_status;
|
---|
| 319 | }
|
---|
| 320 |
|
---|
| 321 |
|
---|
| 322 | /**
|
---|
| 323 | * @desc Trigger UE given by p_ueRef to loose conectifity
|
---|
| 324 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 325 | * @return
|
---|
| 326 | * true in case of successfull execution of the trigger command
|
---|
| 327 | * otherwise false
|
---|
| 328 | */
|
---|
| 329 | function f_mtc_userLooseConnection(EquipmentUser p_ueRef)
|
---|
| 330 | runs on TestCoordinator return boolean {
|
---|
| 331 | var boolean v_status := true;
|
---|
| 332 | // TODO
|
---|
| 333 | return v_status;
|
---|
| 334 | }
|
---|
| 335 |
|
---|
| 336 | /**
|
---|
| 337 | * @desc Trigger UE given by p_ueRef to enter CANCEL current call
|
---|
| 338 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 339 | * @return
|
---|
| 340 | * true in case of successfull execution of the trigger command
|
---|
| 341 | * otherwise false
|
---|
| 342 | */
|
---|
| 343 | function f_mtc_userTriggerCancelCall(EquipmentUser p_ueRef)
|
---|
| 344 | runs on TestCoordinator return boolean {
|
---|
| 345 | var boolean v_status := true;
|
---|
| 346 | // TODO
|
---|
| 347 | return v_status;
|
---|
| 348 | }
|
---|
| 349 |
|
---|
| 350 | /**
|
---|
| 351 | * @desc Trigger UE given by p_ueRef to enter HOLD state
|
---|
| 352 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 353 | * @return
|
---|
| 354 | * true in case of successfull execution of the trigger command
|
---|
| 355 | * otherwise false
|
---|
| 356 | */
|
---|
| 357 | function f_mtc_userTriggerHold(EquipmentUser p_ueRef)
|
---|
| 358 | runs on TestCoordinator return boolean {
|
---|
| 359 | var boolean v_status := true;
|
---|
| 360 | // TODO
|
---|
| 361 | return v_status;
|
---|
| 362 | }
|
---|
| 363 | /**
|
---|
| 364 | * @desc Trigger UE given by p_ueRef to leave HOLD state and resume pending call
|
---|
| 365 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 366 | * @return
|
---|
| 367 | * true in case of successfull execution of the trigger command
|
---|
| 368 | * otherwise false
|
---|
| 369 | */
|
---|
| 370 | function f_mtc_userTriggerResume(EquipmentUser p_ueRef)
|
---|
| 371 | runs on TestCoordinator return boolean {
|
---|
| 372 | var boolean v_status := true;
|
---|
| 373 | // TODO
|
---|
| 374 | return v_status;
|
---|
| 375 | }
|
---|
| 376 |
|
---|
| 377 | /**
|
---|
| 378 | * @desc Check that UE given by p_ueRef is ringing
|
---|
| 379 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 380 | * @return true or false
|
---|
| 381 | */
|
---|
| 382 | function f_mtc_userCheckRinging(EquipmentUser p_ueRef)
|
---|
| 383 | runs on TestCoordinator return boolean {
|
---|
| 384 | var boolean v_status := true;
|
---|
| 385 | // TODO
|
---|
| 386 | return v_status;
|
---|
| 387 | }
|
---|
| 388 |
|
---|
| 389 | /**
|
---|
| 390 | * @desc Check that UE given by p_ueRef reports a successfull call establishment
|
---|
| 391 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 392 | * @return true or false
|
---|
| 393 | */
|
---|
| 394 | function f_mtc_userCheckCallEstablished(EquipmentUser p_ueRef)
|
---|
| 395 | runs on TestCoordinator return boolean {
|
---|
| 396 | var boolean v_status := true;
|
---|
| 397 | // TODO
|
---|
| 398 | return v_status;
|
---|
| 399 | }
|
---|
| 400 |
|
---|
| 401 | /**
|
---|
| 402 | * @desc Check that UE given by p_ueRef reports a not successfull call establishment
|
---|
| 403 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 404 | * @return true or false
|
---|
| 405 | */
|
---|
| 406 | function f_mtc_userCheckCallCannotBeEstablished(EquipmentUser p_ueRef)
|
---|
| 407 | runs on TestCoordinator return boolean {
|
---|
| 408 | var boolean v_status := true;
|
---|
| 409 | // TODO
|
---|
| 410 | return v_status;
|
---|
| 411 | }
|
---|
| 412 |
|
---|
| 413 |
|
---|
| 414 | /**
|
---|
| 415 | * @desc Check that UE by p_ueRef given reports that its peer is ringing
|
---|
| 416 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 417 | * @return true or false
|
---|
| 418 | */
|
---|
| 419 | function f_mtc_userCheckPeerIsRinging(EquipmentUser p_ueRef)
|
---|
| 420 | runs on TestCoordinator return boolean {
|
---|
| 421 | var boolean v_status := true;
|
---|
| 422 | // TODO
|
---|
| 423 | return v_status;
|
---|
| 424 | }
|
---|
| 425 | /**
|
---|
| 426 | * @desc Check that UE by p_ueRef given reports HOLD state
|
---|
| 427 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 428 | * @return true or false
|
---|
| 429 | */
|
---|
| 430 | function f_mtc_userCheckUserOnHold(EquipmentUser p_ueRef)
|
---|
| 431 | runs on TestCoordinator return boolean {
|
---|
| 432 | var boolean v_status := true;
|
---|
| 433 | // TODO
|
---|
| 434 | return v_status;
|
---|
| 435 | }
|
---|
| 436 | /**
|
---|
| 437 | * @desc Check that UE by p_ueRef given reports that call has been resumed
|
---|
| 438 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 439 | * @return true or false
|
---|
| 440 | */
|
---|
| 441 | function f_mtc_userCheckCallResumed(EquipmentUser p_ueRef)
|
---|
| 442 | runs on TestCoordinator return boolean {
|
---|
| 443 | var boolean v_status := true;
|
---|
| 444 | // TODO
|
---|
| 445 | return v_status;
|
---|
| 446 | }
|
---|
| 447 | /**
|
---|
| 448 | * @desc Check that UE by p_ueRef given reports that call has ended
|
---|
| 449 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 450 | * @return true or false
|
---|
| 451 | */
|
---|
| 452 | function f_mtc_userCheckCallEnded(EquipmentUser p_ueRef)
|
---|
| 453 | runs on TestCoordinator return boolean {
|
---|
| 454 | var boolean v_status := true;
|
---|
| 455 | // TODO
|
---|
| 456 | return v_status;
|
---|
| 457 | }
|
---|
| 458 | /**
|
---|
| 459 | * @desc Check that UE by p_ueRef given reports that call is terminated
|
---|
| 460 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 461 | * @return true or false
|
---|
| 462 | */
|
---|
| 463 | function f_mtc_userCheckCallTerminated(EquipmentUser p_ueRef)
|
---|
| 464 | runs on TestCoordinator return boolean {
|
---|
| 465 | var boolean v_status := true;
|
---|
| 466 | // TODO
|
---|
| 467 | return v_status;
|
---|
| 468 | }
|
---|
| 469 | /**
|
---|
| 470 | * @desc Check that UE by p_ueRef given reports that call is no longer offered
|
---|
| 471 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 472 | * @return true or false
|
---|
| 473 | */
|
---|
| 474 | function f_mtc_userCheckCallNoLongerOffered(EquipmentUser p_ueRef)
|
---|
| 475 | runs on TestCoordinator return boolean {
|
---|
| 476 | var boolean v_status := true;
|
---|
| 477 | // TODO
|
---|
| 478 | return v_status;
|
---|
| 479 | }
|
---|
| 480 |
|
---|
| 481 | /**
|
---|
| 482 | * @desc Check that UE by p_ueRef given reports that call has been cancelled
|
---|
| 483 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 484 | * @return true or false
|
---|
| 485 | */
|
---|
| 486 | function f_mtc_userCheckCallCancelled(EquipmentUser p_ueRef)
|
---|
| 487 | runs on TestCoordinator return boolean {
|
---|
| 488 | var boolean v_status := true;
|
---|
| 489 | // TODO
|
---|
| 490 | return v_status;
|
---|
| 491 | }
|
---|
| 492 |
|
---|
| 493 | /**
|
---|
| 494 | * @desc Check that UE by p_ueRef given reports that call has been rejected due to ACR
|
---|
| 495 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 496 | * @return true or false
|
---|
| 497 | */
|
---|
| 498 | function f_mtc_userCheckCallRejectedACR(EquipmentUser p_ueRef)
|
---|
| 499 | runs on TestCoordinator return boolean {
|
---|
| 500 | var boolean v_status := true;
|
---|
| 501 | // TODO
|
---|
| 502 | return v_status;
|
---|
| 503 | }
|
---|
| 504 |
|
---|
| 505 | /**
|
---|
| 506 | * @desc Start capturing and monitoring traffic on all configured interfaces
|
---|
| 507 | * @return true or false
|
---|
| 508 | */
|
---|
| 509 | function f_mtc_StartAllTrafficCapture()
|
---|
| 510 | runs on TestCoordinator return boolean {
|
---|
| 511 | var boolean v_status := true;
|
---|
| 512 | // TODO
|
---|
| 513 | return v_status;
|
---|
| 514 | }
|
---|
| 515 |
|
---|
| 516 |
|
---|
| 517 |
|
---|
| 518 | /**
|
---|
| 519 | * @desc Starts user component behaviour for registration from test coordinator
|
---|
| 520 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 521 | * @param p_publicId public user identity
|
---|
| 522 | * @param p_privateId private user identity
|
---|
| 523 | * @param p_pw user password
|
---|
| 524 | * @return
|
---|
| 525 | * true in case of successfull execution of the trigger command
|
---|
| 526 | * otherwise false
|
---|
| 527 | */
|
---|
| 528 | function f_mtc_userRegister(EquipmentUser p_userCompRef, charstring p_publicId, charstring p_privateId, charstring p_pw) runs on TestCoordinator return boolean {
|
---|
| 529 | // TODO server address parameter may needed
|
---|
| 530 | var boolean v_success := false;
|
---|
| 531 |
|
---|
| 532 | p_userCompRef.start(f_userRegistration(p_publicId, p_privateId, p_pw));
|
---|
| 533 |
|
---|
| 534 | p_userCompRef.done;
|
---|
| 535 |
|
---|
| 536 | if(f_getE2EVerdict() == pass) {
|
---|
| 537 | v_success := true;
|
---|
| 538 | }
|
---|
| 539 |
|
---|
| 540 | return v_success;
|
---|
| 541 | }
|
---|
| 542 |
|
---|
| 543 | function f_mtc_userCheckRegistrationSuccessful(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
| 544 | var boolean v_success := false;
|
---|
| 545 |
|
---|
| 546 | p_userCompRef.start(f_checkUserIsRegistered());
|
---|
| 547 |
|
---|
| 548 | p_userCompRef.done;
|
---|
| 549 |
|
---|
| 550 | if(f_getE2EVerdict() == pass) {
|
---|
| 551 | v_success := true;
|
---|
| 552 | }
|
---|
| 553 |
|
---|
| 554 | return v_success;
|
---|
| 555 | }
|
---|
| 556 | /**
|
---|
| 557 | *
|
---|
| 558 | * @desc Starts user component behaviour for checking that the UE
|
---|
| 559 | * is not registered
|
---|
| 560 | * @param p_userCompRef Reference to IMS UE user component
|
---|
| 561 | * @return
|
---|
| 562 | * true in case of successfull execution of the trigger command
|
---|
| 563 | * otherwise false
|
---|
| 564 | */
|
---|
| 565 | function f_mtc_userCheckRegistrationUnsuccessful(EquipmentUser p_userCompRef)
|
---|
| 566 | runs on TestCoordinator return boolean {
|
---|
| 567 | var boolean v_success := false;
|
---|
| 568 |
|
---|
| 569 | p_userCompRef.start(f_checkUserIsNotRegistered());
|
---|
| 570 |
|
---|
| 571 | p_userCompRef.done;
|
---|
| 572 |
|
---|
| 573 | if(f_getE2EVerdict() == pass) {
|
---|
| 574 | v_success := true;
|
---|
| 575 | }
|
---|
| 576 | return v_success;
|
---|
| 577 | }
|
---|
| 578 |
|
---|
| 579 | /**
|
---|
| 580 | * @desc Starts user component behaviour for registration from test coordinator
|
---|
| 581 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 582 | * @param publicId public user identity
|
---|
| 583 | * @return
|
---|
| 584 | * true in case of successfull execution of the trigger command
|
---|
| 585 | * otherwise false
|
---|
| 586 | */
|
---|
| 587 | function f_mtc_userDeregister(EquipmentUser p_userCompRef, charstring p_publicId) runs on TestCoordinator return boolean {
|
---|
| 588 | var boolean v_success := false;
|
---|
| 589 |
|
---|
| 590 | p_userCompRef.start(f_userDeregistration(p_publicId));
|
---|
| 591 |
|
---|
| 592 | p_userCompRef.done;
|
---|
| 593 |
|
---|
| 594 | if( f_getE2EVerdict() == pass) {
|
---|
| 595 | v_success := true;
|
---|
| 596 | }
|
---|
| 597 |
|
---|
| 598 | return v_success;
|
---|
| 599 | }
|
---|
| 600 |
|
---|
| 601 | /**
|
---|
| 602 | *
|
---|
| 603 | * @desc Starts user component behaviour for sending a message from test coordinator
|
---|
| 604 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 605 | * @param p_content Content of meessage to be sent
|
---|
| 606 | */
|
---|
| 607 | function f_mtc_userSendMessage(EquipmentUser p_userCompRef, charstring p_content) runs on TestCoordinator return boolean {
|
---|
| 608 | var boolean v_success := false;
|
---|
| 609 |
|
---|
| 610 | p_userCompRef.start(f_userSendMessage(p_content));
|
---|
| 611 |
|
---|
| 612 | p_userCompRef.done;
|
---|
| 613 |
|
---|
| 614 | if(f_getE2EVerdict() == pass) {
|
---|
| 615 | v_success := true;
|
---|
| 616 | }
|
---|
| 617 |
|
---|
| 618 | return v_success;
|
---|
| 619 | }
|
---|
| 620 |
|
---|
| 621 | /**
|
---|
| 622 | *
|
---|
| 623 | * @desc Starts user component behaviour for checking message receipt from test coordinator
|
---|
| 624 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 625 | * @param p_content Content of meessage to be received
|
---|
| 626 | */
|
---|
| 627 | function f_mtc_userCheckMessageReceipt(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
| 628 | var boolean v_success := false;
|
---|
| 629 |
|
---|
| 630 | p_userCompRef.start(f_userCheckMessageReceipt());
|
---|
| 631 |
|
---|
| 632 | p_userCompRef.done;
|
---|
| 633 |
|
---|
| 634 | if(f_getE2EVerdict() == pass) {
|
---|
| 635 | v_success := true;
|
---|
| 636 | }
|
---|
| 637 |
|
---|
| 638 | return v_success;
|
---|
| 639 | }
|
---|
| 640 |
|
---|
| 641 | /**
|
---|
| 642 | *
|
---|
| 643 | * @desc Starts user component behaviour for checking message receipt from test coordinator
|
---|
| 644 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 645 | * @param p_content Content of meessage to be received
|
---|
| 646 | */
|
---|
| 647 | function f_mtc_userCheckMessageNotDelivered(EquipmentUser p_userCompRef) runs on TestCoordinator return boolean {
|
---|
| 648 | var boolean v_success := false;
|
---|
| 649 |
|
---|
| 650 | p_userCompRef.start(f_userCheckMessageNotDelivered());
|
---|
| 651 |
|
---|
| 652 | p_userCompRef.done;
|
---|
| 653 |
|
---|
| 654 | if(f_getE2EVerdict() == pass) {
|
---|
| 655 | v_success := true;
|
---|
| 656 | }
|
---|
| 657 |
|
---|
| 658 | return v_success;
|
---|
| 659 | }
|
---|
| 660 |
|
---|
| 661 |
|
---|
| 662 | /**
|
---|
| 663 | * @desc Trigger IMS Network to deregister UE given by p_ueRef
|
---|
| 664 | * @param p_imsRef Reference to IMS network component
|
---|
| 665 | * @param p_ueRef Reference to IMS UE user component
|
---|
| 666 | * @return true or false
|
---|
| 667 | */
|
---|
| 668 | function f_mtc_imsTriggerUeDeregistration(EquipmentUser p_imsRef, EquipmentUser p_ueRef)
|
---|
| 669 | runs on TestCoordinator return boolean {
|
---|
| 670 | var boolean v_status := true;
|
---|
| 671 | // TODO
|
---|
| 672 | return v_status;
|
---|
| 673 | }
|
---|
| 674 |
|
---|
| 675 |
|
---|
| 676 |
|
---|
| 677 |
|
---|
| 678 |
|
---|
| 679 | /*
|
---|
| 680 | *
|
---|
| 681 | * @desc Looks for genUser (any) of a specific product
|
---|
| 682 | * @param p_productIdx Index of the product
|
---|
| 683 | * @return genUser
|
---|
| 684 | */
|
---|
| 685 | function f_getAnyValidUser(integer p_productIdx) return ImsUserInfo {
|
---|
| 686 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 687 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 688 | var ImsUserIdentity v_userid;
|
---|
| 689 |
|
---|
| 690 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 691 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 692 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 693 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 694 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].genUserId )) {
|
---|
| 695 | return PX_IMS_USER_DATA[i].userIds[j].genUserId;
|
---|
| 696 | } // end if
|
---|
| 697 | } // end for j
|
---|
| 698 | log("f_getAnyValidUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 699 | return c_dummyInfo;
|
---|
| 700 | } // end if
|
---|
| 701 | } // end for i
|
---|
| 702 | log("f_getAnyValidUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 703 | return c_dummyInfo;
|
---|
| 704 | }
|
---|
| 705 |
|
---|
| 706 | /*
|
---|
| 707 | *
|
---|
| 708 | * @desc Looks for TelUser of a specific product
|
---|
| 709 | * @param p_productIdx Index of the product
|
---|
| 710 | * @return TelUser
|
---|
| 711 | */
|
---|
| 712 | function f_getTelUserId(integer p_productIdx) return ImsUserInfo {
|
---|
| 713 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 714 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 715 | var ImsUserIdentity v_userid;
|
---|
| 716 |
|
---|
| 717 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 718 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 719 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 720 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 721 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].telUserId )) {
|
---|
| 722 | return PX_IMS_USER_DATA[i].userIds[j].telUserId;
|
---|
| 723 | } // end if
|
---|
| 724 | } // end for j
|
---|
| 725 | log("f_getTelUserId: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 726 | return c_dummyInfo;
|
---|
| 727 | } // end if
|
---|
| 728 | } // end for i
|
---|
| 729 | log("f_getTelUserId: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 730 | return c_dummyInfo;
|
---|
| 731 | }
|
---|
| 732 |
|
---|
| 733 | /*
|
---|
| 734 | *
|
---|
| 735 | * @desc Looks for SipUser of a specific product
|
---|
| 736 | * @param p_productIdx Index of the product
|
---|
| 737 | * @return SipUser
|
---|
| 738 | */
|
---|
| 739 | function f_getSipUserId(integer p_productIdx) return ImsUserInfo {
|
---|
| 740 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 741 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 742 | var ImsUserIdentity v_userid;
|
---|
| 743 |
|
---|
| 744 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 745 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 746 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 747 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 748 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].sipUserId )) {
|
---|
| 749 | return PX_IMS_USER_DATA[i].userIds[j].sipUserId;
|
---|
| 750 | } // end if
|
---|
| 751 | } // end for j
|
---|
| 752 | log("f_getSipUserId: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 753 | return c_dummyInfo;
|
---|
| 754 | } // end if
|
---|
| 755 | } // end for i
|
---|
| 756 | log("f_getSipUserId: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 757 | return c_dummyInfo;
|
---|
| 758 | }
|
---|
| 759 |
|
---|
| 760 | /*
|
---|
| 761 | *
|
---|
| 762 | * @desc Looks for ARCUser for a specific product
|
---|
| 763 | * @param p_productIdx Index of the product
|
---|
| 764 | * @return ARCUser
|
---|
| 765 | */
|
---|
| 766 | function f_getACRUser(integer p_productIdx) return ImsUserInfo {
|
---|
| 767 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 768 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 769 | var ImsUserIdentity v_userid;
|
---|
| 770 |
|
---|
| 771 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 772 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 773 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 774 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 775 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].acrUserId )) {
|
---|
| 776 | return PX_IMS_USER_DATA[i].userIds[j].acrUserId;
|
---|
| 777 | } // end if
|
---|
| 778 | } // end for j
|
---|
| 779 | log("f_getACRUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 780 | return c_dummyInfo;
|
---|
| 781 | } // end if
|
---|
| 782 | } // end for i
|
---|
| 783 | log("f_getACRUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 784 | return c_dummyInfo;
|
---|
| 785 | }
|
---|
| 786 |
|
---|
| 787 | /*
|
---|
| 788 | *
|
---|
| 789 | * @desc Looks for OIPUser for a specific product
|
---|
| 790 | * @param p_productIdx Index of the product
|
---|
| 791 | * @return OIPUser
|
---|
| 792 | */
|
---|
| 793 | function f_getOIPUser(integer p_productIdx) return ImsUserInfo {
|
---|
| 794 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 795 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 796 | var ImsUserIdentity v_userid;
|
---|
| 797 |
|
---|
| 798 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 799 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 800 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 801 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 802 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].oipUserId )) {
|
---|
| 803 | return PX_IMS_USER_DATA[i].userIds[j].oipUserId;
|
---|
| 804 | } // end if
|
---|
| 805 | } // end for j
|
---|
| 806 | log("f_getOIPUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 807 | return c_dummyInfo;
|
---|
| 808 | } // end if
|
---|
| 809 | } // end for i
|
---|
| 810 | log("f_getOIPUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 811 | return c_dummyInfo;
|
---|
| 812 | }
|
---|
| 813 |
|
---|
| 814 | /*
|
---|
| 815 | *
|
---|
| 816 | * @desc Looks for OIRUser for a specific product
|
---|
| 817 | * @param p_productIdx Index of the product
|
---|
| 818 | * @return OIRUser
|
---|
| 819 | */
|
---|
| 820 | function f_getOIRUser(integer p_productIdx) return ImsUserInfo {
|
---|
| 821 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 822 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 823 | var ImsUserIdentity v_userid;
|
---|
| 824 |
|
---|
| 825 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 826 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 827 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 828 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 829 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].oirUserId )) {
|
---|
| 830 | return PX_IMS_USER_DATA[i].userIds[j].oirUserId;
|
---|
| 831 | } // end if
|
---|
| 832 | } // end for j
|
---|
| 833 | log("f_getOIRUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 834 | return c_dummyInfo;
|
---|
| 835 | } // end if
|
---|
| 836 | } // end for i
|
---|
| 837 | log("f_getOIRUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 838 | return c_dummyInfo;
|
---|
| 839 | }
|
---|
| 840 |
|
---|
| 841 | /*
|
---|
| 842 | *
|
---|
| 843 | * @desc Looks for HoldUser for a specific product
|
---|
| 844 | * @param p_productIdx Index of the product
|
---|
| 845 | * @return HoldUser
|
---|
| 846 | */
|
---|
| 847 | function f_getHoldUser(integer p_productIdx) return ImsUserInfo {
|
---|
| 848 | var integer v_size := sizeof(PX_IMS_USER_DATA);
|
---|
| 849 | const ImsUserInfo c_dummyInfo := { "dummy", "dummy", "dummy", "dummy", "dummy" };
|
---|
| 850 | var ImsUserIdentity v_userid;
|
---|
| 851 |
|
---|
| 852 | for(var integer i := 0; i < v_size; i := i+1) {
|
---|
| 853 | if(PX_IMS_USER_DATA[i].productIndex == p_productIdx) {
|
---|
| 854 | var integer v_size_j := sizeof(PX_IMS_USER_DATA[i].userIds);
|
---|
| 855 | for(var integer j := 0; j < v_size_j; j := j+1) {
|
---|
| 856 | if ( ischosen(PX_IMS_USER_DATA[i].userIds[j].holdUserId )) {
|
---|
| 857 | return PX_IMS_USER_DATA[i].userIds[j].holdUserId;
|
---|
| 858 | } // end if
|
---|
| 859 | } // end for j
|
---|
| 860 | log("f_getHoldUser: Did not find specified user id in specified product in PX_IMS_USER_DATA");
|
---|
| 861 | return c_dummyInfo;
|
---|
| 862 | } // end if
|
---|
| 863 | } // end for i
|
---|
| 864 | log("f_getHoldUser: Did not find specified product in PX_IMS_USER_DATA");
|
---|
| 865 | return c_dummyInfo;
|
---|
| 866 | }
|
---|
| 867 |
|
---|
| 868 | // TODO
|
---|
| 869 | function f_getUEHostname(integer p_ID, out charstring p_hostname)
|
---|
| 870 | return boolean {
|
---|
| 871 |
|
---|
| 872 | // TODO
|
---|
| 873 |
|
---|
| 874 | return true;
|
---|
| 875 | }
|
---|
| 876 |
|
---|
| 877 | /**
|
---|
| 878 | * @desc
|
---|
| 879 | * Preamble to handle user registration in home network from test coordinator
|
---|
| 880 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 881 | * @return true in case of successfull execution otherwise false
|
---|
| 882 | */
|
---|
| 883 | function f_PR_user_home_registration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
| 884 | runs on TestCoordinator return boolean {
|
---|
| 885 | var boolean v_status := true;
|
---|
| 886 | if( p_userInfo.publicId == "" ) { return false; }
|
---|
| 887 |
|
---|
| 888 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
| 889 |
|
---|
| 890 | return v_status;
|
---|
| 891 | }
|
---|
| 892 |
|
---|
| 893 | /**
|
---|
| 894 | * @desc
|
---|
| 895 | * Postamble to handle user deregistration in home network from test coordinator
|
---|
| 896 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 897 | * @return true in case of successfull execution otherwise false
|
---|
| 898 | */
|
---|
| 899 | function f_PO_user_home_deregistration(EquipmentUser p_userCompRef) runs on ImsTestCoordinator return boolean {
|
---|
| 900 | var boolean v_status := true;
|
---|
| 901 |
|
---|
| 902 | v_status := f_mtc_userDeregister(p_userCompRef, "*"); // deregister all previous users
|
---|
| 903 |
|
---|
| 904 | return v_status;
|
---|
| 905 | }
|
---|
| 906 |
|
---|
| 907 | /**
|
---|
| 908 | * @desc
|
---|
| 909 | * Preamble to handle user registration in roaming network from test coordinator
|
---|
| 910 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 911 | * @return true in case of successfull execution otherwise false
|
---|
| 912 | */
|
---|
| 913 | function f_PR_user_roaming_registration(EquipmentUser p_userCompRef, ImsUserInfo p_userInfo)
|
---|
| 914 | runs on TestCoordinator return boolean {
|
---|
| 915 | var boolean v_status := true;
|
---|
| 916 | if( p_userInfo.publicId == "" ) { return false; }
|
---|
| 917 |
|
---|
| 918 | // TODO check roaming registration
|
---|
| 919 | v_status := f_mtc_userRegister(p_userCompRef, p_userInfo.publicId, p_userInfo.privateId, p_userInfo.password);
|
---|
| 920 |
|
---|
| 921 | return v_status;
|
---|
| 922 | }
|
---|
| 923 |
|
---|
| 924 | /**
|
---|
| 925 | * @desc
|
---|
| 926 | * Postamble to handle user deregistration in roaming network from test coordinator
|
---|
| 927 | * @param p_userCompRef Reference ot IMS UE user component
|
---|
| 928 | * @return true in case of successfull execution otherwise false
|
---|
| 929 | */
|
---|
| 930 | function f_PO_user_roaming_deregistration(EquipmentUser p_userCompRef) runs on ImsTestCoordinator return boolean {
|
---|
| 931 | var boolean v_status := true;
|
---|
| 932 |
|
---|
| 933 | // TODO check roaming de-registration
|
---|
| 934 | v_status := f_mtc_userDeregister(p_userCompRef, "*"); // deregister all previous users
|
---|
| 935 |
|
---|
| 936 | return v_status;
|
---|
| 937 | }
|
---|
| 938 |
|
---|
| 939 | /**
|
---|
| 940 | * @desc Get the S-CSCF FQDN address of referenced EUT
|
---|
| 941 | * @return if a S-CSCF is avaiable, the domainname of the S-CSCF,
|
---|
| 942 | * otherwise error_string
|
---|
| 943 | */
|
---|
| 944 | function f_GetEUTScscfAddress(integer p_ProductIdx) return charstring {
|
---|
| 945 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 946 | var integer v_size_ipinterfaceinfo;
|
---|
| 947 | var integer v_interface := -1;
|
---|
| 948 | var integer v_ipinterfaceinfo := -1;
|
---|
| 949 | var charstring v_domainname;
|
---|
| 950 |
|
---|
| 951 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 952 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Mm][Ww]")){
|
---|
| 953 | v_interface := i;
|
---|
| 954 | break;
|
---|
| 955 | }
|
---|
| 956 | }
|
---|
| 957 | if (v_interface > -1) {
|
---|
| 958 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 959 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 960 | if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
|
---|
| 961 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 962 | if (match(substr(v_domainname, 0, 5), pattern "[Ss][Cc][Ss][Cc][Ff]")
|
---|
| 963 | or match(substr(v_domainname, 0, 5), pattern "[Ss][Tt][Ee][Cc][Hh]")) {
|
---|
| 964 | v_ipinterfaceinfo := i;
|
---|
| 965 | break;
|
---|
| 966 | }
|
---|
| 967 | }
|
---|
| 968 | }
|
---|
| 969 | } else {
|
---|
| 970 | log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 971 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 972 | }
|
---|
| 973 | if (v_ipinterfaceinfo > -1) {
|
---|
| 974 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
| 975 | } else {
|
---|
| 976 | log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 977 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 978 | }
|
---|
| 979 | }
|
---|
| 980 |
|
---|
| 981 | /**
|
---|
| 982 | * @desc Get the S-CSCF FQDN address of referenced EUT
|
---|
| 983 | * @return if a S-CSCF is avaiable, the IP Address of the S-CSCF,
|
---|
| 984 | * otherwise error_string
|
---|
| 985 | */
|
---|
| 986 | function f_GetEUTScscfIpAddress(integer p_ProductIdx) return charstring {
|
---|
| 987 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 988 | var integer v_size_ipinterfaceinfo;
|
---|
| 989 | var integer v_interface := -1;
|
---|
| 990 | var integer v_ipinterfaceinfo := -1;
|
---|
| 991 | var charstring v_domainname;
|
---|
| 992 |
|
---|
| 993 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 994 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Mm][Ww]")){
|
---|
| 995 | v_interface := i;
|
---|
| 996 | }
|
---|
| 997 | }
|
---|
| 998 | if (v_interface > -1) {
|
---|
| 999 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1000 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1001 | if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
|
---|
| 1002 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1003 | if (match(substr(v_domainname, 0, 5), pattern "[Ss][Cc][Ss][Cc][Ff]")
|
---|
| 1004 | or match(substr(v_domainname, 0, 5), pattern "[Ss][Tt][Ee][Cc][Hh]")) {
|
---|
| 1005 | v_ipinterfaceinfo := i;
|
---|
| 1006 | }
|
---|
| 1007 | }
|
---|
| 1008 | }
|
---|
| 1009 | } else {
|
---|
| 1010 | log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1011 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1012 | }
|
---|
| 1013 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1014 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].IpAddress;
|
---|
| 1015 | } else {
|
---|
| 1016 | log ("S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1017 | return "S-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1018 | }
|
---|
| 1019 | }
|
---|
| 1020 |
|
---|
| 1021 | /**
|
---|
| 1022 | * @desc Get the P-CSCF FQDN address of referenced EUT
|
---|
| 1023 | * @return if a PCSCF is avaiable, the domainname of the PCSCF,
|
---|
| 1024 | * otherwise error_string
|
---|
| 1025 | */
|
---|
| 1026 | function f_GetEUTPcscfAddress(integer p_ProductIdx) return charstring {
|
---|
| 1027 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 1028 | var integer v_size_ipinterfaceinfo;
|
---|
| 1029 | var integer v_interface := -1;
|
---|
| 1030 | var integer v_ipinterfaceinfo := -1;
|
---|
| 1031 | var charstring v_domainname;
|
---|
| 1032 |
|
---|
| 1033 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 1034 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Gg][Mm]")){
|
---|
| 1035 | v_interface := i;
|
---|
| 1036 | break;
|
---|
| 1037 | }
|
---|
| 1038 | }
|
---|
| 1039 | if (v_interface > -1) {
|
---|
| 1040 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1041 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1042 | if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
|
---|
| 1043 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1044 | if (match(substr(v_domainname, 0, 5), pattern "[Pp][Cc][Ss][Cc][Ff]")
|
---|
| 1045 | or match(substr(v_domainname, 0, 5), pattern "[Pp][Tt][Ee][Cc][Hh]")) {
|
---|
| 1046 | v_ipinterfaceinfo := i;
|
---|
| 1047 | }
|
---|
| 1048 | }
|
---|
| 1049 | }
|
---|
| 1050 | } else {
|
---|
| 1051 | log ("P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1052 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1053 | }
|
---|
| 1054 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1055 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
| 1056 | } else {
|
---|
| 1057 | log ("P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1058 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1059 | }
|
---|
| 1060 | }
|
---|
| 1061 |
|
---|
| 1062 | /**
|
---|
| 1063 | * @desc Get the P-CSCF IP address of referenced EUT
|
---|
| 1064 | * @return if a PCSCF is avaiable, the IP address of the PCSCF,
|
---|
| 1065 | * otherwise error_string
|
---|
| 1066 | */
|
---|
| 1067 | function f_GetEUTPcscfIpAddress(integer p_ProductIdx) return charstring {
|
---|
| 1068 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 1069 | var integer v_size_ipinterfaceinfo;
|
---|
| 1070 | var integer v_interface := -1;
|
---|
| 1071 | var integer v_ipinterfaceinfo := -1;
|
---|
| 1072 | var charstring v_domainname;
|
---|
| 1073 |
|
---|
| 1074 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 1075 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Gg][Mm]")){
|
---|
| 1076 | v_interface := i;
|
---|
| 1077 | break;
|
---|
| 1078 | }
|
---|
| 1079 | }
|
---|
| 1080 | if (v_interface > -1) {
|
---|
| 1081 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1082 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1083 | if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
|
---|
| 1084 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1085 | if (match(substr(v_domainname, 0, 5), pattern "[Pp][Cc][Ss][Cc][Ff]")
|
---|
| 1086 | or match(substr(v_domainname, 0, 5), pattern "[Pp][Tt][Ee][Cc][Hh]")) {
|
---|
| 1087 | v_ipinterfaceinfo := i;
|
---|
| 1088 | }
|
---|
| 1089 | }
|
---|
| 1090 | }
|
---|
| 1091 | } else {
|
---|
| 1092 | log ("P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1093 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1094 | }
|
---|
| 1095 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1096 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].IpAddress;
|
---|
| 1097 | } else {
|
---|
| 1098 | log ("P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1099 | return "P-CSCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1100 | }
|
---|
| 1101 | }
|
---|
| 1102 |
|
---|
| 1103 | /**
|
---|
| 1104 | * @desc Get the IBCF FQDN address of referenced EUT
|
---|
| 1105 | * @return if a IBCF is avaiable, the domainname of the IBCF,
|
---|
| 1106 | * otherwise error_string
|
---|
| 1107 | */
|
---|
| 1108 | function f_GetEUTIbcfAddress(integer p_ProductIdx) return charstring {
|
---|
| 1109 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 1110 | var integer v_size_ipinterfaceinfo;
|
---|
| 1111 | var integer v_interface := -1;
|
---|
| 1112 | var integer v_ipinterfaceinfo := -1;
|
---|
| 1113 | var charstring v_domainname;
|
---|
| 1114 |
|
---|
| 1115 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 1116 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Mm][Ww]")){
|
---|
| 1117 | v_interface := i;
|
---|
| 1118 | }
|
---|
| 1119 | }
|
---|
| 1120 | if (v_interface > -1) {
|
---|
| 1121 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1122 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1123 | if(ispresent(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName)) {
|
---|
| 1124 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1125 | if (match(substr(v_domainname, 0, 5), pattern "[Ii][Bb][Cc][Ff]")) {
|
---|
| 1126 | v_ipinterfaceinfo := i;
|
---|
| 1127 | }
|
---|
| 1128 | }
|
---|
| 1129 | }
|
---|
| 1130 | } else {
|
---|
| 1131 | log ("IBCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1132 | return "IBCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1133 | }
|
---|
| 1134 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1135 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
| 1136 | } else {
|
---|
| 1137 | log ("IBCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1138 | return "IBCF of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1139 | }
|
---|
| 1140 | }
|
---|
| 1141 |
|
---|
| 1142 | /**
|
---|
| 1143 | * @desc Get the Public Id of referenced UE
|
---|
| 1144 | * @param p_ProductIdx index of the product the UE belongs to
|
---|
| 1145 | * @return PublicID of the UE of the productIdx
|
---|
| 1146 | */
|
---|
| 1147 | function f_GetUEPublicId(integer p_ProductIdx) return charstring {
|
---|
| 1148 |
|
---|
| 1149 | var ImsUserInfo v_uePublicId := f_getSipUserId(p_ProductIdx);
|
---|
| 1150 |
|
---|
| 1151 | return v_uePublicId.publicId;
|
---|
| 1152 | }
|
---|
| 1153 |
|
---|
| 1154 |
|
---|
| 1155 | /**
|
---|
| 1156 | * @desc Get the UE URI containing the IP address of referenced EUT
|
---|
| 1157 | */
|
---|
| 1158 | function f_getUeIpAddress(integer p_ProductIdx) return template SipUrl {
|
---|
| 1159 | // TODO
|
---|
| 1160 | return mw_SIP_URI_Base;
|
---|
| 1161 | }
|
---|
| 1162 |
|
---|
| 1163 | /**
|
---|
| 1164 | * @desc Get the Public Id of referenced EUT
|
---|
| 1165 | */
|
---|
| 1166 | function f_GetEUTPublicId(integer p_ProductIdx) return charstring {
|
---|
| 1167 | // TODO
|
---|
| 1168 | return "TODO";
|
---|
| 1169 | }
|
---|
| 1170 |
|
---|
| 1171 | /**
|
---|
| 1172 | * @desc Get the AS server FQDN of referenced EUT
|
---|
| 1173 | */
|
---|
| 1174 | function f_GetEUTASServerAddress(integer p_ProductIdx) return charstring {
|
---|
| 1175 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 1176 | var integer v_size_ipinterfaceinfo;
|
---|
| 1177 | var integer v_interface := -1;
|
---|
| 1178 | var integer v_ipinterfaceinfo := -1;
|
---|
| 1179 | var charstring v_domainname;
|
---|
| 1180 |
|
---|
| 1181 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 1182 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Ii][Ss][Cc]")){
|
---|
| 1183 | v_interface := i;
|
---|
| 1184 | }
|
---|
| 1185 | }
|
---|
| 1186 | if (v_interface > -1) {
|
---|
| 1187 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1188 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1189 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1190 | if (match(substr(v_domainname, 0, 2), pattern "[Aa][Ss]")
|
---|
| 1191 | or match(substr(v_domainname, 2, 2), pattern "[Aa][Ss]")
|
---|
| 1192 | or match(substr(v_domainname, 9, 2), pattern "[Aa][Ss]")) {
|
---|
| 1193 | v_ipinterfaceinfo := i;
|
---|
| 1194 | }
|
---|
| 1195 | }
|
---|
| 1196 | } else {
|
---|
| 1197 | log ("AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1198 | return "AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1199 | }
|
---|
| 1200 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1201 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].domainName;
|
---|
| 1202 | } else {
|
---|
| 1203 | log ("AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1204 | return "AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1205 | }
|
---|
| 1206 | }
|
---|
| 1207 |
|
---|
| 1208 | }
|
---|
| 1209 |
|
---|
| 1210 | /**
|
---|
| 1211 | * @desc Get the AS server IP Address of referenced EUT
|
---|
| 1212 | */
|
---|
| 1213 | function f_GetEUTASServerIpAddress(integer p_ProductIdx) return charstring {
|
---|
| 1214 | var integer v_size_interfaces := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces);
|
---|
| 1215 | var integer v_size_ipinterfaceinfo;
|
---|
| 1216 | var integer v_interface := -1;
|
---|
| 1217 | var integer v_ipinterfaceinfo := -1;
|
---|
| 1218 | var charstring v_domainname;
|
---|
| 1219 |
|
---|
| 1220 | for(var integer i := 0; i < v_size_interfaces; i := i+1) {
|
---|
| 1221 | if (match(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[i].interfaceName, pattern "[Ii][Ss][Cc]")){
|
---|
| 1222 | v_interface := i;
|
---|
| 1223 | }
|
---|
| 1224 | }
|
---|
| 1225 | if (v_interface > -1) {
|
---|
| 1226 | v_size_ipinterfaceinfo := sizeof(PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo);
|
---|
| 1227 | for(var integer i := 0; i < v_size_ipinterfaceinfo; i := i+1) {
|
---|
| 1228 | v_domainname := PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[i].domainName;
|
---|
| 1229 | if (match(substr(v_domainname, 0, 2), pattern "[Aa][Ss]")
|
---|
| 1230 | or match(substr(v_domainname, 2, 2), pattern "[Aa][Ss]")
|
---|
| 1231 | or (lengthof(v_domainname) >= 11 and match(substr(v_domainname, 9, 2), pattern "[Aa][Ss]"))) {
|
---|
| 1232 | v_ipinterfaceinfo := i;
|
---|
| 1233 | }
|
---|
| 1234 | }
|
---|
| 1235 | } else {
|
---|
| 1236 | log ("AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1237 | return "AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1238 | }
|
---|
| 1239 | if (v_ipinterfaceinfo > -1) {
|
---|
| 1240 | return PX_PRODUCTS[p_ProductIdx].monitorInterfaces[v_interface].interfaceInfo.IpInterfaceInfo[v_ipinterfaceinfo].IpAddress;
|
---|
| 1241 | } else {
|
---|
| 1242 | log ("AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.");
|
---|
| 1243 | return "AS of " & PX_PRODUCTS[p_ProductIdx].productName & " not found.";
|
---|
| 1244 | }
|
---|
| 1245 | }
|
---|
| 1246 |
|
---|
| 1247 |
|
---|
| 1248 | group interComponent {
|
---|
| 1249 | /**
|
---|
| 1250 | * @desc
|
---|
| 1251 | * This function waits for a sip message send from a given monitor
|
---|
| 1252 | * component to mtc.
|
---|
| 1253 | * @param p_monitor Reference of Interface Monitor component
|
---|
| 1254 | * @param p_msg The Sip message
|
---|
| 1255 | */
|
---|
| 1256 | function f_getSipMsgFromMonitor(InterfaceMonitor p_monitor, out SipMessage p_msg) runs on ImsTestCoordinator {
|
---|
| 1257 | timer t_local := PX_MAX_MSG_WAIT;
|
---|
| 1258 | t_local.start;
|
---|
| 1259 | alt {
|
---|
| 1260 | []icpPort.receive (SipMessage:?) /*from p_monitor*/ -> value p_msg {
|
---|
| 1261 | t_local.stop;
|
---|
| 1262 | setverdict(pass, self, "***f_getMsgFromMonitor: SIP message received***");
|
---|
| 1263 | }
|
---|
| 1264 | []t_local.timeout {
|
---|
| 1265 | setverdict(fail, self, "***f_getMsgFromMonitor: SIP message not received***");
|
---|
| 1266 | }
|
---|
| 1267 | }
|
---|
| 1268 | }
|
---|
| 1269 | }
|
---|
| 1270 |
|
---|
| 1271 | group altsteps {
|
---|
| 1272 |
|
---|
| 1273 | altstep a_default(in charstring p_TP) runs on ImsInterfaceMonitor {
|
---|
| 1274 | [] dPort.receive(Request:?) {
|
---|
| 1275 | log(self, "### a_default: Request default for " & p_TP );
|
---|
| 1276 | repeat;
|
---|
| 1277 | }
|
---|
| 1278 | [] dPort.receive(Response:?) {
|
---|
| 1279 | log(self, "### a_default: Response default for " & p_TP );
|
---|
| 1280 | repeat;
|
---|
| 1281 | }
|
---|
| 1282 | [] dPort.receive {
|
---|
| 1283 | log(self, "*** a_default: Received/ignored unexpected message when waiting for message complying to " & p_TP );
|
---|
| 1284 | //setverdict(fail, self, "### YANN: If execution is here, this means that the message was not properly decoded due to sip/sdp-codets exception, check MMagic logs");
|
---|
| 1285 | //stop; // YANN: If execution is here, this means that the message was not properly decoded
|
---|
| 1286 | repeat;
|
---|
| 1287 | }
|
---|
| 1288 | }
|
---|
| 1289 |
|
---|
| 1290 | /**
|
---|
| 1291 | * @desc This altstep add one alternative checking for a very specifc SIP request.
|
---|
| 1292 | If it matches then the conformance verdict is set to requested verdict
|
---|
| 1293 | * @param p_message The expected SIP request
|
---|
| 1294 | * @param p_verdict Verdict to be used in case of match
|
---|
| 1295 | * @param p_tpId The test purpose identifier
|
---|
| 1296 | * * @param p_forwardMtc indicates if the received request should be forwarded to mtc
|
---|
| 1297 | */
|
---|
| 1298 | altstep a_receive_sipRequest(
|
---|
| 1299 | in template Request p_message,
|
---|
| 1300 | in verdicttype p_verdict,
|
---|
| 1301 | in charstring p_tpId,
|
---|
| 1302 | in boolean p_forwardMtc,
|
---|
| 1303 | in boolean p_checkMessage
|
---|
| 1304 | ) runs on ImsInterfaceMonitor {
|
---|
| 1305 | var Request v_message;
|
---|
| 1306 | [not p_checkMessage] dPort.receive(p_message) -> value v_message {
|
---|
| 1307 | f_setConformanceVerdict(p_verdict, "***a_receive_sipRequest: Received expected SIP request complying to " & p_tpId & " on interface " & vc_interfaceName & " ***");
|
---|
| 1308 | if(p_forwardMtc) {
|
---|
| 1309 | var SipMessage v_msg;
|
---|
| 1310 | v_msg.request := v_message;
|
---|
| 1311 | log("### Forwarding message to MTC");
|
---|
| 1312 | icpPort.send(v_msg);
|
---|
| 1313 | }
|
---|
| 1314 | }
|
---|
| 1315 | [p_checkMessage] dPort.check(receive(p_message) -> value v_message) {
|
---|
| 1316 | f_setConformanceVerdict(p_verdict, "***a_receive_sipRequest: Checked expected SIP request complying to " & p_tpId & " on interface " & vc_interfaceName & " ***");
|
---|
| 1317 | if(p_forwardMtc) {
|
---|
| 1318 | var SipMessage v_msg;
|
---|
| 1319 | v_msg.request := v_message;
|
---|
| 1320 | log("### Forwarding message to MTC");
|
---|
| 1321 | icpPort.send(v_msg);
|
---|
| 1322 | }
|
---|
| 1323 | }
|
---|
| 1324 | }
|
---|
| 1325 |
|
---|
| 1326 | /**
|
---|
| 1327 | * @desc This altstep add one alternative checking for a very specifc SIP response.
|
---|
| 1328 | If it matches then the conformance verdict is set to requested verdict
|
---|
| 1329 | * @param p_message The expected SIP response
|
---|
| 1330 | * @param p_verdict Verdict to be used in case of match
|
---|
| 1331 | * @param p_tpId The test purpose identifier
|
---|
| 1332 | * @param p_forwardMtc indicates if the received reponse should be forwarded to mtc
|
---|
| 1333 | */
|
---|
| 1334 | altstep a_receive_sipResponse(
|
---|
| 1335 | in template Response p_message,
|
---|
| 1336 | in verdicttype p_verdict,
|
---|
| 1337 | in charstring p_tpId,
|
---|
| 1338 | in boolean p_forwardMtc,
|
---|
| 1339 | in boolean p_checkMessage
|
---|
| 1340 | ) runs on ImsInterfaceMonitor {
|
---|
| 1341 | var Response v_message;
|
---|
| 1342 | [not p_checkMessage] dPort.receive(p_message) -> value v_message {
|
---|
| 1343 | f_setConformanceVerdict(p_verdict, "***a_receive_sipResponse: Received expected SIP request complying to " & p_tpId & " on interface " & vc_interfaceName & " ***");
|
---|
| 1344 | if(p_forwardMtc) {
|
---|
| 1345 | var SipMessage v_msg;
|
---|
| 1346 | v_msg.response := v_message;
|
---|
| 1347 | icpPort.send(v_msg);
|
---|
| 1348 | }
|
---|
| 1349 | }
|
---|
| 1350 | [p_checkMessage] dPort.check(receive(p_message) -> value v_message) {
|
---|
| 1351 | f_setConformanceVerdict(p_verdict, "***a_receive_sipResponse: Checked expected SIP request complying to " & p_tpId & " on interface " & vc_interfaceName & " ***");
|
---|
| 1352 | if(p_forwardMtc) {
|
---|
| 1353 | var SipMessage v_msg;
|
---|
| 1354 | v_msg.response := v_message;
|
---|
| 1355 | icpPort.send(v_msg);
|
---|
| 1356 | }
|
---|
| 1357 | }
|
---|
| 1358 | }
|
---|
| 1359 |
|
---|
| 1360 | }// end group
|
---|
| 1361 |
|
---|
| 1362 | function f_setInterfaceNameOnComponent(charstring p_name) runs on ImsInterfaceMonitor{
|
---|
| 1363 | vc_interfaceName := p_name;
|
---|
| 1364 | }
|
---|
| 1365 |
|
---|
| 1366 | group general_td_functions {
|
---|
| 1367 |
|
---|
| 1368 | /**
|
---|
| 1369 | * @desc
|
---|
| 1370 | * Generic function for reading and verifying messages on the
|
---|
| 1371 | * interface associated to the ImsInterfaceMonitor instance. This
|
---|
| 1372 | * functions works as follows: First, messages are skipped according
|
---|
| 1373 | * to the p_skip template. The p_skip template contains a message
|
---|
| 1374 | * template and a counter indicating the number of received messages
|
---|
| 1375 | * matching the message template to be skipped. If not enough
|
---|
| 1376 | * messages matching the message template arrive at the interface,
|
---|
| 1377 | * the function fails after timout. Next, messages are consumed from
|
---|
| 1378 | * the interface and matched against the p_passCriteria template
|
---|
| 1379 | * list and the p_failCriteria template list. The function
|
---|
| 1380 | * terminates with pass if a message is received matching a
|
---|
| 1381 | * pass-template and terminates with fail if a fail-template
|
---|
| 1382 | * matches. Matching against pass-templates occurs bevor matching
|
---|
| 1383 | * agains fail-templates. If neither pass-templates nor
|
---|
| 1384 | * fail-templates match, then the functions continues reading from
|
---|
| 1385 | * the interface until a match arises, or timeout. The timeout value
|
---|
| 1386 | * is given by PX_MAX_MSG_WAIT [5.0 seconds, FFS]. Finally, if
|
---|
| 1387 | * p_forwardMtc is set to true, the last received message is stored
|
---|
| 1388 | * to be fetched and used later by the main test component. Some
|
---|
| 1389 | * special use cases: - Set p_skip.skipCounter to 0 to avoid
|
---|
| 1390 | * skipping, i.e. no skippin - Set p_skip.skipCounter to 0 and
|
---|
| 1391 | * p_skip.skipMessage to ? to skip exactly one message of any type
|
---|
| 1392 | * will be skipped. - If the list of fail-templates is empty, then
|
---|
| 1393 | * the function will wait for the first message maching a
|
---|
| 1394 | * pass-message, or fail after timeout.
|
---|
| 1395 | * @param p_passCriteria list of message templates which lead to pass
|
---|
| 1396 | * @param p_failCriteria list of message templates which lead to fail
|
---|
| 1397 | * @param p_skip
|
---|
| 1398 | * Indicate how many messages from a specific sip template should be
|
---|
| 1399 | * skipped prior to checking
|
---|
| 1400 | * @param p_tpId The Test Purpose identifier
|
---|
| 1401 | * @param p_forwardMtc
|
---|
| 1402 | * indicate if the received Sip message should be forwarded to the
|
---|
| 1403 | * mtc
|
---|
| 1404 | * @param p_checkMessage
|
---|
| 1405 | * indicate if the incomming message should only be checked
|
---|
| 1406 | * (port.check) or consumed (port.receive). The check operation
|
---|
| 1407 | * allows read access to the top element of incoming port queues
|
---|
| 1408 | * without removing the top element from the queue.
|
---|
| 1409 | */
|
---|
| 1410 | function f_imsIot_receive(
|
---|
| 1411 | in template SipMessageList p_passCriteria,
|
---|
| 1412 | in template SipMessageList p_failCriteria,
|
---|
| 1413 | in template SkipType p_skip,
|
---|
| 1414 | in charstring p_tpId,
|
---|
| 1415 | in boolean p_forwardMtc,
|
---|
| 1416 | in boolean p_checkMessage
|
---|
| 1417 | ) runs on ImsInterfaceMonitor {
|
---|
| 1418 | var integer v_size := sizeof(p_failCriteria);
|
---|
| 1419 | var DefaultList v_defaultArray;
|
---|
| 1420 | var integer i := 0;
|
---|
| 1421 | var integer v_size_ai := sizeof(PX_AVAILABLE_INTERFACES);
|
---|
| 1422 |
|
---|
| 1423 | log ("### f_imsIot_receive: passCriteria=", p_passCriteria);
|
---|
| 1424 | log ("### f_imsIot_receive: failCriteria=", p_failCriteria);
|
---|
| 1425 |
|
---|
| 1426 | // check if interface is available
|
---|
| 1427 | for(i := 0; i < v_size_ai; i := i+1) {
|
---|
| 1428 | if (PX_AVAILABLE_INTERFACES[i].interfaceName == vc_interfaceName) {
|
---|
| 1429 | if (PX_AVAILABLE_INTERFACES[i].available == false) {
|
---|
| 1430 | setverdict(inconc, self, "******f_imsIot_receive: Interface " & PX_AVAILABLE_INTERFACES[i].interfaceName & " not available and is not evaluated******" );
|
---|
| 1431 | } else { // Interface is available
|
---|
| 1432 | v_defaultArray[0] := activate(a_default(p_tpId));
|
---|
| 1433 | f_activateImsSipDefaults(v_defaultArray, 1, p_failCriteria, fail, p_tpId, p_forwardMtc, p_checkMessage);
|
---|
| 1434 | f_activateImsSipDefaults(v_defaultArray, v_size + 1, p_passCriteria, pass, p_tpId, p_forwardMtc, p_checkMessage);
|
---|
| 1435 | f_gen_receive(p_tpId, p_skip);
|
---|
| 1436 |
|
---|
| 1437 | for (i := 0; i < sizeof(v_defaultArray); i := i + 1) {
|
---|
| 1438 | deactivate(v_defaultArray[i]);
|
---|
| 1439 | }
|
---|
| 1440 | }
|
---|
| 1441 | break; // Exit loop
|
---|
| 1442 | }
|
---|
| 1443 | } // 'for' loop
|
---|
| 1444 | }
|
---|
| 1445 |
|
---|
| 1446 | /**
|
---|
| 1447 | * @desc This function implements skipping of messages as well as timeout handling.
|
---|
| 1448 | * Prior to calling this function the message to be cheked for should be added
|
---|
| 1449 | * as defaults.
|
---|
| 1450 | * This function is independent of a specific interface component.
|
---|
| 1451 | * @param p_tpId The Test Purpose identifier
|
---|
| 1452 | * @param p_skipCount Indicate how many messages should be skipped prior to checking
|
---|
| 1453 | */
|
---|
| 1454 | function f_gen_receive(
|
---|
| 1455 | in charstring p_tpId,
|
---|
| 1456 | in template SkipType p_skip
|
---|
| 1457 | ) runs on ImsInterfaceMonitor {
|
---|
| 1458 | var integer skipCount := valueof(p_skip.skipCount);
|
---|
| 1459 | tc_wait.start;
|
---|
| 1460 |
|
---|
| 1461 | alt {
|
---|
| 1462 | // preamble (consume prior messages)
|
---|
| 1463 | [skipCount > 0 and ischosen(p_skip.skipMessage.request)] dPort.receive (p_skip.skipMessage.request) {
|
---|
| 1464 | skipCount := skipCount - 1;
|
---|
| 1465 | log("***f_gen_receive: Message skipped (intentionally) when checking for " & p_tpId & " at interface " & vc_interfaceName & " ****");
|
---|
| 1466 | repeat;
|
---|
| 1467 | }
|
---|
| 1468 | [skipCount > 0 and ispresent(p_skip.skipMessage) and ischosen(p_skip.skipMessage.response)] dPort.receive (p_skip.skipMessage.response) {
|
---|
| 1469 | skipCount := skipCount - 1;
|
---|
| 1470 | log("***f_gen_receive: Message skipped (intentionally) when checking for " & p_tpId & " at interface " & vc_interfaceName & " ****");
|
---|
| 1471 | repeat;
|
---|
| 1472 | }
|
---|
| 1473 | [] tc_wait.timeout {
|
---|
| 1474 | f_setConformanceVerdict(inconc, "***f_gen_receive: Timer tc_wait expired when waiting for incoming message in " & p_tpId & " at interface " & vc_interfaceName & " ****");
|
---|
| 1475 | }
|
---|
| 1476 | }
|
---|
| 1477 |
|
---|
| 1478 | }
|
---|
| 1479 |
|
---|
| 1480 | /**
|
---|
| 1481 | * @desc Activates for each entry in a expected IMS SIP message list a default
|
---|
| 1482 | * for receiving that message and setting the verdict as desired
|
---|
| 1483 | * @param p_default Reference to default array where deaults are to be added
|
---|
| 1484 | * @param p_startIdx Index into default array after which references for
|
---|
| 1485 | * defaults created in this function should be added
|
---|
| 1486 | * @param p_list List of expected messages to be checked in default
|
---|
| 1487 | * @param p_verdict Verdict to be set in case the incoming message matches
|
---|
| 1488 | any of the expcted messages
|
---|
| 1489 | * @param p_tpId Test Purpose identifir
|
---|
| 1490 | */
|
---|
| 1491 | function f_activateImsSipDefaults(
|
---|
| 1492 | inout DefaultList p_default,
|
---|
| 1493 | in integer p_startIdx,
|
---|
| 1494 | in template SipMessageList p_list,
|
---|
| 1495 | in verdicttype p_verdict,
|
---|
| 1496 | in charstring p_tpId,
|
---|
| 1497 | in boolean p_forwardMtc,
|
---|
| 1498 | in boolean p_checkMessage
|
---|
| 1499 | ) runs on ImsInterfaceMonitor {
|
---|
| 1500 | var integer v_size := sizeof(p_list);
|
---|
| 1501 | var integer v_idx := p_startIdx;
|
---|
| 1502 |
|
---|
| 1503 | for (var integer i := 0; i < v_size; i := i + 1) {
|
---|
| 1504 | if (ischosen(p_list[i].request)) {
|
---|
| 1505 | p_default[v_idx] := activate(
|
---|
| 1506 | a_receive_sipRequest(p_list[i].request,p_verdict, p_tpId, p_forwardMtc, p_checkMessage)
|
---|
| 1507 | );
|
---|
| 1508 | } else {
|
---|
| 1509 | p_default[v_idx] := activate(
|
---|
| 1510 | a_receive_sipResponse(p_list[i].response,p_verdict, p_tpId, p_forwardMtc, p_checkMessage)
|
---|
| 1511 | );
|
---|
| 1512 | }
|
---|
| 1513 | v_idx := v_idx + 1;
|
---|
| 1514 | }
|
---|
| 1515 | //log ("### f_activateImsSipDefaults: ended");
|
---|
| 1516 | }
|
---|
| 1517 |
|
---|
| 1518 | }//end group
|
---|
| 1519 |
|
---|
| 1520 |
|
---|
| 1521 | group misc {
|
---|
| 1522 |
|
---|
| 1523 | /**
|
---|
| 1524 | * @desc
|
---|
| 1525 | * This function generate a charstring with a given length used as
|
---|
| 1526 | * message body.
|
---|
| 1527 | * @param p_length length of the message body
|
---|
| 1528 | * @return message body (charstring)
|
---|
| 1529 | */
|
---|
| 1530 | function f_getMessageBody(in integer p_length) return charstring {
|
---|
| 1531 | var charstring v_rtn := "";
|
---|
| 1532 |
|
---|
| 1533 | for(var integer i := 0; i < p_length; i:=i+1) {
|
---|
| 1534 | v_rtn := v_rtn & "a";
|
---|
| 1535 | }
|
---|
| 1536 |
|
---|
| 1537 | return v_rtn;
|
---|
| 1538 | }
|
---|
| 1539 |
|
---|
| 1540 | function f_getContactAddr(in Contact contact) return SipUrl {
|
---|
| 1541 | var SipUrl v_SipUrl;
|
---|
| 1542 |
|
---|
| 1543 | var ContactAddress addr := contact.contactBody.contactAddresses[0];
|
---|
| 1544 |
|
---|
| 1545 | if (ischosen (addr.addressField.nameAddr)) {
|
---|
| 1546 | v_SipUrl := addr.addressField.nameAddr.addrSpec;
|
---|
| 1547 | } else {
|
---|
| 1548 | v_SipUrl := addr.addressField.addrSpecUnion;
|
---|
| 1549 | }
|
---|
| 1550 |
|
---|
| 1551 | return (v_SipUrl);
|
---|
| 1552 | }
|
---|
| 1553 |
|
---|
| 1554 | }
|
---|
| 1555 |
|
---|
| 1556 | } |
---|