Skip to content

Instantly share code, notes, and snippets.

View cyrenity's full-sized avatar
🏠
Working from home

Ghulam Mustafa cyrenity

🏠
Working from home
View GitHub Profile
@cyrenity
cyrenity / freeswitch_development_notes.md
Created January 14, 2026 10:45
FreeSWITCH Dev notes

FreeSWITCH Development Guide

This guide provides an overview of the FreeSWITCH internal architecture, based on core principles and enriched with examples from the actual codebase. It is designed to help developers use the framework effectively.

Core Architecture

The FreeSWITCH core functions as a library (libfreeswitch), contained primarily in src/*.c. It provides common abstractions and services used by modules.

Key Components

  • OS Abstraction (src/switch_apr.c): Wraps the Apache Portable Runtime (APR). Do not use APR directly; use switch_ prefixed functions for threads, sockets, mutexes, and memory management.
@cyrenity
cyrenity / verto_proto.md
Created January 7, 2026 09:44
FreeSWITCH Verto (mod_verto) Protocol

FreeSWITCH Verto Protocol Documentation

This document describes the Verto protocol, a JSON-RPC 2.0 protocol used by FreeSWITCH's [mod_verto] to provide WebRTC signaling and event handling over Secure WebSockets (WSS).

Overview

  • Protocol: JSON-RPC 2.0
  • Transport: Secure WebSockets (WSS)
  • Endpoint: mod_verto acts as the server endpoint.
@cyrenity
cyrenity / websock_server_deepgram.py
Created October 26, 2024 12:16
Reference implementation of backend websocket server for mod_audio_fork!
import asyncio
import soundfile as sf
import numpy as np
import json
import websockets
import os
import logging
@cyrenity
cyrenity / API Preview
Created September 1, 2024 08:35
Django FreeSWITCH API
Visit following link to view API speficications!
https://app.swaggerhub.com/apis/cyrenity/FooSWITCH/v1
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
#!/usr/bin/env python3
import numpy as np
import os
import sys
import asyncio
import websockets
import concurrent.futures
import logging
import os
@cyrenity
cyrenity / l2-switch-using-openvswitch.png
Last active July 11, 2021 14:13
L2 Switch Using OpenVSwitch
## Setup L2 switch OpenVSwitch
@cyrenity
cyrenity / OpenvSwitch-Faucet-Lab1.png
Last active April 27, 2025 11:01
SDN using Open vSwitch and KVM
OpenvSwitch-Faucet-Lab1.png
@cyrenity
cyrenity / create_port.sh
Last active June 18, 2021 21:35
Create openstack port and bind it with one of management/storage/network node of your openstack cluster
# A Small Script for creating a port in an internal network and binding it with one of control/neutron node
#### !!!! CAUTION !!!! #####
# DO NOT RUN THIS SCRIPT UNLESS YOU KNOW HOW EACH LINE IS GOING TO DO WITH YOUR OPENSTACK INSTALL
# YOU ARE ADVISED TO FIRST UNDERSTAND AND THAN RUN EACH LINE OF THIS SCRIPT INTERACTIVELY
############################
NETWORK_NAME=demo1
SUBNET_NAME=demo1-net
MGMT_PORT_IP=172.16.2.10
@cyrenity
cyrenity / Parition_Layout.txt
Last active March 24, 2025 21:46
Ubuntu 20.04 Auto-install custom storage layout for multiple volume groups
Device: /dev/vda
Partition Table: gpt
/dev/sda1 - 1MB - for UEFI/Bootloader
/dev/sda2 - 10G - root partition
/dev/sda3 - Remaining Space - for cinder-volumes
LVM Volume Groups: