Thursday, 11 May 2023

Enterprise Mobile Security


Introduction

Mobile has become our an additional finger which knows all most of sensitive information. Leading this makes it very much important to secure and especially for enterprise. The mobile device has different composition regular computer, embedded in nature makes it bit more challenging in securing.

Communicating Methods

Communication between from one mobile to another mobile is through electro magnetic waves (zero and one) but the mobile itself does not have the capability to transfer through long distance. Hence mobile devices can communicate using different methods such as Cellular Network - (5G which is the fifth generation of cellular wireless standards providing capabilities beyond 4G), Bluetooth, Wi-Fi, Near field communications and so on. There are various security concerns with this, i.e., Traffic monitoring, Location tracking, Wide access to mobile devices. Let's look into each of these methods.

Cellular Network

  • Cellular network or also known as mobile network, are the main mode of the communications, which connects to and from end nodes through the service provider network.  
  • Each phone communicates with the service provider by radio waves through a local antenna at a cellular base station or cell site. The cellular consists of below components:

Credits: https://www.electroschematics.com/wp-content/uploads/2010/03/Mobile-Communication.png

  • Cellular Layout
    • Mobile network is divided into different geographical areas known as cells. This geographical are is divided hexagonal cells - an antenna coverages a cell with certain frequencies. 
    • Each cell has a transceiver - mobile tower that make a wireless connection to the mobile device and the base station is a land station in the land mobile service below the tower. Both serves the similar purpose to produce network signals to the consumers.
    • Base Station
      • Base stations provide the cell with the network coverage and connects with the tower, which can be used for transmission of voice, data, and other types of content.
      • The base stations are meant to improve the signal frequency and communication between interconnected devices such as computers or smartphones.
    • Tower
      • Tower is where the antennas and electric communications equipments are placed to create a cell or adjacent cells.
      • The cell towers distributes the signals are generated by the base station. 
    • All base stations and towers in a city are connected via a high-speed link or fibre optics to a mobile telephone switching office (MTSO). 
  • Mobile Tower Switching Office
    • Our mobile has not enough signal powers to directly call a caller residing in another city hence it sends signals to a mobile tower. 
    • The mobile tower then sends signals to MTSO. MTSO check our sim data in its database to find the cell in which the phone is present  and send a signal to another city MTSO. Then MTSO sends signals to mobile through the mobile tower.
    • MTSO is normally located in the central cell of a cluster and is generally connected to the Public Switched Telephone Network (PSTN).
  • Public Switched Telephone Network - PSTN
    • A public switched telephone network is a combination of telephone networks used worldwide, including telephone lines, fiber optic cables, switching centers, cellular networks, satellites and cable systems. 
    • PSTN is a century-old worldwide connected telephone network and lets users make landline telephone calls.
  • Common security concerns
    • Traffic monitoring
    • Location tracking
    • DDOS attacks
    • Access fraud
    • Stolen phones
    • Subscription fraud
  • Security measures
    • Network Traffic Monitor and Analysis
    • Encrypted communication
    • Velocity Checking
    • A subscriber usage-pattern database 
    • Customer call analysis 
    • Geographic dispersion checking 
    • Extensive proprietary antifraud algorithms 
  • Below site explains in detail about different fraud and solutions in cellular network
    • https://csrc.nist.gov/csrc/media/publications/conference-paper/1997/10/10/proceedings-of-the-20th-nissc-1997/documents/031.pdf

Wi-Fi 

  • Wi-Fi is the family of wireless network protocols, commonly used for local network access. Wi-Fi stands for Wireless Fidelity.
  • Wi-Fi uses radio frequency.
  • An internet connection shared with multiple devices within certain range via wifi router. This router is connected directly to the internet modem and acts as a hub to broadcast the internet signal to all your Wi-Fi enabled devices.
  • Wifi repeaters, is used to extend the length of the existing network.
  • Common security concerns
    • Data capture: Need to Encrypt data
    • On-path attack: Always Monitor data
    • Denial of service: Monitor unwanted traffic which is calling the frequency interference
  • Security measures
    • Wired Equivalent Privacy (WEP) encryption was designed to protect against casual snooping but it is no longer considered secure. Later WPS - Wi-Fi Protected Setup, WPA - Wi-Fi Protected Access and WAP2 were introduced, which is also not secure now.
    • In 2018, WPA3 was announced as a replacement for WPA2, increasing security and enabling secure authentication on the wireless router. 
    • WPA3-Personal
      • WPA3 with shared key where everyone uses same key
    • WPA3-PSK
      • Using WPA3 session key is derived from PSK using SAE (Simultaneous Authentication of Equals) to provide stronger defences against password guessing.
      • This allows the access provider and station peers to authenticate each other as part of the handshake process while using cryptographic tools to prevent an attacker from performing an offline password cracking scheme.
  • As like Cellular networks, W-Fi internet access has become much more embedded in society. 


