FXO/FXS Tapping

Analog telephony, also known as Plain Old Telephone Service (POTS), is the service the local phone company typically delivers to your home. Local phone companies deliver POTS from their Central Office (CO) to the subscriber’s premises over a circuit consisting of two copper wires. To increase the distance over which the signal can be transmitted the two wires are twisted together, which also reduces electromagnetic interference. So these two-wire copper cables are commonly known as “twisted pairs.”

FXS - Foreign exchange Subscriber interface (the plug on the wall) delivers POTS service from the local phone company’s Central Office (CO) and must be connected to subscriber equipment (telephones, modems, and fax machines). In other words an FXS interface points to the subscriber. An FXS interface provides the following primary services to a subscriber device:

  • Dial Tone

  • Battery Current

  • Ring Voltage

You may also see the FXS acronym rendered as Foreign eXchange System.

FXO - Foreign exchange Office interface (the plug on the phone) receives POTS service, typically from a Central Office of the Public Switched Telephone Network (PSTN). In other words an FXO interface points to the Telco office. An FXO interface provides the following primary service to the Telco network device:

  • on-hook/off-hook indication (loop closure)

Because of the characteristics described above, a telecommunications line from an FXO port must connect to an FXS port in order for the connection to work. Similarly, a line from an FXS port must connect to an FXO port in order for the connection to work. When the FXO port on your analog telephone is connected to the FXS port in the wall, you receive (FXS) service from the telephone company – and you hear a dial tone when you pick up the phone.

 

Operation

One can perform tapping on analog(fxo/fxs) calls by using sangoma tapping solution.

Analog Tapping application will start ports in tapping mode.
analog_tapping solution mainly monitors messages received on span as configured and take appropriate action as shown in the diagram given below:

 

  • Once UP/START event is received this application mainly start tapping the call i.e. application will open a file as specified and start reading the specific channel on which event is received and write contents present on channel in to the file as opened earlier until the channel is in ANSWERi.e. UP state as shown below:

 

  • In case when START event is received application will start tapping the call and also will generate tone and send it to peer inorder to receive caller ID.

  • For each call two files will get recorded one on each [span : channel] i.e. one on which call is being received and another on which call is transmitted.

  • One can stop the application on any point of time either by using ctrl + c or can select option to exit as present on the screen i.e. pressing 1 and then enter.

  • One can hear the recorded files using audacity tool.

    NOTE: Please refer to sangoma-tdm-sdk-faq in order to get how we can play the recorded file w.r.t Analog Tapping.

 

Build and run sample FXO Tapping application

   For Windows

  1. Change directory to applications\sample_fxo_tapping\analog_tap

  2. Open sample_analog 2010 Visual Studio Solution File.

  3. Run: Rebuild Project

    1. Note do not try to run FXO Tapping application from Visual Studio

    2. It needs a console.

    3. Exe file is located: Debug\analog_tap.exe

  4. Open cmd shell in Administrator mode.

  5. Run: applications\sample_fxo_tapping\analog_tap\Debug\analog_tap.exe


For LINUX

  1. Change directory to applications/sample_fxo_tapping/ .

  2. Run following commands:

    1. ./configure

    2. make

    3. ./run_analog_tap

NOTE: For much information w.r.t. analog tapping application and its configuration please go through the README file as present in applications\sample_fxo_tapping\README

Return to Documentation Home I Return to Sangoma Support