Skip to content
LibNg112_Templates.ttcn 14.1 KiB
Newer Older
Garcia's avatar
Garcia committed
module LibNg112_Templates {
Garcia's avatar
Garcia committed
  
  // LibCommon
  import from LibCommon_DataStrings all;

  // LibSip
  import from LibSip_SIPTypesAndValues all;
  import from LibSip_Templates all;
  import from LibSip_Steps all;
  import from LibSip_PIXITS all;
  import from LibSip_XMLTypes all;
  import from LibSip_MessageBodyTypes all;
  import from LibSip_Common all;

  // LibIms
  import from LibIms_SIPTypesAndValues all;
  import from LibIms_Templates all;

  // LibXMLTypes
  import from XSD all;
  import from urn_ietf_params_xml_ns_pidf language "XSD" all
  with {
    extension "File:../xsd/pidf.xsd";
  }
  
  group ng112_invite {
    
    /**
     * @desc INVITE message exchanged at Mw
     * @param p_requestUri
     * @param p_callId
     * @param p_cSeq
     * @param p_from
     * @param p_to
     * @param p_via
     * @param p_contact
     * @param p_require
     * @param p_route
     * @param p_recordRoute
     * @param p_supported
     * @param p_pChargingVector
     * @param p_mb
     */
    template(value) INVITE_Request m_INVITE_Request_IMS_Ng112(
                                                              template(value) SipUrl p_requestUri,
                                                              template(value) CallId p_callId,
                                                              template(value) CSeq p_cSeq,
                                                              template(value) From p_from,
                                                              template(value) To p_to,
                                                              template(value) Via p_via,
                                                              template(value) LibSip_SIPTypesAndValues.Contact p_contact,
                                                              template(omit) Require p_require := omit,
                                                              template(omit) Route p_route := omit,
                                                              template(omit) RecordRoute p_recordRoute := omit,
                                                              template(omit) Supported p_supported := omit,
                                                              template(omit) PChargingVector p_pChargingVector := omit,
                                                              template(value) MessageBody p_mb,
                                                              template(omit) Geolocation p_geolocation := omit,
                                                              template(omit) GeolocationRouting p_geolocationRouting := omit,
                                                              template(omit) UserAgent p_userAgent := omit
                                                              ) modifies m_INVITE_Request_IMS := {
      msgHeader := {
        allow := { fieldName := ALLOW_E, methods := { "INVITE", "ACK", "BYE", "MESSAGE", "OPTIONS", "CANCEL" } },
        geolocation := p_geolocation,
        geolocationRouting := p_geolocationRouting,
        userAgent := p_userAgent
      }
    } // End of template m_INVITE_Request_IMS_Ng112
    
    template INVITE_Request mw_INVITE_Request_IMS_Ng112(
                                                                 template(present) SipUrl p_requestUri := ?,
                                                                 template(present) CallId p_callId := ?,
                                                                 template(present) CSeq p_cSeq := ?,
                                                                 template(present) From p_from := ?,
                                                                 template(present) To p_to := ?,
                                                                 template(present) Via p_via := ?,
                                                                 template(present) LibSip_SIPTypesAndValues.Contact p_contact := ?,
                                                                 template Require p_require := *,
                                                                 template Route p_route := *,
                                                                 template RecordRoute p_recordRoute := *,
                                                                 template Supported p_supported := *,
                                                                 template PChargingVector p_pChargingVector := *,
                                                                 template(present) MessageBody p_mb := ?,
                                                                 template Geolocation p_geolocation := *,
                                                                 template GeolocationRouting p_geolocationRouting := *,
                                                                 template UserAgent p_userAgent := *
                                                                 ) modifies mw_INVITE_Request_Base := {
      msgHeader := {
        geolocation := p_geolocation,
        geolocationRouting := p_geolocationRouting,
        userAgent := p_userAgent
      }
    } // End of template mw_INVITE_Request_IMS_Ng112
    
    template(omit) INVITE_Request m_INVITE_Request_IMS_CallInfo_Ng112(
                                                                       template(value) SipUrl p_requestUri ,
                                                                       template(value) CallId p_callId ,
                                                                       template(value) CSeq p_cSeq ,
                                                                       template(value) From p_from ,
                                                                       template(value) To p_to ,
                                                                       template(value) Via p_via ,
                                                                       template(value) LibSip_SIPTypesAndValues.Contact p_contact ,
                                                                       template(omit) Require p_require := omit,
                                                                       template(omit) Route p_route := omit,
                                                                       template(omit) RecordRoute p_recordRoute := omit,
                                                                       template(omit) Supported p_supported := omit,
                                                                       template(omit) PChargingVector p_pChargingVector := omit,
                                                                       template(value) MessageBody p_mb ,
                                                                       template(omit) Geolocation p_geolocation := omit,
                                                                       template(omit) GeolocationRouting p_geolocationRouting := omit,
                                                                       template(omit) UserAgent p_userAgent := omit,
                                                                       template(omit) CallInfo p_callInfo := omit
                                                                       ) modifies m_INVITE_Request_IMS_Ng112 := {
      msgHeader := {
        callInfo := p_callInfo
      }
    } // End of template m_INVITE_Request_IMS_CallInfo_Ng112
    
    template INVITE_Request mw_INVITE_Request_IMS_CallInfo_Ng112(
                                                                       template(present) SipUrl p_requestUri := ?,
                                                                       template(present) CallId p_callId := ?,
                                                                       template(present) CSeq p_cSeq := ?,
                                                                       template(present) From p_from := ?,
                                                                       template(present) To p_to := ?,
                                                                       template(present) Via p_via := ?,
                                                                       template(present) LibSip_SIPTypesAndValues.Contact p_contact := ?,
                                                                       template Require p_require := *,
                                                                       template Route p_route := *,
                                                                       template RecordRoute p_recordRoute := *,
                                                                       template Supported p_supported := *,
                                                                       template PChargingVector p_pChargingVector := *,
                                                                       template(present) MessageBody p_mb := ?,
                                                                       template Geolocation p_geolocation := *,
                                                                       template GeolocationRouting p_geolocationRouting := *,
                                                                       template UserAgent p_userAgent := *,
                                                                       template CallInfo p_callInfo := *
                                                                       ) modifies mw_INVITE_Request_IMS_Ng112 := {
      msgHeader := {
        callInfo := p_callInfo
      }
    } // End of template mw_INVITE_Request_IMS_CallInfo_Ng112
    
  } // End of group ng112_invite
  
