/AWS1/IF_CHV=>CREATESIPRULE()¶
About CreateSipRule¶
Creates a SIP rule, which can be used to run a SIP media application as a target for a specific trigger type. For more information about SIP rules, see Managing SIP media applications and rules in the Amazon Chime SDK Administrator Guide.
Method Signature¶
METHODS /AWS1/IF_CHV~CREATESIPRULE
IMPORTING
!IV_NAME TYPE /AWS1/CHVSIPRULENAME OPTIONAL
!IV_TRIGGERTYPE TYPE /AWS1/CHVSIPRULETRIGGERTYPE OPTIONAL
!IV_TRIGGERVALUE TYPE /AWS1/CHVNONEMPTYSTRING OPTIONAL
!IV_DISABLED TYPE /AWS1/CHVNULLABLEBOOLEAN OPTIONAL
!IT_TARGETAPPLICATIONS TYPE /AWS1/CL_CHVSIPRLTGTAPPLICAT00=>TT_SIPRULETGTAPPLICATIONLIST OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_chvcreatesiprulersp
RAISING
/AWS1/CX_CHVACCESSDENIEDEX
/AWS1/CX_CHVBADREQUESTEX
/AWS1/CX_CHVCONFLICTEXCEPTION
/AWS1/CX_CHVFORBIDDENEXCEPTION
/AWS1/CX_CHVRESRCLIMITEXCDEX
/AWS1/CX_CHVSERVICEFAILUREEX
/AWS1/CX_CHVSERVICEUNAVAILEX
/AWS1/CX_CHVTHROTTLEDCLIENTEX
/AWS1/CX_CHVUNAUTHDCLIENTEX
/AWS1/CX_CHVCLIENTEXC
/AWS1/CX_CHVSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/CHVSIPRULENAME /AWS1/CHVSIPRULENAME¶
The name of the SIP rule.
iv_triggertype TYPE /AWS1/CHVSIPRULETRIGGERTYPE /AWS1/CHVSIPRULETRIGGERTYPE¶
The type of trigger assigned to the SIP rule in
TriggerValue, currentlyRequestUriHostnameorToPhoneNumber.
iv_triggervalue TYPE /AWS1/CHVNONEMPTYSTRING /AWS1/CHVNONEMPTYSTRING¶
If
TriggerTypeisRequestUriHostname, the value can be the outbound host name of a Voice Connector. IfTriggerTypeisToPhoneNumber, the value can be a customer-owned phone number in the E164 format. TheSipMediaApplicationspecified in theSipRuleis triggered if the request URI in an incoming SIP request matches theRequestUriHostname, or if theToheader in the incoming SIP request matches theToPhoneNumbervalue.
Optional arguments:¶
iv_disabled TYPE /AWS1/CHVNULLABLEBOOLEAN /AWS1/CHVNULLABLEBOOLEAN¶
Disables or enables a SIP rule. You must disable SIP rules before you can delete them.
it_targetapplications TYPE /AWS1/CL_CHVSIPRLTGTAPPLICAT00=>TT_SIPRULETGTAPPLICATIONLIST TT_SIPRULETGTAPPLICATIONLIST¶
List of SIP media applications, with priority and AWS Region. Only one SIP application per AWS Region can be used.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_chvcreatesiprulersp /AWS1/CL_CHVCREATESIPRULERSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->createsiprule(
it_targetapplications = VALUE /aws1/cl_chvsiprltgtapplicat00=>tt_sipruletgtapplicationlist(
(
new /aws1/cl_chvsiprltgtapplicat00(
iv_awsregion = |string|
iv_priority = 123
iv_sipmediaapplicationid = |string|
)
)
)
iv_disabled = ABAP_TRUE
iv_name = |string|
iv_triggertype = |string|
iv_triggervalue = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_siprule = lo_result->get_siprule( ).
IF lo_siprule IS NOT INITIAL.
lv_nonemptystring = lo_siprule->get_sipruleid( ).
lv_siprulename = lo_siprule->get_name( ).
lv_boolean = lo_siprule->get_disabled( ).
lv_sipruletriggertype = lo_siprule->get_triggertype( ).
lv_nonemptystring = lo_siprule->get_triggervalue( ).
LOOP AT lo_siprule->get_targetapplications( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_nonemptystring = lo_row_1->get_sipmediaapplicationid( ).
lv_sipapplicationpriority = lo_row_1->get_priority( ).
lv_string = lo_row_1->get_awsregion( ).
ENDIF.
ENDLOOP.
lv_iso8601timestamp = lo_siprule->get_createdtimestamp( ).
lv_iso8601timestamp = lo_siprule->get_updatedtimestamp( ).
ENDIF.
ENDIF.