Li-Fi

  • Li-Fi stands for Light Fidelity.
  • LiFi technology will allow us to connect to the internet using light from lamps, streetlights or LED televisions. 
  • Li-Fi uses infrared light or via LED to transmit data.
  • In addition to being cheaper, safer and faster than wifi, it does not need a router and just requires to point your mobile or tablet towards a light bulb to surf the web.
  • Common security concerns
    • Jamming
    • Spoofing
    • Data modification
    • Inability to work without light
  • Security measures
    • LiFi technology is widely considered to be generally more secure than WiFi. 
    • Plenty of security features can be embedded in LiFi systems in order to make them more secure as light cannot pass through walls like radio waves and it carries more volume of data at a time.
    • Encryption
    • Monitoring


Bluetooth

  • Bluetooth wireless technology is a short range communications technology intended to replace the cables connecting portable unit and maintaining high levels of security. 
  • Bluetooth uses a spread-spectrum, frequency-hopping, full-duplex signal.
  • An antenna-equipped chip in each device that wants to communicate sends and receives signals at a specific frequency range defined for short-range communication.
  • For Bluetooth devices to communicate, they pair with each other to form a personal area network (PAN), also known as a piconet.
  • This process is done through discovery, with one device making itself discoverable by the other device. 
  • Bluetooth is a common mobile connectivity method because it has low power consumption requirements and a short-range signal. 
  • Point to Point
    • One-to-one connection, conversation between two devices
  • Point to Multi Point
    • One of the most popular communication methods 802.11 wireless.
    • Multipoint doesn’t necessarily mean that you can stream media from two devices at a time.
  • Common security concerns
    • Bluejacking
      • Sending of unsolicited messages to another device via Bluetooth
    • Bluesnarfing
      • Access a bluetooth enabled device to access data from the device.
      • Security has been patched in the latest devices
  • Security measures
    • Update with latest patches
    • Monitoring
    • Encryption


RFID

  • Radio Frequency Identification (RFID) refers to a wireless system comprised of two components: tags and readers. The reader is a device that has one or more antennas that emit radio waves and receive signals back from the RFID tag.
  • Uses radar technology
    • Radio energy is transmitted
    • Bidirectional communication
  • There are two types of RFID tags: active and passive tags. An active tag can broadcast a signal over a larger distance because it contains a power source. A passive tag, on the other hand, isn’t powered but is activated by a signal sent from the reader.
  • Common security concerns
    • Data capture
    • Spook reader
    • Signal jamming
    • Decrypt communication
  • Security measures
    • Cryptography is primary
    • Blocker tags, prevent unauthorized readers
  • Commonly used as geofencing security measure, radio-frequency identification (RFID) to define a geographic perimeter, when the device enters of exits alerts are sent.


NFC

  • Near-field communication (NFC) is a set of standards for contactless communication between devices. NFC chips in mobile devices generate electromagnetic fields. This allows a device to communicate with other devices. 
  • NFC is extension of RFID technology.
  • Near-field communication transmits data through electromagnetic radio fields to enable two devices to communicate with each other. To work, both devices must contain NFC chips, as transactions take place within a very short distance. 
  • NFC-enabled devices must be either physically touching or within a few centimetres of each other for data transfer to occur.
  • NFC began in the payment-card industry and is evolving to include applications in numerous industries worldwide.
  • The NFC standard has three modes of operation: 
    • Peer-to-peer mode: Information shared exchanged between two mobile devices directly.
    • Read/write mode: An active device receives data from a passive device. 
    • Card emulation: The device is used as a contactless credit card. It emulates a payment card or other physical card in card readers, magnetic-stripe readers, and contactless card readers used to make payments directly from your mobile device.
  • Common security concerns
    • Remote capture
    • Frequency jamming
    • On path attack
    • Lost of NFC device control - digital pickpocketing
  • Security measures
    • Encryption
    • Always patch up-to-date
    • Turn-off when not in use 


Mobile Networks

Mobile networking has evolved significantly since the introduction of the first-generation (1G) mobile network in the 1980s. G refers to Generation. Each Generation is defined as a set of telephone network standards, which details the technological implementation of a particular mobile phone system.
Credits: https://www.techindulge.com/technovation/1g-2g-3g-4g-and-5g-wireless-phone-technology-explained-meaning-and-differences/

1G

  • 1G is the first generation of wireless cellular technology. 
  • 1G supports voice only calls.  
  • 1G is analog technology
  • The maximum speed of 1G is 2.4 Kbps.

2G

  • Changed from analogue (1G) to Digital (2G).
  • Ability to send SMS (Short Message Service) and plain text-based messages.
  • GSM and CDMA was introduced during this period.
  • The maximum speed of 2G with General Packet Radio Service (GPRS) is 50 Kbps. The max theoretical speed is 384 Kbps with Enhanced Data Rates for GSM Evolution (EDGE).
  • Before making the major leap from 2G to 3G wireless networks, the lesser-known 2.5G and 2.75G were interim standards that bridged the gap to make data transmission.

