python-sip-client


Namepython-sip-client JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummaryA baresip-based, multithreaded, event handling SIP client written in Python
upload_time2025-01-03 00:51:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords baresip communications sip telephony voip
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # python_sip_client - A baresip-based, multithreaded, event handling SIP client written in Python

### Requirements

This package acts as a wrapper for [BareSIP](https://github.com/baresip/baresip), which is required for this package to function. For installation instructions, see the [BareSIP Repository](https://github.com/baresip/baresip). Typically, it can be installed using your favorite linux/macos package manager.

## Installation
`pip3 install python-sip-client`

## Example Usage
    from python_sip_client import BareSIP
    import time

    if __name__ == "__main__":
        # Create BareSIP instance
        bs = BareSIP(debug=False)

        # Define event handlers
        def handle_incoming_call(from_uri):
            print("Incoming call from", from_uri)
            
            x = None
            while x.lower() not in ["a", "h"]:
                x = input("Answer or hangup? (a/h): ")
            
            if x == "a":
                bs.answer()
            else:
                bs.hangup()

        # Set event handlers
        bs.on(BareSIP.Event.INCOMING_CALL, handle_incoming_call)

        try:
            # Start BareSIP
            bs.start()
            
            # Create a user agent
            bs.create_user_agent("user", "password", "domain")

            # Wait for registration
            while not bs.user_agents()[0].registered:
                pass

            bs.dial("user@domain / phone number")

            time.sleep(10)

            bs.hangup()

            while True:
                pass
        finally:
            # Stop BareSIP
            bs.stop()
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-sip-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "baresip, communications, sip, telephony, voip",
    "author": null,
    "author_email": "Michael Schleider <maschleider@yahoo.com>",
    "download_url": null,
    "platform": null,
    "description": "# python_sip_client - A baresip-based, multithreaded, event handling SIP client written in Python\n\n### Requirements\n\nThis package acts as a wrapper for [BareSIP](https://github.com/baresip/baresip), which is required for this package to function. For installation instructions, see the [BareSIP Repository](https://github.com/baresip/baresip). Typically, it can be installed using your favorite linux/macos package manager.\n\n## Installation\n`pip3 install python-sip-client`\n\n## Example Usage\n    from python_sip_client import BareSIP\n    import time\n\n    if __name__ == \"__main__\":\n        # Create BareSIP instance\n        bs = BareSIP(debug=False)\n\n        # Define event handlers\n        def handle_incoming_call(from_uri):\n            print(\"Incoming call from\", from_uri)\n            \n            x = None\n            while x.lower() not in [\"a\", \"h\"]:\n                x = input(\"Answer or hangup? (a/h): \")\n            \n            if x == \"a\":\n                bs.answer()\n            else:\n                bs.hangup()\n\n        # Set event handlers\n        bs.on(BareSIP.Event.INCOMING_CALL, handle_incoming_call)\n\n        try:\n            # Start BareSIP\n            bs.start()\n            \n            # Create a user agent\n            bs.create_user_agent(\"user\", \"password\", \"domain\")\n\n            # Wait for registration\n            while not bs.user_agents()[0].registered:\n                pass\n\n            bs.dial(\"user@domain / phone number\")\n\n            time.sleep(10)\n\n            bs.hangup()\n\n            while True:\n                pass\n        finally:\n            # Stop BareSIP\n            bs.stop()",
    "bugtrack_url": null,
    "license": null,
    "summary": "A baresip-based, multithreaded, event handling SIP client written in Python",
    "version": "0.0.4",
    "project_urls": {
        "Documentation": "https://github.com/mschleid/python_sip_client/wiki",
        "Homepage": "https://github.com/mschleid/python_sip_client",
        "Issues": "https://github.com/mschleid/python_sip_client/issues"
    },
    "split_keywords": [
        "baresip",
        " communications",
        " sip",
        " telephony",
        " voip"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7fa112cb7152a6d78bd179782cff967eb7fe47b07fa9e418c95df54a60e48cb",
                "md5": "85e6c7e5723d61e9b217e1ec0c1fa678",
                "sha256": "b251f6ae5f5d48d1deade99a52ba3f57422fbcdc528c629eb94d5509cf465767"
            },
            "downloads": -1,
            "filename": "python_sip_client-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "85e6c7e5723d61e9b217e1ec0c1fa678",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 5803,
            "upload_time": "2025-01-03T00:51:48",
            "upload_time_iso_8601": "2025-01-03T00:51:48.631301Z",
            "url": "https://files.pythonhosted.org/packages/c7/fa/112cb7152a6d78bd179782cff967eb7fe47b07fa9e418c95df54a60e48cb/python_sip_client-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-03 00:51:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mschleid",
    "github_project": "python_sip_client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "python-sip-client"
}
        
Elapsed time: 3.30529s