Node: address-switch

Address switches allow a CPL script to make decisions based on one of the addresses present in the original call request.

Parameters: field, subfield

  • field - allows the script to specify which address is to be considered for the switch.

    • origin - the call's original address.
    • destination - the call's current destination address.
    • original-destination - the call's original destination.

  • subfield - specifies what part of the address is to be considered.

    • address-type - This indicates the type of the underlying address; i.e., the URI scheme, if the address can be represented by a URI. The types specifically discussed by this document are sip, tel, and h323. The address type is not case- sensitive. It has a value for all defined address types.
    • user - This subfield of the address indicates, for e-mail style addresses, the user part of the address. For telephone number style address, it includes the subscriber number. This subfield is case-sensitive; it may be absent.
    • host - This subfield of the address indicates the Internet host name or IP address corresponding to the address, in host name, IPv4, or IPv6 format. For host names only, subdomain matching is supported with the subdomain-of match operator. It is not case sensitive, and may be absent.
    • port - This subfield indicates the TCP or UDP port number of the address, numerically in decimal format. It is not case sensitive, as it MUST only contain decimal digits. It may be absent; however, for address types with default ports, an absent port matches the default port number.
    • tel - This subfield indicates a telephone subscriber number, if the address contains such a number. It is not case sensitive (the telephone numbers may contain the symbols `A' `B' `C' and `D'), and may be absent. It may be matched using the subdomain-of match operator. Punctuation and separator characters in telephone numbers are discarded.
    • display - This subfield indicates a "display name" or user-visible name corresponding to an address. It is a Unicode string, and is matched using the case-insensitive algorithm described in Section 5.2. The contains operator may be applied to it. It may be absent.

Outputs: address

Specific addresses to match.

Parameters: is, contains, subdomain-of

  • is - An output with this match operator is followed if the subfield being matched in the address-switch exactly matches the argument of the operator. It may be used for any subfield, or for the entire address if no subfield was specified.

  • contains - This match operator applies only for the subfield display. The output matches if the display name being matched contains the argument of the match as a substring.

  • subdomain-of - This match operator applies only for the subfields host and tel. In the former case, it matches if the hostname being matched is a subdomain of the domain given in the argument of the match operator; thus, subdomain- of="example.com" would match the hostnames "example.com", "research.example.com", and "zaphod.sales.internal.example.com". IP addresses may be given as arguments to this operator; however, they only match exactly. In the case of the tel subfield, the output matches if the telephone number being matched has a prefix that matches the argument of the match operator; subdomain-of="1212555" would match the telephone number "1 212 555 1212."