All Projects → KalbiProject → Katari

KalbiProject / Katari

Licence: BSD-3-Clause license
Katari - Python Session Initiated Protocol Framework

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Katari

Kalbi
Kalbi - Golang Session Initiated Protocol Framework
Stars: ✭ 85 (+193.1%)
Mutual labels:  sip, telephony, voip, cisco-webex, sip-server, telecommunications, avaya, voip-communications, voip-server, broadworks
Core
Free, easy to setup PBX for small business based on Asterisk 16 core
Stars: ✭ 190 (+555.17%)
Mutual labels:  sip, telephony, asterisk, voip, sip-server, voip-server
Asterisk Cdr Viewer Mod
Simple and fast viewer for Asterisk CDRs and Recordings (Mod)
Stars: ✭ 76 (+162.07%)
Mutual labels:  sip, telephony, asterisk, voip
freepbx
FreePBX container (Asterisk 16; OpenPBX 15 with Backup and IVR modules installed)
Stars: ✭ 36 (+24.14%)
Mutual labels:  sip, telephony, asterisk, sip-server
awesome-rtc
📡 A curated list of awesome Real Time Communications resources
Stars: ✭ 196 (+575.86%)
Mutual labels:  sip, telephony, voip, telecommunications
kamailioexamples
configurations for voip solution architectures and usecases involving SIP servers
Stars: ✭ 59 (+103.45%)
Mutual labels:  sip, voip, sip-server, voip-server
Docker Freepbx
Dockerized FreePBX 15 w/Asterisk 17, Seperate MySQL Database support, and Data Persistence and UCP
Stars: ✭ 331 (+1041.38%)
Mutual labels:  sip, phone, asterisk, voip
SentryPeer
A distributed peer to peer list of bad actor IP addresses and phone numbers collected via a SIP Honeypot.
Stars: ✭ 108 (+272.41%)
Mutual labels:  sip, voip, telecommunications
Routr
Routr: Next-generation SIP Server
Stars: ✭ 788 (+2617.24%)
Mutual labels:  sip, asterisk, voip
Baresip
Baresip is a modular SIP User-Agent with audio and video support
Stars: ✭ 817 (+2717.24%)
Mutual labels:  sip, telephony, voip
Freeswitch
FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
Stars: ✭ 1,213 (+4082.76%)
Mutual labels:  sip, telephony, voip
Homer App
HOMER 7.x Front-End and API Server
Stars: ✭ 88 (+203.45%)
Mutual labels:  sip, asterisk, voip
Browser Phone
A fully featured browser based WebRTC SIP phone for Asterisk
Stars: ✭ 95 (+227.59%)
Mutual labels:  sip, asterisk, voip
Linphone Android
Linphone.org mirror for linphone-android (https://gitlab.linphone.org/BC/public/linphone-android)
Stars: ✭ 740 (+2451.72%)
Mutual labels:  sip, phone, voip
Sippts
Set of tools to audit SIP based VoIP Systems
Stars: ✭ 116 (+300%)
Mutual labels:  sip, asterisk, voip
Ivozprovider
IVOZ Provider - Multitenant solution for VoIP telephony providers
Stars: ✭ 127 (+337.93%)
Mutual labels:  sip, telephony, voip
Ejabberd
Robust, Ubiquitous and Massively Scalable Messaging Platform (XMPP, MQTT, SIP Server)
Stars: ✭ 5,077 (+17406.9%)
Mutual labels:  sip, voip, sip-server
sems-yeti
YETI application for SEMS core
Stars: ✭ 15 (-48.28%)
Mutual labels:  sip, voip, telecommunications
Linphone Iphone
Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)
Stars: ✭ 462 (+1493.1%)
Mutual labels:  sip, phone, voip
Kamailio
Kamailio - The Open Source SIP Server for large VoIP and real-time communication platforms -
Stars: ✭ 1,358 (+4582.76%)
Mutual labels:  sip, telephony, voip

alt text

Katari - SIP (Session Initiated Protocol) Application Framework

PyPI pyversions PyPI version shields.io PyPI license PyPI version shields.io

Documentation

https://katari.readthedocs.io/en/latest/

Installing

pip install Katari 

Installing from Git

pip install git+https://github.com/hyperioxx/Katari.git

Getting Started

to create a katari project run the following command in your terminal

katari --build-app <project name>

app.py

import settings
from Katari import KatariApplication
from Katari.sip.response import ResponseFactory

app = KatariApplication(settings=settings)

@app.invite()
def do_invite(request, client):
    # add INVITE logic here 
    response = ResponseFactory.build(200) # 200 OK
    app.send(request.create_response(response), client)

@app.register()
def do_register(request, client):
    # add REGISTER logic here 
    response = ResponseFactory.build(401) # 401 unauthorized 
    app.send(request.create_response(OK200()), client)

@app.options()
def do_options(request, client):
    # add OPTIONS logic here 
    response = ResponseFactory.build(200) # 200 OK
    app.send(request.create_response(response), client)

@app.info()
def do_info(request, client):
    # add INFO logic here 
    response = ResponseFactory.build(200) # 200 OK
    app.send(request.create_response(response), client)

if __name__ == "__main__":   
    app.run()

Writing your own middleware

create a directory called middleware within your project

myproject -
   - app.py
   - settings.py
   - middleware   << LIKE THIS 
     - __init__.py
     - test.py

your 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.

Example

test.py

from Katari.interfaces import MiddlewareInterface

class Test(MiddlewareInterface):
    
    def process_request(self, message):
        print(str(message))
        return message

    
    def process_response(self, message):
        print(str(message))
        return message

settings.py

"""
##    ##    ###    ########    ###    ########  ####
##   ##    ## ##      ##      ## ##   ##     ##  ##
##  ##    ##   ##     ##     ##   ##  ##     ##  ##
#####    ##     ##    ##    ##     ## ########   ##
##  ##   #########    ##    ######### ##   ##    ##
##   ##  ##     ##    ##    ##     ## ##    ##   ##
##    ## ##     ##    ##    ##     ## ##     ## ####

SIP (Session Initiated Protocol) Application Framework

"""

HOST = "127.0.0.1" #Specify interface to listen on 

PORT = 5060 # Specify port to listen on

ALLOWED_HOSTS = ["127.0.0.1"] # Katari whitelist

USER_AGENT = "Katari Server 0.0.6" # User Agent sent in response 

# Logging settings
KATARI_LOGGING = {
                   "LOGFILE" :"Katari.log",
                   "LEVEL": "INFO", 
                   "OUTPUTMODE": "file"
                 }

# Katari middleware 
KATARI_MIDDLEWARE = [
    'middleware.test',   # Add import path here
    
]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].