3G

  • Enabled web browsing, email, video downloading, picture sharing and so on.
  • The maximum speed of 3G was around 2 Mbps for non-moving devices and 384 Kbps in moving vehicles. 

4G

  • Applications include amended mobile web access, IP telephony, gaming services, high-definition mobile TV, video conferencing, 3D television, and cloud computing. 
  • The max speed of a 4G network when the device is moving is 100 Mbps. The speed is 1 Gbps for low-mobility communication such as when the caller is stationary or walking.

5G

  • 5G promises significantly faster data rates, higher connection density, much lower latency, and energy savings, among other improvements.
  • 5G offers data transfer rates of up to 20 Gbps, it allows users to download ultra-high-definition videos and access the internet at lightning-fast speeds. 
  • Also offers lower latency, better network coverage, and improved call quality.

Wireless Carriers

Wireless carrier means the cellular technology company that provides mobile telecommunication services for a Supported Device.

CMDA

  • CDMA stands for Code Division Multiple Access. 
  • It is handset-specific.
  • CDMA is not very common, and it is available in comparatively fewer carriers and countries. These devices are exclusive to Canada, Japan, and the United States.
  • The CDMA technology does not support any such feature. It cannot transmit voice and data simultaneously.
  • CDMA is faster, provides better security and has comes with built in encryption.

GSM

  • GSM (Global System for Mobile) standard in Finland was launched by AT&T. Every device uses SIM (Subscribers Identity Module) to communicate with the provider network.
  • GSM is highly available and globally used. Over 80% of the entire world’s mobile networks use it.
  • It uses the Time division multiple access (TDMA) and Frequency division multiple access (FDMA).
  • GSM supports the transmission of both voice and data at once.
  • GSM is slower, less secure and no default encryption compared to CDMA.

LTE

  • Long-Term Evolution (LTE) is used for faster data transfer and higher capacity. Different variations of LTE networks exist across carriers that use different frequencies. For example Sprint, T- Mobile, Verizon, and AT&T all have their own bands of LTE.
  • LTE moves large packets of data to an internet protocol system (IPS). Old ways of moving data used Code-division multiple access (CDMA) and the Global System for Mobile Communications (GSM), and those methods moved only small amounts of data.
  • LTE and 4G simply evolved together, with LTE is industry standard that describes the particular type of the forward edge of the fourth generation’s advancement.
  • 4G LTE functionality has two key preconditions: a network that supports the ITU-R (ITU Radiocommunication Sector) standard speeds and a device powerful enough to match and handle the speeds of that network. 
  • GSM and CDMA all switched to LTE as global 4G standard. As CDMA and GSM, are inefficient uses of the airwaves.

SATCOM

  • For users who lack traditional landline or cellular coverage, satellite communication (SATCOM) is an option for mobile device use. 
  • SATCOM uses an artificial satellite for telecommunication that transmits radio signals. 
  • It can cover far more distance and wider areas than most other radio technologies. 
  • Because satellite phones do not rely on phone transmission lines or cellular towers, they function in remote locations. 
  • Most satellite phones have limited connectivity to the Internet, and data rates tend to be slow, but they come with GPS capabilities to indicate the user’s position in real time. 


Mobile Management

  • Mobile Device Management
    • Managing mobile device access and usage in an organization is a security challenge to achieve. 
    • Manage the company owned or user owned mobile devices centrally. 
    • Set policies on apps, camera, data, access and so on.
    • Access control such as force screen locks, multi factor authentication, remote wipe, geofencing will be part of MDM.
  • Mobile Content Management
    • Secure the content present in the mobile device is role of Mobile Content Management - MCM. 
    • Monitoring and restriction on the file sharing, online content viewing and uploading.
    • Centrally manage the data in cloud using solutions such as Microsoft Office 365.
    • Any data which sent or receives from mobile devices should go through DLP - Data Loss Prevention - preventing any sensitive information leakage.
    • Data on the device needs to be encrypted.
    • Restrict and block external or removable drives.
  • Mobile Application Management
    • Not all applications are secure some are malicious, managing mobile apps is quite tough.  
    • Any new application installed should be managed through Mobile Application Management - MAM and only allowed apps could be installed. 
    • Not all the applications dangerous but still are not required for the business, such as games and social media apps - these applications would be denied for installation.
  • Unified Endpoint Management - UEM
    • Evolution of MDM, manages mobile and non mobiles.
    • End users can use different types of devices, and it could be blended together.
    • Applications can be used across different platforms.


