Skip to main content

rtcpxr_collector

A python library for Collecting RTCP-XR (RFC 3611) SIP quality packets

Predecessor

Much thank to the project at: https://github.com/pbertera/vq-collector The core concepts and processing core were taken from there. Most code has been refactored and stripped down.

Basic usage

This is meant to be part of a larger project (hence a library.) I highly suggest you configure your phones to send to your collector with the "name" set to the mac address of the handset. This is the only way to uniquely identify a handset (that I've found at least.)

To run the code with all the defaults:

#!/usr/bin/python3

from rtcpxr_collector import vqcollector
vqs = vqcollector.CollectorServer()
vqs.listen()

Generally you will use a custom handler, so here's an example:

#!/usr/bin/python3
import datetime
from rtcpxr_collector import vqcollector

def logHandler(r):
    print("%s %s %s CQ:%s LQ:%s Local:%s Remote:%s"%(datetime.datetime.now(), 
                                             r['Handset']['MAC'],
                                             r['CallID'],
                                             r['QualityEst']['MOSCQ'],
                                             r['QualityEst']['MOSLQ'],
                                             "%s %s"%(r['LocalID']['name'],r['LocalID']['desc']),
                                             "%s %s"%(r['RemoteID']['name'],r['RemoteID']['desc']) ))
    return True

vqs = vqcollector.CollectorServer(handler=logHandler)
vqs.listen()

Maybe you want to run on a non-stadard IP or port:

#!/usr/bin/python3

from rtcpxr_collector import vqcollector
vqs = vqcollector.CollectorServer(local_ip=10.10.10.15, port=5061)
vqs.listen()

All the options

The CollectorServer object opens a SIP socket to receive RTCP-XR packets,
parses them, then sends the data to a handler.

Attributes:
    local_ip (ipV4 address): [None] Local IPV4 address to bind to (None: Autodetect)
    port (int)             : [5060] Local Port to bind to
    reply_to_socket (bool) : [False] Should we reply to the address from the socket, or the SIP Header
    debug (bool)           : [False] Print Debugging information
    handler (func)         : [None] Handler function for recieved data (None: pprint res data)
    timeout (int)          : [10] Select Timeout in seconds
    timeout_handler (func) : [None] Handler for select timeout event

Handler Function:
    Takes 1 arg that is the parsed data structure.
    Returns: Send Response Packet? True or False

Metadata

Release files for rtcpxr-collector 0.1.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rtcpxr-collector 0.1.7
File Size Uploaded Provenance
rtcpxr_collector-0.1.7.tar.gz 19.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for rtcpxr-collector 0.1.7
File Interpreter ABI Platform
rtcpxr_collector-0.1.7-py3-none-any.whl Python 3 none any Details

Total release size: 39.2 kB

Release files / rtcpxr_collector-0.1.7.tar.gz

Download URL rtcpxr_collector-0.1.7.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d595356352c34e44ce7ebd0222929865e16d420564d1458640b86ac58253904b
BLAKE2b-256 checksum
How to use checksums
41a9de2ae4b28af533ea8af2fa9955ff6c51a64fe2cee58397f281dfbf061601
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

Release files / rtcpxr_collector-0.1.7-py3-none-any.whl

Download URL rtcpxr_collector-0.1.7-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7017bfc6e54c4bd076e274ca8b982ed94a43c8ef5fce4bb472d8ee73e4fa848
BLAKE2b-256 checksum
How to use checksums
4a579f9cd4aa4a7381ec71f1dc7bfce0a09e70b1b7efe3d0d2e625014693312e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.5

Security for rtcpxr-collector 0.1.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page