Posts

Decoding RTP Voice Traffic with Unknown Codec 52

Image
   I was genuinely surprised when I learned that our VoIP recording software had detected the use of an unknown Codec 52 in our IP network. That simply shouldn't be possible. To the best of my knowledge, only standard codecs are in use here - typically the legacy G.711, or in some cases, the more modern wideband G.722.2 (AMR-WB) for HD voice. But Codec 52? It must be a mistake - such a codec shouldn't even exist. Check RTP Header Structure  Let's start by reviewing the standard to understand how VoIP payload types are encoded. RTP: A Transport Protocol for Real-Time Applications ( RFC3550 )    The RTP header has the following format:     0                   1                   2                   3     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1    +-+-+-+-+-+-+-+-+...

Remote Port Mirroring for Passive VoIP Call Recordings

Image
We need to capture VoIP traffic - including both inbound and outbound RTP streams - from dedicated IP phones for delivery to the Call Recording server. These IP phones are distributed across various remote switches within the Layer 2 Ethernet network. By configuring RSPAN (Remote Switched Port Analyzer), we can mirror the VoIP traffic from these remote switches to a destination switch that is directly connected to the Call Recorder.  Network diagram: RSPAN configuration We are using Edge-Core ECS4100 series switches, which feature a Cisco-like command-line interface (CLI). Source switch 1 Create VLAN 100 for RSPAN traffic: vlan database  VLAN 1 name DefaultVlan media ethernet  VLAN 100 media ethernet rspan Create RSPAN session 1 with Source and Remote ports : rspan session 1 source interface ethernet 1/2 both rspan session 1 remote vlan 100 source uplink ethernet 1/25 Both transmit (TX) and receive (RX) traffic on port 2 will be mirrored to uplink port 25 via VLAN 100. Sh...

Mitel SIP-phone XML API configuration server on Python/Flask and registration on Asterisk PBX

Image
  Agenda: Configuration server SIP-phones XML configuration Flask XML server Asterisk SIP extensions configuration 0. Configuration server Setting up configuration server for SIP-phones was described on previous post:  Configuration server We will use the following configuration file  startup.cfg : # Configuration server download protocol:HTTP http server:192.168.5.22 #can be IP or FQDN http path:aastra68xxi http port:8888 firmware server: "http://192.168.5.22:8888/firmware" # SIP server sip transport protocol:1 #UDP(1),TCP(2),TLS(4) sip srtp mode:0 #0(SRTP disabled),1(SRTP preferred),2(SRTP only) sip line1 user name: EmergencyCallsOnly sip proxy ip: 192.168.5.22 sip proxy port: 5060 sip registrar ip: 192.168.5.22 sip registrar port: 5060 # XML server xml application uri: "http://192.168.5.22:8888" # Time settings time server disabled:0 #server enabled(0), server disabled(1) time server1: de.pool.ntp.org time zone name: Custom #Required setting if ...

Small HTTP server (Python/Flask) for uploading configuration and FW to Mitel SIP-phones

Image
  Create two local directories:   aastra68xxi   for configuration files and   firmware   for 6xxx.st FW and lang_xx.txt language files. Create  startup.cfg  file in  aastra68xxi  folder: $ cat aastra68xxi/startup.cfg download protocol:HTTP http server:192.168.5.3 # can be IP or FQDN http path:aastra68xxi http port:8888 firmware server: " http://192.168.5.3:8888/firmware " sip transport protocol:1 # UDP(1),TCP(2),TLS(4) sip srtp mode:0 # 0(SRTP disabled),1(SRTP preferred),2(SRTP only) sip line1 user name: EmergencyCallsOnly sip proxy ip: 192.168.5.22 sip proxy port: 5060 sip registrar ip: 192.168.5.22 sip registrar port: 5060 Create  app.py  application script with http routes to these directories: $ cat ./app.py import os from flask import Flask from flask import send_file app = Flask ( __name__ ) @ app . route ( "/" ) def hello_test (): return "Hello World!" ; @ app . route ( '/aastra68xxi/...