E&M "Wink Start" is a CASr1 variant.


The E&M (often called "Wink Start") variants of CASR1 are "symetrical" CASR1 variants (both sides use identical signaling and state machines, calls can be made in both directions).

  • Only bit A is used (generally replicated to bit B)
    • Idle ("on hook") pattern is to set bit A to 0
    • "Off hook" pattern is to set bit A to 1

Summary of the "wink start" call flow:

  • Caller side goes "off hook"
  • Receiver side "winks" (goes "off hook" for short period of ~200ms)
  • Caller side detects "wink" and sends digits
  • Receiver side receives digit (sends another "wink" in "Wink-start-ack" variant)
  • Receiver side eventually goes "off hook"

Call termination:

  • One side goes "on hook"
  • Other side confirms with "on hook" too

Supported E&M variants

TelcoBridges provides a E&M-compatible CAS script. You can find general documentation about CASR1 scripts in Toolpack in the following page: CASr1_scripting.

The E&M script provided by TelcoBridges already supports the following variants:

  • Delay start
  • Wink-start
  • Wink-start-ack

Note that since this is a script, other variants may easily be added to this script by TelcoBridges or even by the user, with some knowledge of the LUA programming language.


Choosing variant

To specify a script to use E&M, you MUST specify one of the following:

CasR1.Variant = CasR1.VariantTypes.DELAY_START
CasR1.Variant = CasR1.VariantTypes.WINK_START
CasR1.Variant = CasR1.VariantTypes.WINK_START_ACK

Depending if you want to use 0, 1 or 2 winks.

Choosing tone type

With CAS R1, ANI/DNIS can be sent using either DTMF or MFR1 tones.

To specify the type of tones to use, use the following constant:


Configuring exchange of ANI/DNIS

  • ANI stands for "Automic Number Identification" (or "calling number).
  • DNIS stands for "Dialed Number Identification Service" (or "called number").

In the E&M variants, ANI (calling number) is optional, while DNIS (called number) is most of the time mandatory (though in some cases may be omitted).

Detection of ANI and/or DNIS

Configuration of reception/transmission of ANI/DNIS is controlled by the following variables:

	ANI = {
		prefix = "",
		suffix = "",
		expected_digits = 0,
		inter_digit_timeout = 0,
	DNIS = {
		prefix = "*",
		suffix = "#",
		expected_digits = 0,
		inter_digit_timeout = 5000,

Please read detailed information about configuration of ANI/DNIS reception and transmission using the variables above:

Enabling/disabling usage of ANI

To enable detection of ANI, enable one of the 3 detection methods above in the "ANI" configuration (prefix/suffix, expected number of digits, or inter-digit timeout).

If none is used, ANI won't be sent or received by the script.

Enabling/disabling usage of DNIS

To enable detection of DNIS, enable one of the 3 detection methods above in the "DNIS" configuration (prefix/suffix, expected number of digits, or inter-digit timeout).

If none is used, DNIS won't be sent or received by the script. Instead of a called number, the default E&M script will store the trunk number and timeslot number, separated by digit 'A'. Format will be like 01A22 (meaning trunk number 1, timeslot 22)


Here are the differences between the subvariants:

Delay Start

There's no wink before receiving ANI/DNIS. Instead, a fixed delay is inserted after going "off hook" and before sending the first digit. The following script constant defines that delay, and may be modified:


Wink Start

There's 1 wink before exchanging ANI/DNIS. In that variant, ANI/DNIS tones will only be sent after detecting a Wink from the remote side. A Wink will be sent after detecting a remote "off hook" (new incoming call).

Wink duration can be configured by the following script constant (in milliseconds):


Wink Start ACK

There's 1 wink before receiving ANI/DNIS. There's 1 wink after receiving ANI/DNIS.

Detailed information about the E&M script and state machines

For more detailed information about how this script is implemented (various states, and options), please refer to the "e_m.lua" script provided with Toolpack.