A composition may be stopped at any point using the <halt>
element.
IN halt instructions
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
|
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.
|
User Error |
Stop further composition evaluation and return a User Error response. The error response code may be
|
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.
|
Release |
Stop further composition evaluation and return a ReleaseCall or ReleaseSMS response. The SIS releases the call or SMS, with the specified cause code.
|
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
|
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
|
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
|
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.
|
No Response |
Stop further composition evaluation. No response is sent. The value of the
|
SIP halt instructions
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
|
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
|
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>