Commit f45aebf8 authored by Bostjan Pintar's avatar Bostjan Pintar
Browse files

BCF changes and new TPs added

parent 330eae9c
Loading
Loading
Loading
Loading
+104 −0
Original line number Diff line number Diff line
/**
 *    @author   ETSI / TTF009
 *    @version  $URL:$
 *              $ID:$
 *    @desc     This module provides the NG112 BCF Steps.
 *    @copyright   ETSI Copyright Notification
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
 *    @see      ETSI TS 103 478, ETSI TS 103 698
 */
module AtsBCF_Steps {
  
  // LibSip
  import from LibSip_SIPTypesAndValues all;
  import from LibSip_SDPTypes all;
  import from LibSip_Steps all;
  import from LibSip_Templates all;
  import from LibSip_Interface all;
  import from LibSip_PIXITS all;
  
  // LibIms
  import from LibIms_SIPTypesAndValues all;
  import from LibIms_Steps all;
  import from LibIms_Templates all;
  import from LibIms_Interface all;
  
  // LibNg112
  import from LibNg112_TypesAndValues all;
  import from LibNg112_Steps all;
  import from LibNg112_Pixits all;
  
  group Constants {
    
    group SdpUserProfileConstants {
      
      const integer c_userProfile_Huawei := 1;
      
    } // End of group SdpUserProfileConstants
    
    
  } // End of group Constants
  
  group globalSteps {
    
    /*
     * 
     * @desc sets user parameters with PIXIT values
     * @param p_user identifies the selected user configuration and location
     * @verdict 
     */
    function f_init_sdp_userprofile(
                                    inout SDP_Message p_loc_SDP,
                                    in integer p_user, // TODO To be removed
                                    in integer p_sdp_user
                                    ) runs on ImsComponent {
      
      select(p_sdp_user){
        case (c_userProfile_UE1atSUThome) { // variant c_userProfile_UE1atSUThome
          p_loc_SDP := valueof(
                               m_SDP_mediaList(
                                               {
                                                 { { c_audio, { 20000, omit}, "RTP/AVP", {"0"} }, omit, omit, omit, omit, omit },
                                                 { { c_video, { 20002, omit}, "RTP/AVP", {"31"} }, omit, omit, omit, omit, omit }
                                               },
                                               vc_userprofile
                                               )
                               );
          vc_sdp_local.origin.user_name := PX_IMS_SUT_UE1_PUBLIC_USER;
          vc_sdp_local.origin.session_id := "2890844526";
          vc_sdp_local.origin.session_version := "2890842807";
          vc_sdp_local.origin.addr := "atlanta.example.com";
          vc_sdp_local.session_name := "c_userProfile_UE1atSUThome";
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"0", {"PCMU", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"31", {"H261", "90000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { sendrecv := { } } );
        } // c_userProfile_UE1atSUThome
        case (c_userProfile_Huawei) { //variant c_userProfile_Huawei
          p_loc_SDP := valueof(
                               m_SDP_mediaList(
                                               {
                                                 { { c_audio, { 10500, omit}, "RTP/AVP", {"8", "0", "18", "4", "96", "97"} }, omit, omit, omit, omit, omit }
                                               },
                                               vc_userprofile
                                               )
                               );
          vc_sdp_local.origin.user_name := "FAST_V2R1";
          vc_sdp_local.origin.session_id := "2006";
          vc_sdp_local.origin.session_version := "2007";
          vc_sdp_local.origin.addr := "155.11.49.64";
          vc_sdp_local.session_name := "-";
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"0", {"PCMU", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"18", {"G729", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"4", {"G723", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"96", {"AMR", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { rtpmap := {"97", {"telephone-event", "8000", omit} } } );
          f_append_media_attribute(vc_sdp_local, { fmtp := { "97", { unstructured := "0-15" } } } );
          f_append_media_attribute(vc_sdp_local, { sendrecv := { } } );
        } // c_userProfile_Huawei
      } // End of 'select' statement

      log("<<< f_init_sdp_userprofile: p_loc_SDP= ", p_loc_SDP);
    } // End of function f_init_sdp_userprofile
    
  } // End of group globalSteps
} // End of module AtsBCF_Steps