CAS R1 E&M

From TBwiki
(Difference between revisions)
Jump to: navigation, search
m (moved E&M to CAS R1 E&M: Missing "CAS" in the title, "E&M" is too short!)
Line 44: Line 44:
 
Depending if you want to use 0, 1 or 2 winks.
 
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:
 +
<pre>
 +
TONE_USE_DTMF = 1
 +
</pre>
  
 
=== Configuring exchange of ANI/DNIS ===
 
=== Configuring exchange of ANI/DNIS ===
Line 65: Line 72:
 
suffix = "#",
 
suffix = "#",
 
expected_digits = 0,
 
expected_digits = 0,
inter_digit_timeout = 0,
+
inter_digit_timeout = 5000,
 
},
 
},
 
</pre>
 
</pre>
  
* ANI/DNIS may be surrounded by separator digits (most of the time "KP" and "ST" MFR1 tones).
+
 
** Prefix/suffix are automatically added by the script when the digits are being sent
+
Please read detailed information about configuration of ANI/DNIS reception and transmission using the variables above:
** Prefix/suffix are detected by the script and removed from the collected digits before being reported to the application as calling/called numbers
+
* [[CASr1_scripting#ACTION_SEND_ANI|Options for sending ANI]]
* Expected number of digits is generally used in cases where no prefix/suffix are used, but instead a well-known (and fixed) number of digits are expected to be received
+
* [[CASr1_scripting#ACTION_WAIT_ANI|Options for receiving ANI]]
* The inter-digit timeout allows to declare ANI/DNIS complete after a delay without receiving subsequent digits. This is generally used with prefix/suffix separators are not used.
+
  
 
==== Enabling/disabling usage of ANI ====
 
==== Enabling/disabling usage of ANI ====

Revision as of 10:43, 8 August 2013

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

Contents

Overview

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.


Configuration

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:

TONE_USE_DTMF			= 1

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 mandatory.

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 (prefix/suffix, expected number of digits, or inter-digit timeout).

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


Subvariants

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:

	OUTGOING_DELAY_TIMEOUT	= 500

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):

	INCOMING_WINK_DURATION 	= 200

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.

Personal tools