# MFS signaling

The MFS TCP implements the Spanish National CAS protocol, as specified by the Royal Decree 1562/1992, and amended by the Order 5309 of the Ministry of Industry, February 23, 1998.

Although E1 channel associated signaling (CAS) framing supports four signaling bits per direction, only one of them is used (in general) for MFS line signaling.

The signaling channels supporting the MFS line signaling protocol are referred to as Af in the forward direction and Ab in the backward direction. The forward channel indicates the condition of the outbound switch equipment and reflects the condition of the calling party's line. The backward channel indicates the condition of the called party's line (the inbound equipment).

The Bb bit might also be used, but only to convey billing pulses to the outbound equipment. The Bf bit is never used, and is always set to 1. The C and D bits are set to 0 and 1 respectively for both directions.

The following table describes the signaling states of a typical call:

State | Outbound AfBf | Direction | Inbound AbBb
--- | --- | --- | ---
Idle | 11 |  | 11
Seizure | 01 |  | 11
Seizure acknowledged | 01 |  | 01
The inbound side requests the address information, and the outbound side sends the data. This is accomplished by an in-band compelled sequence. The inbound side completes the compelled sequence by accepting or rejecting the call, using the last backward compelled tone. If the call is accepted, the inbound side plays a ring tone on the line, and then signals that the call was answered by setting the Ab bit to 0.
Ringing | 01 |  | 01
Answer - conversation state | 01 |  | 11
If the inbound side rejects the call, the outbound side clears forward by setting the Af bit to 1. The inbound side goes back to idle by setting the Ab bit to 1.
Clear forward | 11 |  | 01
Idle | 11 |  | 11
During conversation, the outbound protocol can receive billing pulses to signal that a unit of cost has been billed to the call. The bit used to carry a billing pulse is the Bb bit.
Answer - conversation state | 01 |  | 11
Billing pulses | 01 |  | 10
Answer - conversation state | 01 |  | 11
Depending on which side hangs up the call first, a clear back signal or a clear forward signal is generated. There is then a period of time in which the inbound side holds a release guard state, which is the same as clear back but happens when the outbound side is already in the idle state. Idle follows.
Inbound hangs up first: Clear back | 01 |  | 01
Clear forward / release guard | 11 |  | 01
Idle | 11 |  | 11
Outbound hangs up first: Clear forward | 11 |  | 11
Release guard | 11 |  | 01
Idle | 11 |  | 11

Register signaling is accomplished by a MF Socotel compelled scheme that is different from the R2 (CCITT Recommendation 441) compelled sequence. The basic concepts are summarized as follows:

- At the beginning of the compelled sequence, the inbound equipment plays a request tone (usually send all digits). This is an MF tone. The outbound responds with a pure tone (1900 Hz), which acknowledges the request form inbound.

- Then the sequence switches sides. The outbound equipment plays MF tones (the address of the called terminal), while the inbound equipment plays acknowledgment tones.

- When all the digits are delivered, the sequence switches side again, and the inbound equipment accepts or rejects the call, depending on the state of the called terminal.

The compelled sequence can only work if a very strict numbering scheme is in use in the network. The inbound side must know exactly the number of DID and ANI digits to expect in order to allow the compelled sequence to take place correctly. In Spain all telephone numbers are nine digits long. All extensions reachable through the national CAS protocol are five digits long.

- The expected number of DID digits is always five.

- The number of DID digits while dialing out is always nine.

- The expected number of ANI digits is always nine.