Yeti-Switch logo

Yeti-Switch

  •  0 ratings
In category: Communication / SIP

About Yeti-Switch

Transit class4 softswitch(SBC) with integrated billing and routing engine and REST API.

  •   502  
  •   0  
  •   0  
  •   0  
Github stats:
  •  Commits: 1,618  
  •   37  
  •   29  
  •  Latest commit: Feb 13, 2023  

Deploy this app to Linode with a free $100 credit!

Languages/Platforms/Technologies:
Lincenses:

More about Yeti-Switch

Welcome to YETI

Tests Coverage Status Made in Ukraine

Stand With Ukraine

YETI is an open source project based on SBC module of SEMS. The main goal is to move routing logic and entire softswitch behaviour to a separated layer. This approach provides flexibility, ability to quickly add a non-trivial features and simply integrate it with other systems. It is possible to completely change the business logic by changing only the management layer component. YETI consists of few separate parts:

  • Core - modified SEMS and YETI SEMS module binaries.
  • Management layer - set of tables and appropriate PL/pgSQL stored procedures. As a database system we have chosen PostgreSQL.
  • Web-interface to manage YETI on Rails.

Contributing, Development setup

Ruby

You have to use Ruby version 2.7 with installed bundler.

Postgresql

It is strongly recommended to use PostgreSQL version 13. The easiest way to install it - is to use Debian Linux and follow official PostgreSQL instruction https://www.postgresql.org/download/linux/debian/

You need to install:

curl https://pkg.yeti-switch.org/key.gpg | sudo apt-key add -
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo add-apt-repository "deb http://pkg.yeti-switch.org/debian/buster unstable main"
sudo add-apt-repository "deb http://deb.debian.org/debian buster main buster non-free"
sudo add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main"
sudo apt-get install postgresql-13 postgresql-contrib-13 postgresql-13-prefix postgresql-13-pgq3 postgresql-13-pgq-ext postgresql-13-yeti postgresql-13-pllua
sudo apt-get install -t buster-pgdg libpq-dev
In addition you need to compile or install from .deb package Yeti PostgreSQL extension postgresql-13-yeti https://github.com/yeti-switch/yeti-pg-ext

Preparing yeti-web application

Fork and clone yeti-web repository and run:

bundle install

Then create config/database.yml, example is config/database.yml.development. Notice this project uses two databases main "yeti" and second database "cdr"

Then create config/yeti_web.yml, example is config/yeti_web.yml.development.

To disable the creation of new versions via paper_trail for some model please fill the array under key versioning_disable_for_models in the config/yeti_web.yml

Сreate config/policy_roles.yml, example is config/policy_roles.yml.distr or disable policy feature by changing following lines in config/yeti_web.yml:

role_policy:
  when_no_config: allow
  when_no_policy_class: allow

And run command to create development database:

RAILS_ENV=development bundle exec rake db:create db:schema:load db:migrate db:seed

Then start rails server bundle exec rails s and login to http://localhost:3000/ with login admin and password 111111

Then prepare test database(do not use db:test:prepare).

RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate db:seed

This project has CDR-database, configured as cdr see https://guides.rubyonrails.org/active_record_multiple_databases.html And all commands should be run explicitly by calling "db:*:cdr" commands.

NOTICE: Test DB needs seeds, actually only PGQ seed.

And run tests:

bundle exec rspec

Migrations

When you run several migrations in a row, you may wish to stop at some point. In this case you should add stop_step method to the migration:

# example /db/migrate/20171105085529_one.rb
def change
  # do something
end

def stop_step
  true
end

In this case all migrations after this one will no be performed. To continue migration process you should run rake db:migrate command again.

If you do not want to migrate with stops, use env-variable IGNORE_STOPS=true

IGNORE_STOPS=true bundle exec rake db:migrate

Migrations that insert rows into yeti database

RAILS_ENV=test bundle exec rake db:create db:schema:load db:seed
# create migration inside db/migrations
RAILS_ENV=test bundle exec rake db:migrate
# SCHEMA_NAME - schema of table into which you've inserted row(s)
# YETI_TEST_DB_NAME - yeti test database name on local machine
pg_dump --column-inserts --data-only --schema=SCHEMA_NAME --file=db/seeds/main/SCHEMA_NAME.sql YETI_TEST_DB_NAME

Use Docker Postgres for development

For development purpouse it is convinient to use PostgreSQL from Docker image. Here is the instruction how to set it up-and-running:

  • Install Docker(Ubuntu example)

Install Docker on Ubuntu 18.10

  • Run following commands in terminal from yeti-web projects directory
sudo docker build -t yeti_postgres -f ci/pg13.Dockerfile .
  • Start the Postgres Server using docker image, with remapped port to 3010 and volume "yetiPgData" to persist data after docker container stops:
sudo docker run -p 3010:5432 --volume yetiPgData:/var/lib/postgresql yeti_postgres
  • Update config/database.yml with
username: postgres
password:
port: 3010

Comments (0)

Please login to join the discussion on this project.

Yeti-Switch Reviews (0)

Overall Rating

None

based on 0 ratings

Please login to review this project.

No reviews for this project yet.

↑ back to top

pCloud Lifetime

Popular Projects

FluxBB

in Social Networks and Forums
 33k    0    0    0  

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Libreddit

in Social Networks and Forums
 7k    0    1    0  

Dashboard

in Personal Dashboards
 5k    0    0    0  

Audiobookshelf

in Audio Streaming
 5k    0    1    0  

CasaOS

in Self-hosting Solutions
 5k    0    0    0  

Mediagoblin

in Photo and Video Galleries
 4k    0    0    0  

Most Discussed

Nextcloud

in File Transfer & Synchronization
 20k    1    1    0  

Tube Archivist

in Automation
 3k    0    1    0  

OneDev

in Project Management
 2k    0    0    0  

iodine

in Proxy
 2k    0    0    0  

Alf.io

in Booking and Scheduling
 2k    0    0    0  

sysPass

in Password Managers
 1k    0    0    0  

Misskey

in Social Networks and Forums
 2k    0    0    0  
Linux VPS from $11/yr.
RackNerd VPS for $11.38/mo

Top Rated Projects

Gitea

 1 rating
in Project Management

Bagisto

 1 rating
in E-commerce

LinkAce

 1 rating
in Bookmarks and Link Sharing

Pydio

 1 rating
in File Transfer & Synchronization

Audiobookshelf

 1 rating
in Audio Streaming

Nextcloud

 1 rating
in File Transfer & Synchronization

Seafile

 1 rating
in File Transfer & Synchronization

Categories

You May Also Be Interested In

Freepbx logo
Freepbx cover

Freepbx

Web-based open source GUI that controls and manages Asteris…

SipXcom logo
SipXcom cover

SipXcom

Open source unified communications system.

FusionPBX logo
FusionPBX cover

FusionPBX

Open source project that provides a customizable and flexib…