Mobile Protection Measures

  • Remote wipe
    • Managed by MDM, removes all the data from the device whenever required usually during theft.
    • Make sure essential data is properly backed up.
  • Geolocation
    • Location tracking system
    • Used during commute, cross border alerts, find phone
  • Geofencing
    • Restrict mobile feature or features when the device is present in particular location.
    • Authenticate and allow login when the device is located in particular area.
  • Screen lock
    • Locking the mobile using PIN, Passcode, Pattern and Biometerics.
    • Auto lock after configured time.
    • Erase data after few invalid entries.
  • Push notification services
    • Information popup service on the screen.
    • Receives notifications even when the phone is idle or using different application.
  • Passwords and Pins and Biometrics
    • Mobile devices can have multi authentication based on the apps used.
    • Password rotation, reset, complexity policy handled through MDM.
  • Context aware authentication
    • Switch to multi level authentication during abnormalities observed or different pattern followed.
    • Example, access through different location, connected to different wifi, paired with bluetooth.
  • Containerization
    • Segment the storage for business use, to avoid data leak.
    • Easy to manage offboarding where the corporate data is deleted retaining the personal data.
  • Full device encryption
    • Encryption ensures even after the theft data is lost but still secure.
    • Managed and keys are rotated through MDM.
  • MicroSD Hardware Security Module - HSM
    • Provides security services - encryption, key generation, key rotation, digital signatures, store keys securely and encrypted.
  • SEAndriod
    • Security Enhancements for Andriod, built using SELinux (Security Enabled Linux).
    • Centralized policy management. 
  • Always have the device patched with the latest security fixes.


Mobile Deployment Models

Enterprise mobile device deployment models would fall in any of the below agreements:

  • BYOD is Bring Your Own Device
    • Employee owns the device
    • Difficult to secure, could be managed by MDM using containterization.
  • COPE is Company Owned/Personally Enabled
    • Company buys the device, used for both professional and personal.
    • Organization has full control on the device, including monitoring.
  • CYOD is Choose Your Own Device
    • Similar to COPE, corporate own device but user's choice of mobile device.
    • Gets tricky in terms of security for certain models.
  • COBO is Company Owned/Business Only
    • Company buys the device and used only officially with restriction.
  • VMI is Virtual Mobile Infrastructure
    • Apps and Data are separated from the mobile device.
    • Data is stored securely centralized, risk is minimized.


Conclusion
Mobile security along with other general security measures will help the enterprise and the individual to be secure.


Credits and References

  • https://www.uscybersecurity.net/wp-content/uploads/2019/02/Mobile-Security.jpg
  • https://whatsag.com/mobile-technology/the-difference-between-a-cell-tower-and-a-base-station.php
  • https://www.youtube.com/watch?v=1JZG9x_VOwA
  • https://www.baeldung.com/cs/mobile-networking-generations
  • https://www.lifewire.com/1g-vs-2g-vs-2-5g-vs-3g-vs-4g-578681
  • https://www.weboost.com/blog/what-is-4g-lte-and-how-does-it-work#:~:text=LTE%20moves%20large%20packets%20of,it%20helps%20streamline%20your%20service.
  • https://www.uctel.co.uk/blog/4g-vs-lte-understanding-the-difference-between-4g-and-lte#:~:text=So%20what%27s%20the%20difference%20between,compared%20to%20the%20fourth%20generation.
  • https://csrc.nist.gov/csrc/media/publications/conference-paper/1997/10/10/proceedings-of-the-20th-nissc-1997/documents/031.pdf
  • https://www.investopedia.com/terms/n/near-field-communication-nfc.asp
  • https://www.youtube.com/watch?v=UOGZbq4t_g8

Thursday, 27 April 2023

Telephone - Good To Know Stuff

 


Today let's reminisce what was telephone and how it worked back then.

Telephone

  • Telephone is common usage in Telecom, as it comprises telegram, television, fax, etc. 
  • Teledensity is term which shows how many people are using telephone lines.
    • A term commonly used to describe the number of telephone lines per some unit of the population (often per 100 people); the density of telephone. It also shows company's wealth.
  • The different between telephone and computer is
    • The old computer may not support to the current environment, whereas old model telephone can support to the environment but with the same features what it had.
  • CTI => Computer Telephony Integration
  • Voice Call recording system uses the following
    • communicating with telephone
    • on hook and off hook process

Analog Phones

  • Analog telephones are dependent on voltages. It works on flow of voltage. It doesn't sends any packets.
  • Types of Phones
    • Rotary telephone
    • Dial plan telephone
  • Connection Settings
    • Exchange ---- twisted pair wire ----> wall jack / rosette ---- twisted pair wire ----> local phone
  • The local phone has two parts :
    • headset
      • connected with coiled wire
      • twisted pair wire (copper wire) 
        • red wire
        • black wire
      • jack
    • base unit(box) or dialing box :
      • Consists a place where the handset is kept, which is called "cradle".
      • Consists two "hook switches", but now we have only one.
  • Power
    • The exchange gives power to phone.
    • 50V dc power is sent to phone, when it is on hook state.
    • The "multimeter" can measure the voltage passed.
  • Dial Tone
    • When the handset is picked up, a tone is played at the first is called dial tone.
    • To check whether connection is established.
    • To check the working state of the phone.
    • If the dial tone is heard that means it is ready to use.
  • Ring back
    • The ring received after dialling the number.
  • Handset place on the hook is called as on hook.
  • Handset picked up then it is off hook.
  • 70V AC is given when incoming call has come.
  • While off hook is there then maximum voltage is given 20V to 28V.
  • Flash => Getting the attention of the PBX. After that PBX will accept the numbers to perform some actions(hold). In the PBX certain numbers will be configured to respond that number.
  • If the hook switches are pressed less than a second then we may get the attention of PBX.
  • Oscilloscope is used to see the voltages.
  • Rotary Dialler : The phone's dialler will be in a circle.

Architecture of Base Unit

                             


  • hybrid : It will transform one type of signal to another. It is also meant as transducer. It is the very costly part of the base unit. The quality of the voice depends on this. The quality of the voice is evaluated here.
  • capacitor : It will filter the AC from DC. It sends AC for ringing (incoming call). 
  • In the on hook, the telephone will receive 50V.  When the incoming call comes the PBX will send 70V to our phone. When we make a call it will get a ring back tone from the PBX and the calling telephone will get 70V for ringing.
  • The problem in this system is that, if the phone is disconnected from the wall jack then we too will get the ring back, it will just check the wall jack's connection not the wall jack to phone connection.
  • In rotary phone, if we press the hook continuously, then there are chances of call to be made.
  • When we pick up the handset, then the hook switch mechanism closes the switch. Then the voltage will be passed to the hybrid.
  • To dial we will rotate the dialler, if we rotate zero then from the zero position it will open and close the dial switches(before hook switch) 10 times. All this will send pulse to the exchange, then the exchange will realise the pulse and calculate the number. All these pulses will be sent within a second. The one of the use of wall jack is that we can connect many telephones, else we can connect only one.

How Telephone Call Works

  • After picking up the handset : Hear the dial tone passed by the PBX, this means the exchange is ready to serve.
  • Dial the number, the dial tone will be stopped.
  • Numbers are sent to the PBX in pulses, there it is counted and identifies the numbers. 

  Eg: The number dialled is 432.

  The pulse will be as following :

  _   _   _   _        _   _   _        _   _

               _| |_| |_| |_| |______| |_| |_| |______| |_| |_

                       4          |       3       |      2

                                  |               |

                                  V               V

  • Inter digit Time : This is the time between the each digit pressed.
  • Receive the ring back. And the other side receives 70V AC for ringing.
  • The dial tone received back and voice will be of 400Hz purely which is modulated 20Hz.
  • Then the connection is established, the voice will passed in pulses.
  • All the combinations will be sent within a seconds, milliseconds or micro seconds.

Digital Phone

  • Digital phone will send packets to communicate instead of sending voltages. 
  • All the communication has been sent in 0s and 1s. 
  • In digital, the header information like source address, destination address, etc., is used to send send and receive the packets.
  • It is more intelligent and fast. 
  • It gives lot of features of the analog phones.
  • It gives constant power supply. 
  • Unlimited signalling will be given.
  • It has good speed to respond the request.
  • Digital phones are fully dependent on PBX. So, if we use digital phone then the digital line has been made between phone and PBX.
  • Noise tolerance.

VoIP

  • It needs the network connection.
  • It sends the data compressed in the packets format.
  • It is more intelligent and faster compared to analog and digital.

Features of Telephones

  • Ringing alert
    • The LED will glow, if there are many telephones then to identify which phone is ringing.
  • Ring volume controller 
    • To control the volume, to minimize and maximize the call's volume.
  • Automatic gain controller 
    • To tune the voice.
  • Flash button 
    • To get the attention of PBX.
  • Pulse and tone mode facility
    • Can change the modes, but after the call completion it will reset to the original one.
  • Hold button 
    • To put a call in hold.
  • Pause button 
    • To pause a call, using this we can skip the IVR's options.
  • Mute button
    • To put a call in mute, this will avoid the user to hear us.
  • Redialing 
  • Wall mountable phones 
    • Phones kept on the walls.
  • Memory 
    • Save the contact details.
  • Hands free dialing 
  • Echo cancellation 
    • Subtracting the incoming and outgoing voice to avoid noise.
  • Ringer Equivalent number 
    • To obtain power consumption of the telephone.
  • Caller id.

