You can create new user variables or assign new values to existing variables in an interceptor script block, the same way you can for a composition script block — by using the <assign> element.

Tip
Reassigning IN Signaling Parameters

If the value of any IN signaling parameters are changed in a <service-input-interceptor> block, these changes apply to the current composition service only. They do not carry forward to subsequent service invocations, unless the response from the composition service demands it (for example, if the service response is a function of a modified input parameter).
This behaviour does not apply to SIP.

Example

This example shows a script that invokes one service, changes the ServiceKey parameter of the IN InitialDP trigger event for the second service using an interceptor block, then invokes a third service (using the original service key value).

VIA diagrams

interceptor assign comp
interceptor assign

Script XML

<script>
  <invoke service="VPN"/>
  <invoke service="HomeZone">
    <service-input-interceptor>
      <if>
        <present variable="${initial-dp}"/>
        <then>
          <assign toVariable="${initial-dp.arg.service-key}" value="15"/>
        </then>
      </if>
    </service-input-interceptor>
  </invoke>
  <invoke service="Prepay"/>
</script>
Previous page Next page