Else

Definition

The contents within this tag will execute when the conditions of the <if> tag have not been met. This tag is always inside an <if> tag. See that tag for more information.

Value

The contents of the tag execute when the conditions of the <if> tag are not satisfied.

Attributes

Attribute Required Values Description
name N any text A unique name for the tag

Examples

The transfers calls that are not blocking their Caller ID. For those that are, they are instructed to call back.

<dialplan name="Root">
    <if expr="'${call.callerid}'.toLowerCase() == 'blocked' || '${call.callerid}'.toLowerCase() == 'restricted' || '${call.callerid}'.toLowerCase() == 'unknown' || '${call.callerid}'.toLowerCase() == 'anonymous'">
        <play name="play_fixCallerid" type="tts">Please call back with your caller I D unblocked. Thank you.</play>
        <hangup>
    <else>
        <transfer>5551234567</transfer>
    </else>
    </hangup>
    </if>
</dialplan>