<Block>

The <Block> element is a chunk of InboundXML that can only be executed by the <Goto> and <Gosub> tags. A <Block> element can be thought of as a container for other elements.

đŸ“˜

Note

The <Block> element is used with and related to both <Goto> and <Gosub>.

Element Attributes

Attribute

Description

label required

The name/identifier that labels a <Block> element. The <Goto> and <Gosub> elements will jump to and execute the InboundXML for this label.
Valid value: a string value

Nesting

The <Block> can contain nested elements but must be nested in the default <Response> element. This element can only be executed by the <Goto> and <Gosub> elements.

đŸ“˜

Note

Example below contains a Goto element. Refer to the <Goto> reference

<Response>
    <Goto label="Here"></Goto>
    <Block label="Here">
        <Say> Lets go to there</Say>
        <Goto label="There"></Goto>
    </Block>
    <Block label="There">
        <Say>Whoopee, we are now Here. Sorry, I mean There.</Say>
    </Block>
</Response>

Click here to see a complete code snippet with <Block>, <Goto>, <Gosub>