Telephone Exchange

                      Telephone Exchange

                  +------------+

      111(Phone) <------| *        * |-------> 101(Phone)

      112(Phone) <------| *        * |-------> 102(Phone)

      113(Phone) <------| *        * |-------> 103(Phone)

      114(Phone) <------| *        * |-------> 104(Phone)

      115(Phone) <------| *        * |-------> 105(Phone)

      116(Phone) <------| *        * |-------> 106(Phone)

                  +------------+

  • A telephone exchange system acts as an intersection between two phone lines. 
  • This is because a direct phone line between two establishments doesn’t actually exist.
  • In the telephone exchange previously man intervention was needed. 
  • This problem was solved by Mr. Strowger.  
  • He designed the automated branch exchange.
  • The communication can be done in only two ways analog(pulse) and digital(tone mode).
    • Pulse Mode:
      • Pulse mode refers to a way of signal transmission that involves sending electrical pulses down the telephone line.
      • Pulse duration is short, measured in milliseconds or microseconds.
      • Pulse is complicated.
    • Tone Mode:
      • Tone dialing refers to a way of transmitting signals in telecommunications systems that uses audio tones of different frequencies.
      • Every digit when we press will have a frequency, which will be unique, to identify the number.
      • The frequency is the combination of two frequencies. Since it will be difficult for the user to mishandle it, as this is very difficult to make the artificial voice.
      • The tone is simple.
    • There are phones now-a-days where we can change to Tone Mode or Pulse mode.

Telecommunication

Telecommunications such as radio, telephone, and television all use a method called multiplexing--shortened to "muxing"--to transmit and receive information.

Multiplexing

  • Multiplexing was designed to send numerous analog signals or digital streams through one common transmission line.
  • Multiplexing is the sharing of a communications channel through local combining of signals at a common point.
  • One output, many input.
A------------+
B------------+ Multiplexing 
C------------+------------------- 
D------------+

De-Multiplexing

  • Demultiplex (DEMUX) is the reverse of the multiplex (MUX) process – combining multiple unrelated analog or digital signal streams into one signal over a single shared medium, such as a single conductor of copper wire or fiber optic cable.
  • Many output, one input.
  • It is used for reducing the cost.
                         +------------- 
         De-Multiplexing +------------- 
        -----------------+------------- 
                         +------------- 
                         +------------- 
  • Ex:
    • A organization has 100 employees, get only one line from the exchange. From that make 100 connections.

TDM (Time Division multiplexing)

  • This is also one of the methods in multiplexing which will work based on the time.
  • The method of combining more than one independent data streams into a single data signal and transmitting that single data signal through a multiplexer to a demultiplexer is known as time-division multiplexing.

Ex :
----
   000|010 
A ---------+         +----------- A
   011|001 +   +------------+         +-------------+   +
B ---------+---+ Multiplexer+---------+ Demultiplex +---+----------- B
   111|100 +   +------------+         +-------------+   +
C ---------+            +----------- C
  • Multiplexer read the data from the start(A) to end(B) within a second. If any channels are empty, it doesn't consider and send the data in a sequence. 
  • Demultiplexer have control to identify the empty channels and separate the data using the given duration(one second). So first it reads the data 000 and 011 etc.
  • First it takes all the data from the channels which has to be sent in the first one second. That will be passed into de-multiplexer. Then de-multiplexer separates the information based on the time. Here the time is one second but in real life it will be less than microseconds.
  • Multiplexer does a multiplexing and De-Multiplexer does the de-multiplexing work. In between these two, one controlling terminal will be there for controlling the data. While passing it sends duration channels. Controlling terminal decides how many channels send that data.

Signalling

Analog Signals Features

  • Accuracy
  • Caller id is passed between rings.
  • Analog Signal
      _           _           _           _           _
     / \         / \         / \         / \         / \
    /   \       /   \       /   \       /   \       /   \
----+   +-     -+   +-     -+   +-     -+   +-     -+   +------
          \   /       \   /       \   /       \   /
  \_/         \_/         \_/         \_/

Digital Signals Features

  • Noise tolerance
  • Avoid data loss
  • Caller id is passed in packets.
  • Digital Signal
                                           
    +---+   +---+   +---+   +---+   +---+  
    |   |   |   |   |   |   |   |   |   |  
----+   +---+   +---+   +---+   +---+   +------


PCM - Pulse code module

  • This is a technique for converting analog signals into digital form.
  • PCM samples the signal 8000 times a second, each sample is represented by 8 bits for a total of 64 Kbps.
  • There are two standards for coding the sample level :
    • Mu-Law 
    • A-Law 

Sampling

  • Sampling is a way to convert the analog to digital.
  • Sampling rate means samples taken per second or hertz, the rate at which the samples of an analog signal are converted into digital form.
  • To get original voice the sampling rate must be high.
  • It requires double of bandwidth rate. Since the limiting factor is the bandwidth at which speech can be transmitted. 
  • The 8000 samples per minute is taken for 64kbps.
  • Example, the bandwidth telephone line we take as 64kbps at a sampling rate of 8kHz and 8-bits per sample.
    • 8000 samples per second * 8-bits per sample = 64000bps = 64kpbs. 

