{"id":22750219,"url":"https://github.com/hyperioxx/katari","last_synced_at":"2025-07-08T00:37:59.439Z","repository":{"id":104187758,"uuid":"116312992","full_name":"hyperioxx/Katari","owner":"hyperioxx","description":"Katari -  Python Session Initiated Protocol Framework","archived":false,"fork":false,"pushed_at":"2022-12-25T21:33:27.000Z","size":159,"stargazers_count":3,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T13:02:18.870Z","etag":null,"topics":["asterisk","avaya","broadsoft","broadworks","cisco-webex","phone","python","sip","sip-library","sip-server","sip-stack","sip-uri","telecommunications","telephony","voip","voip-communications","voip-server"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperioxx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-01-04T22:15:58.000Z","updated_at":"2024-10-30T10:24:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"a8ff259e-4263-41fe-807b-8aada6ac2dc6","html_url":"https://github.com/hyperioxx/Katari","commit_stats":null,"previous_names":["hyperioxx/katari"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/hyperioxx/Katari","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperioxx%2FKatari","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperioxx%2FKatari/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperioxx%2FKatari/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperioxx%2FKatari/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperioxx","download_url":"https://codeload.github.com/hyperioxx/Katari/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperioxx%2FKatari/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262594500,"owners_count":23334226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asterisk","avaya","broadsoft","broadworks","cisco-webex","phone","python","sip","sip-library","sip-server","sip-stack","sip-uri","telecommunications","telephony","voip","voip-communications","voip-server"],"created_at":"2024-12-11T04:13:02.985Z","updated_at":"2025-06-29T12:33:22.046Z","avatar_url":"https://github.com/hyperioxx.png","language":"Python","readme":"![alt text](https://github.com/hyperioxx/Katari/blob/master/Katari.png \"Katari Logo\")\n\n# Katari - SIP (Session Initiated Protocol) Application Framework\n\n[![PyPI pyversions](https://img.shields.io/pypi/status/Katari.svg)](https://pypi.org/project/Katari/)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/Katari.svg)](https://pypi.python.org/pypi/Katari/)\n[![PyPI license](https://img.shields.io/pypi/l/Katari.svg)](https://pypi.python.org/pypi/Katari/)\n![PyPI version shields.io](https://img.shields.io/pypi/dm/Katari.svg)\n\n\n## Documentation \n\nhttps://katari.readthedocs.io/en/latest/\n\n\n## Installing\n\n```\npip install Katari \n```\n\n## Installing from Git\n\n```\npip install git+https://github.com/hyperioxx/Katari.git\n```\n\n\n## Getting Started\n\nto create a katari project run the following command in your terminal\n\n```bash\nkatari --build-app \u003cproject name\u003e\n```\n\n\n#### app.py\n```python\nimport settings\nfrom Katari import KatariApplication\nfrom Katari.sip.response import ResponseFactory\n\napp = KatariApplication(settings=settings)\n\n@app.invite()\ndef do_invite(request, client):\n    # add INVITE logic here \n    response = ResponseFactory.build(200) # 200 OK\n    app.send(request.create_response(response), client)\n\n@app.register()\ndef do_register(request, client):\n    # add REGISTER logic here \n    response = ResponseFactory.build(401) # 401 unauthorized \n    app.send(request.create_response(OK200()), client)\n\n@app.options()\ndef do_options(request, client):\n    # add OPTIONS logic here \n    response = ResponseFactory.build(200) # 200 OK\n    app.send(request.create_response(response), client)\n\n@app.info()\ndef do_info(request, client):\n    # add INFO logic here \n    response = ResponseFactory.build(200) # 200 OK\n    app.send(request.create_response(response), client)\n\nif __name__ == \"__main__\":   \n    app.run()\n\n```\n\n\n## Writing your own middleware\n\ncreate a directory called middleware within your project\n\n```\nmyproject -\n   - app.py\n   - settings.py\n   - middleware   \u003c\u003c LIKE THIS \n     - __init__.py\n     - test.py\n```\n\nyour middleware can modify the sip message before it reaches your main logic using the process_request method and also modify the response before it gets sent back to the client using process response method.\n\n#### Example\n\ntest.py\n```python \n\n\nfrom Katari.interfaces import MiddlewareInterface\n\nclass Test(MiddlewareInterface):\n    \n    def process_request(self, message):\n        print(str(message))\n        return message\n\n    \n    def process_response(self, message):\n        print(str(message))\n        return message\n\n```\nsettings.py\n\n```python\n\"\"\"\n##    ##    ###    ########    ###    ########  ####\n##   ##    ## ##      ##      ## ##   ##     ##  ##\n##  ##    ##   ##     ##     ##   ##  ##     ##  ##\n#####    ##     ##    ##    ##     ## ########   ##\n##  ##   #########    ##    ######### ##   ##    ##\n##   ##  ##     ##    ##    ##     ## ##    ##   ##\n##    ## ##     ##    ##    ##     ## ##     ## ####\n\nSIP (Session Initiated Protocol) Application Framework\n\n\"\"\"\n\nHOST = \"127.0.0.1\" #Specify interface to listen on \n\nPORT = 5060 # Specify port to listen on\n\nALLOWED_HOSTS = [\"127.0.0.1\"] # Katari whitelist\n\nUSER_AGENT = \"Katari Server 0.0.6\" # User Agent sent in response \n\n# Logging settings\nKATARI_LOGGING = {\n                   \"LOGFILE\" :\"Katari.log\",\n                   \"LEVEL\": \"INFO\", \n                   \"OUTPUTMODE\": \"file\"\n                 }\n\n# Katari middleware \nKATARI_MIDDLEWARE = [\n    'middleware.test',   # Add import path here\n    \n]\n\n\n\n```\n\n\n\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperioxx%2Fkatari","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperioxx%2Fkatari","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperioxx%2Fkatari/lists"}