A composition may be stopped at any point using the <halt> element.

This tells the SIS to stop evaluating the composition any further and continue with the current call using only the services invoked so far. A <halt> element may also specify specific response behaviour to perform, as described below for IN and SIP.

IN halt instructions

Note

For IN, if the halt statement includes a response, the response element defines whether or not the response should be recorded in statistics as a success or failure outcome. Where appropriate, the element also defines how the SIS terminates the dialog with the dialog-termination parameter. Valid values for this parameter are:

  • none — The SIS will not terminate the dialog.

  • close — The SIS sends the response within a TC_END (with basic end).

  • user-abort — The SIS sends the response within a TC_CONTINUE, then tears down the dialog with a TC_U_ABORT.

Warning The composition output interceptor (if defined for the composition) processes any response the halt instruction generates, before the SIS sends the final response out on the network.
Halt instruction Description and example
none

The default halt action for IN is to send a response based on the outcome of any composition services already invoked.

<halt/>
User Error

Stop further composition evaluation and return a User Error response. The error response code may be unexpected-data-value, missing-parameter, or missing-customer-record.

<in:halt record-as-reject="true">
    <in:user-error reason="missing-customer-record" dialog-termination="user-abort"/>
</in:halt>
Continue

Stop further composition evaluation and return a Continue or ContinueSMS response. The SIS resumes the dialog state model and the call or SMS continues in the network using default call handling.

<in:halt record-as-reject="false">
    <in:continue dialog-termination="close"/>
</in:halt>
Release

Stop further composition evaluation and return a ReleaseCall or ReleaseSMS response. The SIS releases the call or SMS, with the specified cause code.

<in:halt record-as-reject="true">
    <in:release cause-code="31" dialog-termination="close"/>
</in:halt>
Connect

Stop further composition evaluation and return a Connect response. The SIS redirects the call to the specified destination routing address, described by an XML <called-party-number> element as specified in [1 Pre-defined Datatypes]. This halt instruction can only be used with initial triggers on call control dialogs.

<in:halt record-as-reject="false">
    <in:connect dialog-termination="close">
        <called-party-number
            nature="NATIONAL"
            routing-to-internal-network-number="ALLOWED"
            numbering-plan="ISDN"
            address="123456789"/>
    </in:connect>
</in:halt>
ConnectSMS

Stop further composition evaluation and return a ConnectSMS response. The SIS redirects the SMS to the specified destination subscriber number, described by an XML <called-party-bcd-number> element as specified in [1 Pre-defined Datatypes]. This halt instruction can only be used with initial triggers on CAPv3 or CAPv4 SMS dialogs.

<in:halt record-as-reject="false">
    <in:connect-sms dialog-termination="close">
        <called-party-bcd-number
            number-type="NATIONAL"
            numbering-plan="ISDN"
            address="987654321"/>
    </in:connect-sms>
</in:halt>
Redirect

Stop further composition evaluation and return a Connect or ConnectSMS response. The SIS uses its configured redirect behaviour to redirect the call by issuing a Connect or ConnectSMS with the redirect prefix (from either a specified constant value or a variable) in the destination routing address or destination subscriber number.

<in:halt record-as-reject="false">
    <in:redirect prefix-value="9876" dialog-termination="close"/>
</in:halt>
Relay

Stop further composition evaluation and return a Relay response. A dialog is opened towards the target external platform and the initial request is relayed to it, after which the incoming and relayed dialogs are terminated locally. Further communication on the dialog continues directly between the dialog originator and the external platform. A nested terminate clause must be specified for this option which is invoked in the event the relay fails, eg. an outgoing dialog cannot be created, a TC_CONTINUE has already been sent on the incoming dialog, etc.

<in:halt record-as-reject="false">
    <in:relay target="some-relay-target">
        <in:on-failure record-as-reject="true">
            <in:release cause-code="31" dialog-termination="close"/>
        </in:on-failure>
    </in:relay>
</in:halt>
No Response

Stop further composition evaluation. No response is sent. The value of the dialog-termination attribute determines what the SIS will do with the dialog.

<in:halt record-as-reject="true">
    <in:no-response dialog-termination="user-abort"/>
</in:halt>

SIP halt instructions

Warning If a halt forwards the request (the default halt behaviour), the SIS passes the request to the composition output interceptor (if defined for the composition) before sending it out on the network. The SIS does not invoke the composition output interceptor when the halt rejects the request with an error response.
Halt instruction Description and example
Reject

Stop further composition evaluation and return a Reject response. A reject status code must be specified (in the range 300-699), along with an optional reason phrase. Any number of additional headers may also be included in the response

<sip:halt>
    <sip:reject status-code="503" reason-phrase="Service not available">
        <sip:header name="..." value="..."/>
    </sip:reject>
</sip:halt>
Forward

Stop further composition evaluation and return a Forward response. An optional target URI may be specified. Any number of additional headers may also be included in the response

<sip:halt>
    <sip:forward uri="...">
        <sip:header name="..." value="..."/>
    </sip:forward>
</sip:halt>
Note The default halt action for the SIS for SIP is to send a Forward response to forward the request to the next hop.

Example

In the following example, the SIS stops composition evaluation if a certain parameter is present after invoking the CheckUser service. If the parameter is not present, the Prepay service is also invoked.

<script>
    <invoke service="CheckUser"/>
    <if><present variable="${user.foo}"/>
        <then>
            <halt/>
        </then>
    </if>
    <invoke service="Prepay"/>
</script>
Previous page Next page