Companding

  • This is a technique used to compress data. It compresses the 16 bit data into 8 bit.
  • This is formed from the words COMpressing and exPANDING. 
  • Companding reduces the noise and crosstalk levels at the receiver by sending the compressed data and then expanding it at the receiving end to increase the signal quality when it is digitizing an analog signal.

CoDec

  • The conversion of signals from analog to digital is performed by a coder. 
  • On the receiving side, the process will be reversed using a decoder so that the signals can be used by an analog telephone.

PBX

  • It is abbreviated as Public Branch eXchange.
  • It is a switch station for telephone systems. It consists mainly of several branches of telephone systems and it switches connections to and from them (linking phone lines).
  • To buy telephone for every employee of a organisation it will charge on the following basis :
    • Wiring
    • Rental
    • Maintenance
    • Deposit
    • Call charge
  • The calls made within the organisation costs heavily. Using PBX we multiple the phones.  Hence PBX is less expensive than connecting an external telephone line to every telephone in the organization.
  • It's easier to call someone within a PBX, dial only 3 or 4 digits.
  • It is like a hub, all the calls are routed to and from it.
  • Two types of PBX:
    • Soft PBX --> asterisk, freeswitch
    • Hard PBX --> avaya, nortel, alcatel

PRI

  • This is a type of ISDN.
  • This is like a multiplexor, from a signal wire connected to the PBX 30 channels will be separated.
  • This is a wire.
  • This is an international communications standard for sending voice, video and data.
                           ------------ 701
                                    |
                                    |
                           ------------ 702
                                    |
                                    |
                           ------------ 703
   |
PRI --------- PBX  -------- |
                           ------------ 704
                                    |
                                    |
                           ------------ 705
                                    |
                                    |
                           ------------ 706

Cadence

  • It is the pause between the rings.
    • ring -- pause -- ring
  • In America it is 4 seconds pause and 2 seconds ring.
  • This differs based upon the country and PBX.

MSN

  • The abbreviation is multiple subscriber number.
  • These numbers will be given by exchange provider.
  • E.G : from 700 to 799
  • There can be many connections provided but only 30 can be simultaneously connected. 

Pilot Number

  • It is a unique number given with a PRI connection.
  • Example :
    • From ABC, we are making a call and changing our profile details.
    • We have changed our number to some other number which is not provided from MSN or it can be an invalid number.
    • Then we will get a number as our caller number which is called pilot number.

ISDN 

  • It stands for integrated service digital network. 
  • It is communication standard which can be used between telephone exchange to telephone exchange and extension to extension.
  • For communicating to the different exchange, one standard has to be followed that is ISDN.
  • Types:
    • BRI - Basic rate interface
    • PRI - Primary rate interface 
  • In BRI there are 2B channels and ID channel. In PRI there are 30B channels and 2D channels. 
    • B channel -> Transfer the data(information)
      • The speed of the B channel in BRI is 64 KBPS 
    • D channel -> Control the data passed through B channel.
      • The speed of the D channel in BRI is 16 KBPS 
  • PRI Standards :
    • E1 : European country introduces this standard. Indians are also using this standard.
    • T1 : North America uses this type.
    • J1 : Japan uses this type.
Type  Channels    Speed 
-----------------------------------
E1   (30B + 2D)  (64 Kbps + 64 Kbps )
T1   (23B + 1D)  (64 Kbps + 64 Kbps )
J1   Same as E1  (64 Kbps + 64 Kbps )
  • For all the B channel only one D channel has been used. It is called as NFAS which will be used in T1 type standard.
  • G7F1 is a standard which is used by B channel to send the data. The mulaw supply sampling rate is 8000 sp/s. For mulaw the sampling has been get as 16 bit and stored as 8 bit.
  • G931 is a signalling method for controlling all the B channel. This standard is not only used for this. It is used globally in all the channels. Before sending the data it sends the packets in the channels for controlling the data.
  • DID : It stands for direct inward dialling. It is a facility when the Multiple Service Numbers has been used. 
    • Ex: In our organization MSN numbers are 43902701 - 43902799.
  • ACD : It stands for Automatic Call Distribution which is used to route the calls to the appropriate systems.

Alcatel PBX

  • The standard number is 4400.
  • It has lot of wires such as power, extension, earth and PRI.
  • It also has floppy, processor, hard disk.
  • For knowing the status of extension LED's will be there.
  • It transfers data in 0s and 1s.
  • It uses the Unix OS.
  • We can enable or disable any extension. 
  • We can give the commands such as ping, ssh, traceroute, etc.
  • If we need to add any device to the PBX, there no need to restart the PBX, since if we restart the data can be lost.
  • It has the slots to add PRI.
  • Main distribution framework : It is used to distribute the signals.