  group ng112_message {
    
      template(value) MESSAGE_Request m_MESSAGE_Request_IMS_Ng112(
                                                                  template(value) SipUrl p_requestUri,
                                                                  template(value) CallId p_callId,
                                                                  template(value) CSeq p_cSeq,
                                                                  template(value) From p_from,
                                                                  template(value) To p_to,
                                                                  template(value) Via p_via,
                                                                  template(omit) Require p_require := omit,
                                                                  template(omit) Route p_route := omit,
                                                                  template(omit) Supported p_supported := omit,
                                                                  template(value) MessageBody p_mb
                                                                  ) modifies m_MESSAGE_Request_MBody_UE := {
          msgHeader := {
            contentLength := m_contentLength(f_MessageBodyLength(p_mb)),
            contentType := m_contentType(c_plainText),
            pAccessNetworkInfo := m_pAccessNetworkInfo_IEEE_11a,
            require := p_require,
            route := p_route,
            supported := p_supported
          },
          messageBody := p_mb
      } // End of template m_MESSAGE_Request_IMS_Ng112
      
  } // End of group ng112_message
  group routes {

    template(value) Route m_route(
                                  template(value) RouteBody_List p_routeBody
                                  ) := {
      fieldName := ROUTE_E,
      routeBody := p_routeBody
    } // End of template m_route
  } // End of group routes
  
  group geolocation {
    
    template (omit) Geolocation m_geolocation(
                                              in template (value) SipUrl p_addrSpec,
                                              in template (omit) SemicolonParam_List p_geolocParam := omit
                                              ) := {
      fieldName := GEOLOCATION_E,
      addrSpec := p_addrSpec,
      geolocParam := p_geolocParam
    } // End of template m_geolocation
    
    template Geolocation mw_geolocation(
                                        template (present) SipUrl p_addrSpec := ?,
                                        template SemicolonParam_List p_geolocParam := *
                                        ) := {
      fieldName := GEOLOCATION_E,
      addrSpec := p_addrSpec,
      geolocParam := p_geolocParam
    } // End of template mw_geolocation
    
  }

  template (omit) CallInfo m_call_info(
                                       in template (value) charstring p_url,
                                       in template (omit) SemicolonParam_List p_infoParams := omit
                                       ) := {
    fieldName := CALL_INFO_E,
    callInfoBody := {
      {
        url := p_url,
        infoParams := p_infoParams
      }
    }
  } // End of template m_call_info
    

  
  group ng112_presence {
    
    template (value) Presence m_presence(
                                         in template (value) XSD.AnyURI p_entity,
                                         in template (value) Presence.tuple_list p_tuple_list := { }
                                         ) := {
      entity := "pres:alice@atlanta.example.com",
      tuple_list := p_tuple_list,
      note_list := { },
      elem_list := { }
/*                    "<dm:device xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:gp=\"urn:ietf:params:xml:ns:pidf:geopriv10\" xmlns:gml=\"http://www.opengis.net/gml\" xmlns:gbp=\"urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy\" id=\"target123-1\">
      <gp:geopriv>
        <gp:location-info>
          <gml:location>
            <gml:Point srsName=\"urn:ogc:def:crs:EPSG::4326\">
              <gml:pos>32.86726 -97.16054</gml:pos>
            </gml:Point>
         </gml:location>
        </gp:location-info>
        <gp:usage-rules>
          <gbp:retransmission-allowed>false
          </gbp:retransmission-allowed>
          <gbp:retention-expiry>2010-11-14T20:00:00Z
          </gbp:retention-expiry>
        </gp:usage-rules>
        <gp:method>802.11</gp:method>
      </gp:geopriv>
      <dm:deviceID>mac:1234567890ab</dm:deviceID>
      <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
    </dm:device>"
                    }*/
                  
    } // End of template m_presence
    
  }
  
Garcia's avatar
Garcia committed
  
Garcia's avatar
Garcia committed
} // End of module LibNg112_Templates