Skip to main content

Pre-built Windows wheels for PJSUA2 with bundled VC++ Runtime - Python bindings for PJSIP (SIP/VoIP Library)

Project description

PJSUA2-Wheel - Standalone Windows Wheels for PJSIP

Truly standalone Windows wheels for PJSUA2! 🎉

This package provides pre-compiled Windows wheels for PJSUA2 (Python bindings for PJSIP) with bundled Visual C++ Runtime DLLs. No additional installations required - just pip install and start coding!

Note: This is a community-maintained wheel distribution. For the official source package, see pjsua2 on PyPI.

What's New in 2.15.3

Standalone Wheels - All required Visual C++ Runtime DLLs are now bundled!
No VC++ Redistributable needed - Works on clean Windows systems
Standard Import - Use import pjsua2 (not pjsua2_standalone)
Fixed Import Issues - Resolved module loading problems from 2.15.2
Optimized Size - Wheel size (~2.7 MB)
Python 3.9-3.12 support - Wheels for all modern Python versions

Quick Installation

Windows (Pre-built wheels!)

pip install pjsua2-wheel

No compilation required! The wheel includes everything you need:

  • ✅ Pre-compiled PJSIP libraries
  • ✅ Bundled Visual C++ Runtime DLLs
  • ✅ No Visual Studio required
  • ✅ No VC++ Redistributable installation needed

Package name: pjsua2-wheel (for pip install)
Import name: pjsua2 (for Python code)

Other Platforms

Building from source requires C++ compiler, SWIG, and Python headers.
See PJSIP documentation for details.

Features

SIP Protocol Stack - Full RFC 3261 implementation
Audio/Video Calls - HD voice and video support
Media Handling - Codecs, RTP/RTCP, jitter buffer
NAT Traversal - STUN, TURN, ICE support
Secure Communications - TLS, SRTP encryption
Conferencing - Audio mixing and conferencing
IM & Presence - Instant messaging and presence

Quick Start

import pjsua2 as pj

# Create and initialize endpoint
ep = pj.Endpoint()
ep.libCreate()

ep_cfg = pj.EpConfig()
ep.libInit(ep_cfg)

# Create SIP transport
sipTpConfig = pj.TransportConfig()
sipTpConfig.port = 5060
ep.transportCreate(pj.PJSIP_TRANSPORT_UDP, sipTpConfig)

# Start the library
ep.libStart()

print(f"PJSIP {ep.libVersion().full} started!")

# Your SIP application code here...

# Cleanup
ep.libDestroy()

Example: SIP Registration

import pjsua2 as pj

class MyAccount(pj.Account):
    def onRegState(self, prm):
        ai = self.getInfo()
        print(f"Registration: {ai.regStatusText}")

# Configure account
acc_cfg = pj.AccountConfig()
acc_cfg.idUri = "sip:user@example.com"
acc_cfg.regConfig.registrarUri = "sip:example.com"

# Add credentials
cred = pj.AuthCredInfo()
cred.scheme = "digest"
cred.realm = "*"
cred.username = "user"
cred.dataType = pj.PJSIP_CRED_DATA_PLAIN_PASSWD
cred.data = "password"
acc_cfg.sipConfig.authCreds.append(cred)

# Create account
acc = MyAccount()
acc.create(acc_cfg)

Example: Making a Call

class MyCall(pj.Call):
    def onCallState(self, prm):
        ci = self.getInfo()
        print(f"Call state: {ci.stateText}")

# Make a call
call = MyCall(account)
prm = pj.CallOpParam()
call.makeCall("sip:destination@example.com", prm)

Documentation

Platform Support

Platform Python Versions Status
Windows x64 3.9, 3.10, 3.11, 3.12 ✅ Pre-built wheels
Linux 3.9+ ⚠️ Build from source
macOS 3.9+ ⚠️ Build from source

What's New in 2.15

  • Improved WebRTC integration
  • Better audio quality
  • Enhanced security features
  • Bug fixes and performance improvements

Building from Source

If pre-built wheels aren't available for your platform:

Requirements:

  • C++ compiler (GCC, Clang, or MSVC)
  • SWIG 4.x
  • Python development headers

Linux/macOS:

git clone https://github.com/pjsip/pjproject.git
cd pjproject
./configure CFLAGS="-fPIC"
make dep && make
cd pjsip-apps/src/swig
make
cd python
make && make install

Windows:

See Windows build guide

Troubleshooting

Import Error on Windows

# Make sure you have Visual C++ Redistributable
# Download from: https://aka.ms/vs/17/release/vc_redist.x64.exe

Audio Issues

# List available audio devices
ep = pj.Endpoint()
ep.libCreate()
ep_cfg = pj.EpConfig()
ep.libInit(ep_cfg)

audDevManager = ep.audDevManager()
devCount = audDevManager.getDevCount()
for i in range(devCount):
    info = audDevManager.getDevInfo(i)
    print(f"Device {i}: {info.name}")

Examples

Check out the examples in the PJSIP repository.

Support

License

GNU GPL v2 or later

Credits

  • PJSIP Team at Teluu Inc.
  • Contributors from around the world
  • Windows Wheels maintained by community contributors

Contributing

Contributions welcome! See the PJSIP project for details.


Made with ❤️ by the PJSIP community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pjsua2_wheel-2.15.3-cp312-cp312-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.12Windows x86-64

pjsua2_wheel-2.15.3-cp311-cp311-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11Windows x86-64

pjsua2_wheel-2.15.3-cp310-cp310-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.10Windows x86-64

pjsua2_wheel-2.15.3-cp39-cp39-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.9Windows x86-64

File details

Details for the file pjsua2_wheel-2.15.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pjsua2_wheel-2.15.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 085801f8479efcf69cf60d2b26ce3e73f7a7de7ba4d38bc8eb4b84c88c2a19e9
MD5 e47595e87b4668298988ff52db0afd03
BLAKE2b-256 3f0eb46c5f42c43658333f45502be92456de8af63763e6925531bafa66854979

See more details on using hashes here.

File details

Details for the file pjsua2_wheel-2.15.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pjsua2_wheel-2.15.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 7da0a17c3b55712d57c12ff631b9c05f385d6f8a6809126ba7566bacce206f3f
MD5 59c75d932b25ca234864b4900bf7a8da
BLAKE2b-256 48cbec3a43a3bf80aa907b34df3020e988d22ad4576c6faaa983b719bfe64b27

See more details on using hashes here.

File details

Details for the file pjsua2_wheel-2.15.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pjsua2_wheel-2.15.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bbb7d2f43e6376d7239dfe8b7947a4b2041b7e452ffe261e19728e2db973974d
MD5 07e688c6493501af4f47b173ba881533
BLAKE2b-256 9edd0c3b48c20ed9601c2e43a048876284e59e092e59f1fc03abf47452124f4c

See more details on using hashes here.

File details

Details for the file pjsua2_wheel-2.15.3-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pjsua2_wheel-2.15.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0f6f2f31caf24917eb4d8731d7399662f02a24727d3d6d2fba22ae3650f09df8
MD5 45bba00fc33d3248edb149386bee9b53
BLAKE2b-256 e1128d921b519a0f0470e5d8a94376511725e5e044b261a3fd737217b1ca2f3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page