Facilities in the PBX

  • Call parking
    • It gives the numbers to park the calls. The parking is done based on the PBX.
  • Call transferring
    • Two types of transfer:
      • Attended transfer (manual process needed to transfer the call to other person).
      • Blind transfer (automated).
  • Enquiry facility
    • This is used to find out the line is busy or not.
  • Queuing call
    • If one number received more than one call at the same time, then the calls are made to be stand in the queue.
  • Call waiting
  • Conferencing
    • Conference calls can be made.
  • Wireless phone
  • Noise tolerance 
    • The noise and volume can be adjusted.
  • Hunt Group
    • Group of the extension numbers and call can be made to the group  number. 
    • The call may be go simultaneously or one by one.
  • Pick Group
    • If you are in the same group then you can attend others call by typing # followed by the person's extension number.
  • Chain dialling
    • It is used to redirect the calls if one is not ready to attend.
  • Heart Line
    • Dedicate line for the extension. In this feature user don't need to type the numbers. 
    • When the user picks up the handset, call goes automatically.
  • Call follow me switch
    • It is used to redirect the calls if one is not ready to attend with in a time.
  • Call barring
    • It is used to restrict the incoming call and outgoing call.
  • Dynamic call barring
    • It is used to restrict the call by some time.
  • Call detailed record
    • It is used to get call related informations. It is mainly used for billing purposes.
  • Call budget
    • It is used to restrict the minutes to speak.
  • Call barging 
    • It is used to hear the other's communication without their knowledge.
  • Production from barging
    • If we set this option no one can overhead of your conversation.
  • DND ( Do Not Disturb )
  • Toll Free Numbers ( Company will be charged )
  • DSS (Digital station selector)  console
    • It is used to control the calls and also used to restrict the extension numbers.

Asterisk

  • It is open source soft PBX.
  • Asterisk give the interface to configure all the things in easy.
  • AsteriCon
    • It has the details of asterisk meeting which happens every year.
  • Switch matrix
    • It is used to identify the capacity of PBX. How much matrices have based on that only the connection has been made.
  • Least call routing
    • The way of finding shortest path.

Credits and References

https://ars.els-cdn.com/content/image/3-s2.0-B9780080508030500101-f05-26-9780080508030.gif
https://media.hswstatic.com/eyJidWNrZXQiOiJjb250ZW50Lmhzd3N0YXRpYy5jb20iLCJrZXkiOiJnaWZcL3RlbGVwaG9uZTIuZ2lmIiwiZWRpdHMiOnsicmVzaXplIjp7IndpZHRoIjoyODV9fX0=
https://networkencyclopedia.com/plain-old-telephone-service-pots/

Thursday, 13 April 2023

Coding Standards




Needs of Coding Standards

  • Maintainable
  • Proper understanding format / Readable
    • Comments / Documentation
    • Maintaining the changes done
  • Reusable
  • For doing a project we need a set of people in a set of teams, if everyone have perceptive to do code, then there will problems while integration of all the code (which all-together makes project). Hence the "Coding Standard" is needed.
  • The time takes to understand the code must be less. Hence the source and comments must be easy and effective.
  • If some code needs to modify or some new features needed to be added, for that the code clear(maintainable).


Coding Standards


Alignment

  • Indentation is required.
  • The tab size should be 4.
  • The space is required after the function name and before parenthesis.
  • After comma there should be a space.
  • Within the square bracket there should not be any space.
  • Use more parenthesis even if it is simple.
  • The curly braces should be used in the following format for the conditions,  constructors and loops.

  if (condition) {

  ....

  } else {

  ....

  }

  • The singe blank lines are required for the following :
    • including files
    • critical area
    • block
    • conditions and loops

  • The double lines are required for the function.
  • Declaring function
    • Template : action_performed_verb
    • The way to write a function :

function perform_addition () 

{

...

}

Naming

    • Variable and function names can be in the combination of words.
    • G_ is used for global variables declaration.
    • The local variables should be shorter.
    • T_ is used for temporary variables.
    • The name should be meaningful, it should says it purpose.
    • Proper naming must be there.
    • Name separation must be done with an underscore("_").
    • There can only 3 underscores at the max.
    • For macros the capital letters are used.

  • The parenthesis must be given, even if in some of languages its optional :

            if ( ( ( (condition) || (condition) ) && (condition) ) )

  • Files
    • Not only the variables and function names must be meaningful, but also the filenames should be proper.
    • The file name can have the following :
      • project_name
      • sub_name
      • purpose of file name

  • Max
    • 15 to 25 functions per file.
    • 1000 lines of file
    • One page scrollable code.
Comments

    • Explanation
    • Understanding
    • Sample input and output
    • Logical algorithm
    • Function header
    • File header
    • Declaration usage
    • Where form, where to

  • Special Note
    • REMIND
    • TODO
    • CAUTION
    • NOTES  -> important values, notes


Credits and References

https://woz-u.com/blog/the-evolution-of-coding-what-programming-languages-are-prominent-today/ 

Scarcity Brings Efficiency: Python RAM Optimization

  In today’s world, with the abundance of RAM available, we rarely think about optimizing our code. But sooner or later, we hit the limits a...