├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── config.yml └── workflows │ └── docker-image.yml ├── .gitignore ├── .vscode ├── extensions.json └── settings.json ├── CHANGELOG.md ├── CITATION.cff ├── CODE_OF_CONDUCT.md ├── CONTRIBUTORS ├── COPYING ├── Dockerfile ├── LICENSE-AGPL-V3.md ├── README.md ├── doc └── architecture │ └── decisions │ ├── 0001-choose-config-storage.md │ └── template.md ├── docs ├── __README.md ├── api.md ├── assets │ ├── images │ │ └── pistachios.jpg │ └── stylesheets │ │ └── extra.css ├── bestpractices.en.md ├── bestpractices.fr.md ├── changelog │ └── index.md ├── contributing │ ├── index.md │ ├── reporting-a-bug.md │ ├── reporting-a-docs-issue.md │ └── requesting-a-change.md ├── faq │ ├── do-I-need-a-sbc-voip.en.md │ ├── do-I-need-a-sbc-voip.fr.md │ ├── index.en.md │ ├── index.fr.md │ ├── is-anyone-is-running-pyfreebilling-in-production.en.md │ ├── is-anyone-is-running-pyfreebilling-in-production.fr.md │ ├── is-pks-softswitch.en.md │ ├── is-pks-softswitch.fr.md │ ├── lcr-routing.en.md │ ├── lcr-routing.fr.md │ ├── pyfreebilling-pks-differences.en.md │ ├── pyfreebilling-pks-differences.fr.md │ ├── voip-softswitch-caracteristics.en.md │ └── voip-softswitch-caracteristics.fr.md ├── getting-started.en.md ├── getting-started.fr.md ├── how-to │ ├── apiban.md │ ├── backup-recovery.en.md │ ├── backup-recovery.fr.md │ ├── failover.en.md │ ├── failover.fr.md │ ├── loadbalancing.en.md │ ├── loadbalancing.fr.md │ ├── multi-tenant-ipbx.en.md │ ├── multi-tenant-ipbx.fr.md │ ├── pks-standby-failover.en.md │ ├── pks-standby-failover.fr.md │ ├── troubleshooting.en.md │ ├── troubleshooting.fr.md │ ├── upgrade.en.md │ └── upgrade.fr.md ├── index.en.md ├── index.fr.md ├── license.md ├── philosophy.en.md ├── philosophy.fr.md ├── swagger.json ├── theme_overrides │ ├── 404.html │ └── main.html ├── use-cases │ ├── connecting-ipbx-to-multiple-carriers.en.md │ ├── connecting-mutitenant-ipbx-to-carrier.en.md │ ├── failover.en.md │ ├── geographical-distribution-ipbx.en.md │ ├── ipbx-high-availability.en.md │ ├── securing-telephony-system.en.md │ ├── usecases.en.md │ └── usecases.fr.md └── user-guide │ ├── advanced-configuration.en.md │ ├── advanced-configuration.fr.md │ ├── cli.md │ ├── configuration.en.md │ ├── configuration.fr.md │ ├── installation.en.md │ ├── installation.fr.md │ ├── manage-fr.md │ ├── manage.en.md │ ├── requirements.en.md │ └── requirements.fr.md ├── jampack.config.mjs ├── mkdocs.yml ├── netlify.toml ├── package-lock.json ├── package.json ├── pyfb.code-workspace ├── requirements.txt ├── runtime.txt ├── site ├── 404.html ├── __README │ └── index.html ├── api │ └── index.html ├── assets │ ├── images │ │ ├── favicon.png │ │ ├── pistachios.jpg │ │ └── social │ │ │ ├── __README.png │ │ │ ├── api.png │ │ │ ├── bestpractices.en.png │ │ │ ├── bestpractices.fr.png │ │ │ ├── changelog │ │ │ └── index.png │ │ │ ├── contributing │ │ │ ├── index.png │ │ │ ├── reporting-a-bug.png │ │ │ ├── reporting-a-docs-issue.png │ │ │ └── requesting-a-change.png │ │ │ ├── faq │ │ │ ├── do-I-need-a-sbc-voip.en.png │ │ │ ├── do-I-need-a-sbc-voip.fr.png │ │ │ ├── index.en.png │ │ │ ├── index.fr.png │ │ │ ├── is-anyone-is-running-pyfreebilling-in-production.en.png │ │ │ ├── is-anyone-is-running-pyfreebilling-in-production.fr.png │ │ │ ├── is-pks-softswitch.en.png │ │ │ ├── is-pks-softswitch.fr.png │ │ │ ├── lcr-routing.en.png │ │ │ ├── lcr-routing.fr.png │ │ │ ├── pyfreebilling-pks-differences.en.png │ │ │ ├── pyfreebilling-pks-differences.fr.png │ │ │ ├── voip-softswitch-caracteristics.en.png │ │ │ └── voip-softswitch-caracteristics.fr.png │ │ │ ├── getting-started.en.png │ │ │ ├── getting-started.fr.png │ │ │ ├── how-to │ │ │ ├── apiban.png │ │ │ ├── backup-recovery.en.png │ │ │ ├── backup-recovery.fr.png │ │ │ ├── failover.en.png │ │ │ ├── failover.fr.png │ │ │ ├── loadbalancing.en.png │ │ │ ├── loadbalancing.fr.png │ │ │ ├── multi-tenant-ipbx.en.png │ │ │ ├── multi-tenant-ipbx.fr.png │ │ │ ├── pks-standby-failover.en.png │ │ │ ├── pks-standby-failover.fr.png │ │ │ ├── troubleshooting.en.png │ │ │ ├── troubleshooting.fr.png │ │ │ ├── upgrade.en.png │ │ │ └── upgrade.fr.png │ │ │ ├── index.en.png │ │ │ ├── index.fr.png │ │ │ ├── license.png │ │ │ ├── philosophy.en.png │ │ │ ├── philosophy.fr.png │ │ │ ├── use-cases │ │ │ ├── connecting-ipbx-to-multiple-carriers.en.png │ │ │ ├── connecting-mutitenant-ipbx-to-carrier.en.png │ │ │ ├── failover.en.png │ │ │ ├── geographical-distribution-ipbx.en.png │ │ │ ├── ipbx-high-availability.en.png │ │ │ ├── securing-telephony-system.en.png │ │ │ ├── usecases.en.png │ │ │ └── usecases.fr.png │ │ │ └── user-guide │ │ │ ├── advanced-configuration.en.png │ │ │ ├── advanced-configuration.fr.png │ │ │ ├── cli.png │ │ │ ├── configuration.en.png │ │ │ ├── configuration.fr.png │ │ │ ├── installation.en.png │ │ │ ├── installation.fr.png │ │ │ ├── manage-fr.png │ │ │ ├── manage.en.png │ │ │ ├── requirements.en.png │ │ │ └── requirements.fr.png │ ├── javascripts │ │ ├── bundle.fe8b6f2b.min.js │ │ ├── bundle.fe8b6f2b.min.js.map │ │ ├── lunr │ │ │ ├── min │ │ │ │ ├── lunr.ar.min.js │ │ │ │ ├── lunr.da.min.js │ │ │ │ ├── lunr.de.min.js │ │ │ │ ├── lunr.du.min.js │ │ │ │ ├── lunr.el.min.js │ │ │ │ ├── lunr.es.min.js │ │ │ │ ├── lunr.fi.min.js │ │ │ │ ├── lunr.fr.min.js │ │ │ │ ├── lunr.he.min.js │ │ │ │ ├── lunr.hi.min.js │ │ │ │ ├── lunr.hu.min.js │ │ │ │ ├── lunr.hy.min.js │ │ │ │ ├── lunr.it.min.js │ │ │ │ ├── lunr.ja.min.js │ │ │ │ ├── lunr.jp.min.js │ │ │ │ ├── lunr.kn.min.js │ │ │ │ ├── lunr.ko.min.js │ │ │ │ ├── lunr.multi.min.js │ │ │ │ ├── lunr.nl.min.js │ │ │ │ ├── lunr.no.min.js │ │ │ │ ├── lunr.pt.min.js │ │ │ │ ├── lunr.ro.min.js │ │ │ │ ├── lunr.ru.min.js │ │ │ │ ├── lunr.sa.min.js │ │ │ │ ├── lunr.stemmer.support.min.js │ │ │ │ ├── lunr.sv.min.js │ │ │ │ ├── lunr.ta.min.js │ │ │ │ ├── lunr.te.min.js │ │ │ │ ├── lunr.th.min.js │ │ │ │ ├── lunr.tr.min.js │ │ │ │ ├── lunr.vi.min.js │ │ │ │ └── lunr.zh.min.js │ │ │ ├── tinyseg.js │ │ │ └── wordcut.js │ │ └── workers │ │ │ ├── search.b8dbb3d2.min.js │ │ │ └── search.b8dbb3d2.min.js.map │ └── stylesheets │ │ ├── extra.css │ │ ├── main.6543a935.min.css │ │ ├── main.6543a935.min.css.map │ │ ├── palette.06af60db.min.css │ │ └── palette.06af60db.min.css.map ├── bestpractices │ └── index.html ├── changelog │ └── index.html ├── contributing │ ├── index.html │ ├── reporting-a-bug │ │ └── index.html │ ├── reporting-a-docs-issue │ │ └── index.html │ └── requesting-a-change │ │ └── index.html ├── faq │ ├── do-I-need-a-sbc-voip │ │ └── index.html │ ├── index.html │ ├── is-anyone-is-running-pyfreebilling-in-production │ │ └── index.html │ ├── is-pks-softswitch │ │ └── index.html │ ├── lcr-routing │ │ └── index.html │ ├── pyfreebilling-pks-differences │ │ └── index.html │ └── voip-softswitch-caracteristics │ │ └── index.html ├── feed_json_created.json ├── feed_json_updated.json ├── feed_rss_created.xml ├── feed_rss_updated.xml ├── fr │ ├── __README │ │ └── index.html │ ├── api │ │ └── index.html │ ├── bestpractices │ │ └── index.html │ ├── changelog │ │ └── index.html │ ├── contributing │ │ ├── index.html │ │ ├── reporting-a-bug │ │ │ └── index.html │ │ ├── reporting-a-docs-issue │ │ │ └── index.html │ │ └── requesting-a-change │ │ │ └── index.html │ ├── faq │ │ ├── do-I-need-a-sbc-voip │ │ │ └── index.html │ │ ├── index.html │ │ ├── is-anyone-is-running-pyfreebilling-in-production │ │ │ └── index.html │ │ ├── is-pks-softswitch │ │ │ └── index.html │ │ ├── lcr-routing │ │ │ └── index.html │ │ ├── pyfreebilling-pks-differences │ │ │ └── index.html │ │ └── voip-softswitch-caracteristics │ │ │ └── index.html │ ├── getting-started │ │ └── index.html │ ├── how-to │ │ ├── apiban │ │ │ └── index.html │ │ ├── backup-recovery │ │ │ └── index.html │ │ ├── failover │ │ │ └── index.html │ │ ├── loadbalancing │ │ │ └── index.html │ │ ├── multi-tenant-ipbx │ │ │ └── index.html │ │ ├── pks-standby-failover │ │ │ └── index.html │ │ ├── troubleshooting │ │ │ └── index.html │ │ └── upgrade │ │ │ └── index.html │ ├── index.html │ ├── license │ │ └── index.html │ ├── philosophy │ │ └── index.html │ ├── use-cases │ │ ├── connecting-ipbx-to-multiple-carriers │ │ │ └── index.html │ │ ├── connecting-mutitenant-ipbx-to-carrier │ │ │ └── index.html │ │ ├── failover │ │ │ └── index.html │ │ ├── geographical-distribution-ipbx │ │ │ └── index.html │ │ ├── ipbx-high-availability │ │ │ └── index.html │ │ ├── securing-telephony-system │ │ │ └── index.html │ │ └── usecases │ │ │ └── index.html │ └── user-guide │ │ ├── advanced-configuration │ │ └── index.html │ │ ├── cli │ │ └── index.html │ │ ├── configuration │ │ └── index.html │ │ ├── installation │ │ └── index.html │ │ ├── manage-fr │ │ └── index.html │ │ ├── manage │ │ └── index.html │ │ └── requirements │ │ └── index.html ├── getting-started │ └── index.html ├── how-to │ ├── apiban │ │ └── index.html │ ├── backup-recovery │ │ └── index.html │ ├── failover │ │ └── index.html │ ├── loadbalancing │ │ └── index.html │ ├── multi-tenant-ipbx │ │ └── index.html │ ├── pks-standby-failover │ │ └── index.html │ ├── troubleshooting │ │ └── index.html │ └── upgrade │ │ └── index.html ├── index.html ├── license │ └── index.html ├── philosophy │ └── index.html ├── search │ └── search_index.json ├── sitemap.xml ├── sitemap.xml.gz ├── swagger.json ├── theme_overrides │ ├── 404.html │ └── main.html ├── use-cases │ ├── connecting-ipbx-to-multiple-carriers │ │ └── index.html │ ├── connecting-mutitenant-ipbx-to-carrier │ │ └── index.html │ ├── failover │ │ └── index.html │ ├── geographical-distribution-ipbx │ │ └── index.html │ ├── ipbx-high-availability │ │ └── index.html │ ├── securing-telephony-system │ │ └── index.html │ └── usecases │ │ └── index.html └── user-guide │ ├── advanced-configuration │ └── index.html │ ├── cli │ └── index.html │ ├── configuration │ └── index.html │ ├── installation │ └── index.html │ ├── manage-fr │ └── index.html │ ├── manage │ └── index.html │ └── requirements │ └── index.html └── src ├── basic-install.sh ├── pks └── sip ├── .envrc ├── Dockerfile.dbtext ├── Dockerfile.mysql ├── Dockerfile.sqlite3 ├── Dockerfile.test ├── Makefile ├── README.md ├── api_tests.md ├── bootstrap.sh ├── cron └── pks ├── db ├── acc ├── acc_cdrs ├── address ├── dialog ├── dialog_vars ├── dialplan ├── dispatcher ├── domain ├── domain_attrs ├── htable ├── mysql │ └── init.sql ├── postgresql │ └── init.sql ├── rtpengine ├── sqlite │ └── init.sql ├── tenant └── version ├── docker-compose.fs.yml ├── docker-compose.mysql.yml ├── docker-compose.postgres.yml ├── docker-compose.test.yml ├── docker-compose.yml ├── kamailio.cfg ├── template.kamailio-local.cfg └── tests ├── db-test ├── acc ├── acc_cdrs ├── address ├── dialog ├── dialog_vars ├── dialplan ├── dispatcher ├── domain ├── domain_attrs ├── htable ├── rtpengine ├── tenant └── version ├── freeswitch ├── Dockerfile ├── conf │ ├── README.md │ ├── autoload_configs │ │ ├── acl.conf.xml │ │ ├── cdr_csv.conf.xml │ │ ├── conference.conf.xml │ │ ├── console.conf.xml │ │ ├── db.conf.xml │ │ ├── event_socket.conf.xml │ │ ├── logfile.conf.xml │ │ ├── modules.conf.xml │ │ ├── sofia.conf.xml │ │ ├── switch.conf.xml │ │ ├── timezones.conf.xml │ │ └── xml_rpc.conf.xml │ ├── dialplan │ │ ├── default.xml │ │ ├── public.xml │ │ └── public │ │ │ └── 00_stub.xml │ ├── freeswitch.xml │ ├── modules.conf │ ├── sip_profiles │ │ ├── external.xml │ │ ├── external │ │ │ └── stub.xml │ │ └── internal.xml │ └── vars.xml └── modules.conf ├── inbound_calls.feature ├── outbound_calls.feature ├── security_checks.feature └── test.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | .* 2 | !.coveragerc 3 | !.env 4 | !.pylintrc 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.{py,rst,ini}] 12 | indent_style = space 13 | indent_size = 4 14 | 15 | [*.py] 16 | line_length=120 17 | known_first_party=pyfreebilling,config 18 | multi_line_output=3 19 | default_section=THIRDPARTY 20 | recursive = true 21 | skip = venv/ 22 | skip_glob = **/migrations/*.py 23 | include_trailing_comma = true 24 | force_grid_wrap = 0 25 | use_parentheses = true 26 | 27 | [*.{html,css,scss,json,yml}] 28 | indent_style = space 29 | indent_size = 2 30 | 31 | [*.md] 32 | trim_trailing_whitespace = false 33 | 34 | [Makefile] 35 | indent_style = tab 36 | 37 | [nginx.conf] 38 | indent_style = space 39 | indent_size = 2 40 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Server (please complete the following information):** 27 | - OS: [e.g. Debian 12] 28 | - Docker verions 29 | - Version [e.g. 4.0.0] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 2 | # Comment to be posted to on first time issues 3 | newIssueWelcomeComment: > 4 | Thanks for opening your first issue here! 🎉 Be sure to follow the issue template! 5 | 6 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 7 | # Comment to be posted to on PRs from first time contributors in your repository 8 | newPRWelcomeComment: > 9 | Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. 10 | 11 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 12 | # Comment to be posted to on pull requests merged by a first time user 13 | firstPRMergeComment: > 14 | Congrats on merging your first pull request! 🎉 We here at `Create Go App` are proud of you! -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image to Docker Hub 2 | 3 | on: 4 | push: 5 | tags: ["*"] 6 | branches: 7 | - "main" 8 | pull_request: 9 | branches: [ "main" ] 10 | 11 | env: 12 | # Use docker.io for Docker Hub if empty 13 | REGISTRY: docker.io 14 | # github.repository as / 15 | IMAGE_NAME: mwolff44w/pks-sipproxy 16 | SHA: ${{ github.event.pull_request.head.sha || github.event.after }} 17 | 18 | jobs: 19 | build: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - uses: actions/checkout@v4 23 | - name: Build the Docker image 24 | run: docker build --platform=linux/amd64 . --file Dockerfile --tag my-image-name:$(date +%s) 25 | 26 | push_to_registry: 27 | name: Push Docker image to Docker Hub 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Check out the repo 31 | uses: actions/checkout@v4 32 | with: 33 | ref: ${{ env.SHA }} 34 | - name: Set up Docker Buildx 35 | uses: docker/setup-buildx-action@v3 36 | 37 | - name: Authenticate to registry ${{ env.REGISTRY }} 38 | uses: docker/login-action@v3 39 | with: 40 | registry: ${{ env.REGISTRY }} 41 | username: ${{ secrets.REGISTRY_USER }} 42 | password: ${{ secrets.REGISTRY_TOKEN }} 43 | 44 | - name: Extract metadata (tags, labels) for Docker 45 | id: meta 46 | uses: docker/metadata-action@v5 47 | with: 48 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} 49 | labels: | 50 | org.opencontainers.image.revision=${{ env.SHA }} 51 | tags: | 52 | type=edge,branch=$repo.default_branch 53 | type=semver,pattern=v{{version}} 54 | type=sha,prefix=,suffix=,format=short 55 | 56 | - name: Build and push Docker image 57 | uses: docker/build-push-action@v5 58 | with: 59 | context: . 60 | sbom: ${{ github.event_name != 'pull_request' }} 61 | provenance: ${{ github.event_name != 'pull_request' }} 62 | push: ${{ github.event_name != 'pull_request' }} 63 | load: ${{ github.event_name == 'pull_request' }} 64 | tags: ${{ steps.meta.outputs.tags }} 65 | labels: ${{ steps.meta.outputs.labels }} 66 | cache-from: type=gha 67 | cache-to: type=gha,mode=max 68 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Unit test / coverage reports 4 | htmlcov/ 5 | .tox/ 6 | .coverage 7 | .coverage.* 8 | .cache 9 | nosetests.xml 10 | coverage.xml 11 | *.cover 12 | .hypothesis/ 13 | 14 | ### VisualStudioCode template 15 | .vscode/* 16 | !.vscode/settings.json 17 | !.vscode/tasks.json 18 | !.vscode/launch.json 19 | !.vscode/extensions.json 20 | 21 | # Folder config file 22 | Desktop.ini 23 | 24 | # Recycle Bin used on file shares 25 | $RECYCLE.BIN/ 26 | 27 | ### macOS template 28 | # General 29 | *.DS_Store 30 | .AppleDouble 31 | .LSOverride 32 | 33 | # Files that might appear in the root of a volume 34 | .DocumentRevisions-V100 35 | .fseventsd 36 | .Spotlight-V100 37 | .TemporaryItems 38 | .Trashes 39 | .VolumeIcon.icns 40 | .com.apple.timemachine.donotpresent 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | 49 | 50 | .env 51 | .envs/* 52 | !.envs/.local/ 53 | !.envs/.example/ 54 | 55 | build/* 56 | !build/.gitkeep 57 | 58 | # Node 59 | node_modules -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "DavidAnson.vscode-markdownlint", 4 | "timonwong.ShellCheck", 5 | "golang.Go" 6 | ] 7 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.colorTheme": "Better Solarized Light" 3 | } -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) 5 | and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). 6 | 7 | 8 | ## [PKS-1.0.0] 9 | ### Added 10 | - Connect IPBX and provider SIP trunks - only IP auth are supported 11 | - DID routing 12 | - PSTN routing 13 | - Loadbalancing routing features 14 | - Commandline to manage the solution 15 | 16 | ### Changed 17 | New version dropping ratings to focus on security 18 | 19 | ### Deprecated 20 | N/A 21 | 22 | ### Removed 23 | - PyFreeBilling v2 features are removed 24 | 25 | ### Fixed 26 | N/A 27 | 28 | ### Security 29 | 30 | ## [2.1] 31 | ### Added 32 | - Kamailio is handled by PyFreeBilling now 33 | - Location table view in PyFB admin 34 | 35 | ### Changed 36 | - Kamailio configuration has been split 37 | - PostgreSQL min version is 9.4 38 | 39 | ### Removed 40 | - Currency management, as it not be really used 41 | - Gateway profile as it not used 42 | 43 | ### Fixed 44 | - Possibility to use a different port form gateways than default 45 | - Many documention points have been fixed 46 | 47 | ### Security 48 | - Django updated to 1.11.12 49 | - Django-axes updated 50 | 51 | 52 | ## [2.0] 53 | ### Added 54 | - Proxy SIP is now Kamailio 55 | - Multi FreeSwitch support (load balancing) 56 | - New translations (managed now on Transifex) 57 | - SIP antiflood protection 58 | - SIP malformed messages detection 59 | 60 | ### Changed 61 | - CallerID and CalleeID normalization for customers 62 | - Speed up rates and CDR views 63 | - New customers and providers stats 64 | - Better FreeSwitch log messages 65 | - Django 11 based 66 | - PostgreSQL min version is 9.3 67 | - FreeSwitch version : 1.6 68 | - Kamailio version : 4.4 69 | - New licence : AGPL v3 70 | 71 | ### Deprecated 72 | - Currency maganement (a new one will be replace it) 73 | 74 | ### Removed 75 | - SIP account authentification in FreeSwitch. It is done in Kamailio now. 76 | - Old DID management system => new one no compatible with the v1. 77 | 78 | ### Fixed 79 | - Simpler FreeSwitch deployment and configuration 80 | - minimal time in rate now OK 81 | 82 | ### Security 83 | - Enhance password security : min lenght is 11 characters 84 | - New password storage argon2 (old password will be updated when user log in) 85 | 86 | ## [1.4.8] - 2016-06-21 87 | ### Fixed 88 | - Italian translation 89 | 90 | ## [1.4.7] - 2016-03-07 91 | ## Fixed 92 | - Requirements 93 | - CallerID bug 94 | 95 | **Important** : we will keep only 2.0 changelog in the future since 2.0 will be released. 96 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | # This CITATION.cff file was generated with cffinit. 2 | # Visit https://bit.ly/cffinit to generate yours today! 3 | 4 | cff-version: 1.2.0 5 | title: >- 6 | PKS : P-KISS-SBC, the simple and stupid Session Border 7 | Controller 8 | message: >- 9 | If you use this software, please cite it using the 10 | metadata from this file. 11 | type: software 12 | authors: 13 | - given-names: Mathias 14 | family-names: WOLFF 15 | email: mathias@celea.org 16 | identifiers: 17 | - type: url 18 | value: 'https://www.pyfreebilling.com' 19 | description: Website 20 | repository-code: 'https://github.com/mwolff44/pyfreebilling' 21 | url: 'https://www.pyfreebilling.com' 22 | abstract: >- 23 | P-KISS-SBC, is an open source simple and stupid SBC based 24 | on Kamailio and RTP Engine. 25 | 26 | Connect safely IPBX/SIP Proxies with SIP providers. 27 | keywords: 28 | - SIP 29 | - SBC 30 | - Security 31 | - Kamailio 32 | - SIP Routing 33 | license: AGPL-3.0-or-later 34 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [Contact Email Address](https://www.pyfreebilling.com). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | CONTRIBUTORS 2 | ============ 3 | 4 | Project Lead 5 | ------------ 6 | 7 | * Mathias WOLFF (@mwolff44 / ) 8 | 9 | Translation Managers 10 | -------------------- 11 | 12 | * Mathias WOLFF (@mwolff44) 13 | 14 | Developers 15 | ---------- 16 | 17 | * Frederik Kriewitz (@freddy36) 18 | 19 | 20 | Translators 21 | ----------- 22 | 23 | French 24 | 25 | * Mathias WOLFF (@mwolff44) 26 | * BigSouf 27 | * Chahid OUARZOUN 28 | 29 | Hugarian 30 | 31 | * Pengecske 32 | 33 | Italian 34 | 35 | * Kaiser VITO 36 | 37 | Portuguese (Brazil) 38 | 39 | * Cristiano RAPOSO 40 | * Edgar MUNIN 41 | 42 | Russian 43 | 44 | * Anton 45 | 46 | Spanish 47 | 48 | * Ignasi Fosch Alonso (@NaTx) 49 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2007-2025 Mathias WOLFF (mathias@celea.org) 2 | # GNU Affero General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/agpl-3.0.txt) 3 | # SPDX-License-Identifier: AGPL-3.0-or-later 4 | 5 | FROM debian:bookworm-slim 6 | 7 | LABEL org.opencontainers.image.authors Mathias WOLFF 8 | 9 | ENV REFRESHED_AT 2025-04-03 10 | ENV VERSION 4.2.0 11 | 12 | ENV DEBIAN_FRONTEND noninteractive 13 | 14 | ENV DIST="bookworm" 15 | ENV REL="5.7.6" 16 | 17 | ENV KAMAILIO_LOG_LEVEL info 18 | 19 | RUN rm -rf /var/lib/apt/lists/* && apt-get update && \ 20 | DEBIAN_FRONTEND=noninteractive apt-get install -qq --assume-yes gnupg wget curl apt-transport-https 21 | 22 | # kamailio repo 23 | RUN echo "deb http://deb-archive.kamailio.org/repos/kamailio-$REL $DIST main" > /etc/apt/sources.list.d/kamailio.list 24 | RUN wget -O /tmp/kamailiodebkey.gpg http://deb.kamailio.org/kamailiodebkey.gpg \ 25 | && gpg --output /etc/apt/trusted.gpg.d/deb-kamailio-org.gpg --dearmor /tmp/kamailiodebkey.gpg 26 | 27 | 28 | RUN apt-get update && \ 29 | DEBIAN_FRONTEND=noninteractive apt-get install -qq --assume-yes \ 30 | libhiredis0.14 \ 31 | libpq5 \ 32 | kamailio \ 33 | kamailio-extra-modules \ 34 | kamailio-json-modules \ 35 | kamailio-utils-modules \ 36 | kamailio-redis-modules \ 37 | kamailio-xml-modules \ 38 | kamailio-postgres-modules 39 | 40 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* 41 | 42 | COPY src/sip/kamailio.cfg /etc/kamailio/kamailio.cfg 43 | COPY src/sip/bootstrap.sh /etc/kamailio/bootstrap.sh 44 | RUN chmod a+x /etc/kamailio/bootstrap.sh 45 | 46 | ENTRYPOINT ["/etc/kamailio/bootstrap.sh"] 47 | CMD ["kamailio"] 48 | 49 | HEALTHCHECK CMD curl --fail http://localhost:8080/ping || exit 1 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # P-Kiss-SBC project 2 | 3 | ![PKS release](https://img.shields.io/badge/PKS_version-4.0.3-8A2BE2) 4 | ![Docker pks-sipproxy Pulls](https://img.shields.io/docker/pulls/mwolff44w/pks-sipproxy) 5 | [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mwolff44/pyfreebilling/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mwolff44/pyfreebilling/?branch=master) 6 | [![AGPLv3 License](https://img.shields.io/badge/license-AGPLv3-blue.svg?style=flat-square)](http://www.fsf.org) 7 | [![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-red.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FANG9JC63Q7DY&lc=FR&item_name=PyFreeBilling¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted&pk_campaign=donation) 8 | 9 | --- 10 | 11 | ## Table of content 12 | 13 | - About P-Kiss-SBC 14 | - License 15 | - Features 16 | - Prerequisites 17 | - Installation 18 | - Contact information 19 | - Support 20 | - Contributing 21 | - Donation 22 | - Stats 23 | 24 | ## What is PKS : P-Kiss-SBC 25 | 26 | The new flavor of *pyfreebilling*, P-KISS-SBC, is an *open source simple and stupid SBC* based on *Kamailio* and *RTP Engine* . 27 | 28 | ## License 29 | 30 | P-Kiss-SBC is under AGPLv3 license. You can read it in COPYING file. 31 | 32 | [![AGPLv3 License](https://img.shields.io/badge/license-AGPLv3-blue.svg?style=flat-square)](http://www.fsf.org) 33 | 34 | ## Features 35 | 36 | There are some features supported. A few of them are: 37 | 38 | - IPBX/Customer add/modify/delete 39 | - IP termination and SIP authentication (Multitenant system support) 40 | - DID allocation and routing 41 | 42 | - Provider add/modify/delete 43 | - Routing based on area code 44 | - DID Routing 45 | - Routing decision based on load balancing 46 | - Limit max channels by each provider gateway (TBD) 47 | 48 | - Security 49 | - Blocking SIP scanner attemps 50 | - Blocking fraudulent connection attempts 51 | - SQL injection detection 52 | - SIP header validation 53 | 54 | - Design for simplicity, reliability and scalability 55 | 56 | ... and much more :) 57 | 58 | ## Prerequisites 59 | 60 | In order to run PKS, you need the following configured, secured and 61 | working Basic Operating System (Linux). P-KISS-SBC works in containers, it can be deployed on any docker or Kubernetes environment. 62 | 63 | The project uses Kamailio, RTP Engine, Redis and a Database (by default, POSTGRESQL but also support POSTGRESQL, MARIADB, MYSQL and DBTEXT). 64 | 65 | ## Contact Information 66 | 67 | Name: *Mathias WOLFF* 68 | 69 | Contact: [https://blog-des-telecoms.com](https://blog-des-telecoms.com) 70 | 71 | Website: [https://pk-sbc.io](https://pk-sbc.io) 72 | 73 | ## Support 74 | 75 | To get free support, use github issue tab. 76 | 77 | If you need paid support, specific features or consulting services, you will find support services prices on PyFreeBilling website : [https://pk-sbc.io](https://pk-sbc.io) 78 | 79 | ## Contributing 80 | 81 | Separate proposed changes and PRs into small, distinct patches by type so that they can be merged faster into upstream and released quicker: 82 | 83 | - Feature 84 | - Bugfix 85 | - Code style 86 | - Documentation 87 | 88 | ## Donation 89 | 90 | If you want to support my developments you are welcome to offer me a cup of coffee :) 91 | 92 | [![Paypal donation](static/donate_button_red.jpg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=FANG9JC63Q7DY&lc=FR&item_name=PyFreeBilling¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) 93 | 94 | ## Stats 95 | 96 | [![Project Stats](https://www.openhub.net/p/pyfreebilling/widgets/project_thin_badge.gif)](https://www.openhub.net/p/pyfreebilling) 97 | -------------------------------------------------------------------------------- /doc/architecture/decisions/0001-choose-config-storage.md: -------------------------------------------------------------------------------- 1 | # 0001 - Choose Config storage backend 2 | 3 | - 📅 Date: 2nd of April 2024 4 | - 🚧 Status: Accepted 5 | - 👷 Authors: Mathias WOLFF 6 | - ❗ spdx-license: CC BY-SA 4.0 7 | 8 | 9 | ## Context 10 | 11 | The management interface exploits APIs from the administration microservice. 12 | This microservice relies on a data source to store configuration items. 13 | 14 | We need to define which system to use to store this data. 15 | 16 | Note that these APIs are not used for call routing decision but only for configuration management. 17 | 18 | Performance is not an important criterion. The configuration items do not represent large data volumes (call logs will not be stored). 19 | 20 | The choice of storage should follow the principles of the project, be KISS! 21 | 22 | Backup and restoration should be easy. 23 | 24 | Finally, it must be compatible with the functioning of a container-based architecture like K8S! 25 | 26 | ## Considered options 💡 27 | 28 | We will consider 2 popular free DBMS systems: PostgreSQL and SQLite. 29 | 30 | 1. PostgreSQL: 31 | - ✅ **Advantage:** performance, high concurrency, high volume 32 | - 🚫 **Disadvantage:** more complex to deploy, administrate and upgrade. Need a specific container. 33 | 2. SQLite: 34 | - ✅ **Advantage:** simpler to deply (a simple volume). Backup and restore are easy. 35 | - 🚫 **Disadvantage:** no server / client 36 | 37 | 38 | ## Advices 39 | 40 | Other DBMS systems exist that are both popular, free and relevant to this project. However, expertise is also a criterion of choice, as well as the support of the tools already chosen and used. 41 | You can check this interesting page for a checklist for choosing the right database engine : https://sqlite.org/whentouse.html 42 | 43 | ## Decision 🏆 44 | 45 | The choice was made to use SQLite because of the simplicity of deployment and administration. Despite the undeniable added value of PostgreSQL, given the complexity involved, the project has no interest in using it. 46 | It should be noted that a future migration will still be possible, as the DBMS connection tool supports both solutions. 47 | 48 | ## Consequences 49 | 50 | SQLite will be used to store the configurations. 51 | 52 | ♻️ Update: nil. -------------------------------------------------------------------------------- /doc/architecture/decisions/template.md: -------------------------------------------------------------------------------- 1 | # ADR TEMPLATE 2 | 3 | - 📅 Date: 4 | - 🚧 Status: Accepted 5 | - 👷 Authors: Mathias WOLFF 6 | - ❗ spdx-license: CC BY-SA 4.0 7 | 8 | ## Context 9 | 10 | <--What is the context of your decision. Example: previous linked ADR, problem the team want to tackle, ...--> 11 | 12 | ## Considered options 💡 13 | 14 | 1. Option 1: 15 | - **More details:** 16 | - ✅ **Advantage:** 17 | - 🚫 **Disadvantage:** 18 | 2. Option 2: 19 | - **More details:** 20 | - ✅ **Advantage:** 21 | - 🚫 **Disadvantage:** 22 | 23 | 24 | ## Advices 25 | <--Any advices worth mentioning--> 26 | 27 | ## Decision 🏆 28 | <--Which decision have been taken and what was the decider--> 29 | 30 | ## Consequences 31 | <-- Consequences of your decision --> 32 | 33 | ♻️ Update: . -------------------------------------------------------------------------------- /docs/__README.md: -------------------------------------------------------------------------------- 1 | # Doc : Testing your changes 2 | 3 | When working on the documentation, it is advised that you review your changes locally before committing them. The `mkdocs serve` command can be used to live preview your changes (as you type) on your local machine. 4 | 5 | Please make sure you fork the repo and change the clone URL in the example below for your fork: 6 | 7 | - Linux Mint / Ubuntu 18.04 LTS / 19.10 / 20.04 LTS / 22.04 LTS: 8 | - Preparations (only required once): 9 | 10 | ```bash 11 | git clone https://github.com/YOUR-USERNAME/docs 12 | cd docs 13 | sudo apt install python3-pip 14 | pip3 install -r requirements-docs.txt 15 | ``` 16 | 17 | - Running the docs server: 18 | 19 | ```bash 20 | mkdocs serve --dev-addr 0.0.0.0:8000 21 | ``` 22 | 23 | - Fedora Linux instructions (tested on Fedora Linux 28): 24 | - Preparations (only required once): 25 | 26 | ```bash 27 | git clone https://github.com/YOUR-USERNAME/docs 28 | cd docs 29 | pip install --user -r requirements-docs.txt 30 | ``` 31 | 32 | - Running the docs server: 33 | 34 | ```bash 35 | mkdocs serve --dev-addr 0.0.0.0:8000 36 | ``` 37 | 38 | - Docker instructions: 39 | - One-shot run: 40 | 41 | ```bash 42 | docker run -v `pwd`:/opt/app/ -w /opt/app/ -p 8000:8000 -it nikolaik/python-nodejs:python3.7-nodejs16 \ 43 | sh -c "pip install --user -r requirements-docs.txt && \ 44 | /root/.local/bin/mkdocs build && \ 45 | npm ci && \ 46 | npm test && \ 47 | /root/.local/bin/mkdocs serve --dev-addr 0.0.0.0:8000" 48 | ``` 49 | 50 | After these commands, the current branch is accessible through your favorite browser at -------------------------------------------------------------------------------- /docs/api.md: -------------------------------------------------------------------------------- 1 | !!swagger swagger.json!! -------------------------------------------------------------------------------- /docs/assets/images/pistachios.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/docs/assets/images/pistachios.jpg -------------------------------------------------------------------------------- /docs/assets/stylesheets/extra.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/docs/assets/stylesheets/extra.css -------------------------------------------------------------------------------- /docs/bestpractices.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Best practices 8 | -------------------------------------------------------------------------------- /docs/bestpractices.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Best practices 8 | -------------------------------------------------------------------------------- /docs/changelog/index.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Release Notes 8 | 9 | ## P-KISS-SBC 10 | 11 | ### Latest Changes 12 | 13 | #### 4.0.1 March 08, 2024 { id="4.0.0" } 14 | 15 | * déploiement updated : reverse proxy has been added for HTTPS 16 | * pks-admin 1.1.0 17 | * Kamailio update : 5.7.4 18 | 19 | #### 4.0.0 March 05, 2024 { id="4.0.0" } 20 | 21 | 1st version of P-KISS-SBC. 22 | -------------------------------------------------------------------------------- /docs/contributing/index.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Contributing 8 | 9 | P-KISS-SBC is an actively maintained and constantly improved project 10 | that caters to a diverse user base with varying backgrounds and needs. In order 11 | to effectively address the needs of all our users, evaluate requests, and fix 12 | bugs, a lot of work from us maintainers is required. 13 | 14 | ## How to contribute 15 | 16 | We have invested quite a lot of time in creating better templates for our 17 | [issue tracker], optimizing the processes for our users to report bugs, request 18 | features or changes, contribute to the project, or exchange with our community. 19 | This section of the documentation explains each process. 20 | 21 | [issue tracker]: https://github.com/mwolff44/pyfreebilling/issues 22 | 23 | ### Creating an issue 24 | 25 |
26 | 27 | - :material-bug:{ .lg .middle } __Something is not working?__ 28 | 29 | --- 30 | 31 | Report a bug in P-KISS-SBC by creating an issue and a reproduction 32 | 33 | [:octicons-arrow-right-24: Report a bug][report a bug] 34 | 35 | - :material-file-document:{ .lg .middle } __Missing information in our docs?__ 36 | 37 | --- 38 | 39 | Report missing information or potential inconsistencies in our documentation 40 | 41 | [:octicons-arrow-right-24: Report a docs issue][report a docs issue] 42 | 43 | - :material-lightbulb-on:{ .lg .middle } __Want to submit an idea?__ 44 | 45 | --- 46 | 47 | Propose a change or feature request or suggest an improvement 48 | 49 | [:octicons-arrow-right-24: Request a change][request a change] 50 | 51 | - :material-chat-question:{ .lg .middle } __Have a question or need help?__ 52 | 53 | --- 54 | 55 | Ask questions on our discussion board and get in touch with our community 56 | 57 | [:octicons-arrow-right-24: Ask a question][ask a question] 58 | 59 |
60 | 61 | [report a bug]: reporting-a-bug.md 62 | [report a docs issue]: reporting-a-docs-issue.md 63 | [request a change]: requesting-a-change.md 64 | [ask a question]: https://github.com/mwolff44/pyfreebilling/discussions -------------------------------------------------------------------------------- /docs/contributing/reporting-a-docs-issue.md: -------------------------------------------------------------------------------- 1 | # Reporting a docs issue 2 | 3 | If you find an inconsistency 4 | or see room for clarification or improvement, please submit an issue to 5 | our public [issue tracker] by following this guide. 6 | 7 | [issue tracker]: https://github.com/mwolff44/pyfreebilling/issues 8 | 9 | ## Issue template 10 | 11 | Reporting a documentation issue is usually less involved than reporting a bug. 12 | 13 | Please thoroughly read the following guide before creating a new documentation issue, 14 | and provide the following information 15 | as part of the issue: 16 | 17 | - [Title] 18 | - [Description] 19 | - [Related links] 20 | - [Proposed change] optional 21 | - [Checklist] 22 | 23 | [Title]: #title 24 | [Description]: #description 25 | [Related links]: #related-links 26 | [Proposed change]: #proposed-change 27 | [Checklist]: #checklist 28 | 29 | ### Title 30 | 31 | A good title should be a short, one-sentence description of the issue, contain 32 | all relevant information and, in particular, keywords to simplify the search in 33 | the issue tracker. 34 | 35 | | | Example | 36 | | -------- | -------- | 37 | | :material-check:{ style="color: #4DB6AC" } __Clear__ | Clarify IP address filtrering 38 | | :material-close:{ style="color: #EF5350" } __Unclear__ | Missing information in the docs 39 | | :material-close:{ style="color: #EF5350" } __Generic__ | Please help 40 | 41 | ### Description 42 | 43 | Provide a clear and concise summary of the inconsistency or issue you 44 | encountered in the documentation or the documentation section that needs 45 | improvement. Explain why you think the documentation should be adjusted and 46 | describe the severity of the issue: 47 | 48 | - __Keep it short and concise__ – if the inconsistency or issue can be 49 | precisely explained in one or two sentences, perfect. Maintainers and 50 | future users will be grateful for having to read less. 51 | 52 | - __One issue at a time__ – if you encounter several unrelated inconsistencies, 53 | please create separate issues for them. Don't report them in the same issue – it makes attribution difficult. 54 | 55 | > __Why we need this__: in order for us to understand the problem, we need a 56 | > clear description of it and quantify its impact, which is essential for triage 57 | > and prioritization. 58 | 59 | ### Related links 60 | 61 | After you described the documentation section that needs to be adjusted above, 62 | we now ask you to share the link to this specific documentation section and 63 | other possibly related sections. Make sure to use anchor links (permanent links) 64 | where possible, as it simplifies discovery. 65 | 66 | > __Why we need this__: providing the links to the documentation help us 67 | > understand which sections of our documentation need to be adjusted, extended, 68 | > or overhauled. 69 | 70 | ### Proposed change optional { #proposed-change } 71 | 72 | Now that you have provided us with the description and links to the 73 | documentation sections, you can help us, maintainers, and the community by 74 | proposing an improvement. You can sketch out rough ideas or write a concrete 75 | proposal. This field is optional but very helpful. 76 | 77 | > __Why we need this__: improvement proposal can be beneficial for other users 78 | > who encounter the same issue, as they offer solutions before we maintainers 79 | > can update the documentation. 80 | 81 | ### Checklist 82 | 83 | Thanks for following the guide and creating a high-quality and complete issue 84 | report – you are almost done. This section ensures that you have read this guide 85 | and have worked to the best of your knowledge to provide us with every piece of 86 | information we need to improve our documentation. 87 | 88 | __We'll take it from here.__ 89 | -------------------------------------------------------------------------------- /docs/faq/do-I-need-a-sbc-voip.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Do I need an SBC for my VoIP solution ? 8 | 9 | The answer depends on the types of systems or equipment you need to connect and the level of security required by your organisation. 10 | 11 | One of the main benefits of an SBC is that it can act as an application firewall, protecting your network from cyber-attacks. 12 | 13 | An SBC can also secure your call flows, protecting against voice-specific attacks such as toll fraud, compliance breaches and corporate/state espionage. 14 | -------------------------------------------------------------------------------- /docs/faq/do-I-need-a-sbc-voip.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Ai-je besoin d'un SBC pour ma solution VoIP ? 8 | 9 | La réponse dépend des types de systèmes ou d'équipements que vous devez connecter et du niveau de sécurité requis par votre organisation. 10 | 11 | L'un des principaux avantages d'un SBC est qu'il peut servir de pare-feu applicatif, protégeant ainsi votre réseau contre les cyber-attaques. 12 | 13 | Un SBC peut également sécuriser vos flux d'appel protégeant des attaques spécifiques à la voix, telles que la fraude téléphonique (Toll fraud), les violations de la conformité et l'espionnage d'entreprise/d'État. 14 | -------------------------------------------------------------------------------- /docs/faq/index.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Frequently asked questions 8 | 9 | :material-frequently-asked-questions: This section contains the __most frequently asked questions__ :material-frequently-asked-questions: : 10 | 11 | - [Is P-KISS-SBC a VoIP softswitch ?](is-pks-softswitch.md) 12 | - [What are the differences between PyFreeBilling and P-KISS-SBC (PKS) ?](pyfreebilling-pks-differences.md) 13 | - [Does PKS perform Least Cost Routing (LCR) ?](lcr-routing.md) 14 | - [What are the characteristics of a class 4 softswitch ?](voip-softswitch-caracteristics.md) 15 | - [Do I need an SBC for my VoIP solution ?](do-I-need-a-sbc-voip.md) 16 | 17 | Don't hesitate to use the :material-forum: __[forum](https://github.com/mwolff44/pyfreebilling/discussions) to ask your questions__. 18 | -------------------------------------------------------------------------------- /docs/faq/index.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Foire aux questions 8 | 9 | :material-frequently-asked-questions: Cette section regroupe les __questions les plus fréquemment posées__ :material-frequently-asked-questions: : 10 | 11 | - [Est-ce que P-KISS-SBC est un softswitch VoIP ?](is-pks-softswitch.md) 12 | - [Quelles sont les différences entre PyFreeBilling et P-KISS-SBC (PKS) ?](pyfreebilling-pks-differences.md) 13 | - [Est-ce que PKS fait du Least Cost Routing (LCR) ?](lcr-routing.md) 14 | - [Quelles sont les caractéristiques d'un softswitch de classe 4 ?](voip-softswitch-caracteristics.md) 15 | - [Ai-je besoin d'un SBC pour ma solution VoIP ?](do-I-need-a-sbc-voip.md) 16 | 17 | N'hésitez pas à utiliser le :material-forum: __[forum](https://github.com/mwolff44/pyfreebilling/discussions) afin de poser vos questions__. 18 | -------------------------------------------------------------------------------- /docs/faq/is-anyone-is-running-pyfreebilling-in-production.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Is anyone is running PyFreeBilling in production ? 8 | 9 | Yes, ISP use in wholesale voip business and business / residential business. 10 | -------------------------------------------------------------------------------- /docs/faq/is-anyone-is-running-pyfreebilling-in-production.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Quelqu'un utilise-t-il PyFreeBilling en production ? 8 | 9 | Oui, des opérateurs l'utilisent pour la vente en gros de voip et pour les entreprises et les particuliers. 10 | -------------------------------------------------------------------------------- /docs/faq/is-pks-softswitch.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Is P-KISS-SBC a VoIP softswitch ? 8 | 9 | A [softswitch](https://en.wikipedia.org/wiki/Softswitch) is a software component of a telecoms network used to connect calls between subscribers or other telecoms equipment. 10 | 11 | There are 2 categories of softswitch: class 4 systems and class 5 systems. This classification is an analogy with [switched telephone networks](https://en.wikipedia.org/wiki/Public_switched_telephone_network). 12 | 13 | A class 4 softswitch is used to transport VoIP flows between operators; it is an interconnection solution. 14 | A class 5 softswitch, on the other hand, is designed to provide a telephony service to end subscribers, like an [IPBX](https://en.wikipedia.org/wiki/IP_PBX) for example. 15 | 16 | And to answer the question, yes, P-KISS-SBC is a class 4 softswitch. 17 | -------------------------------------------------------------------------------- /docs/faq/is-pks-softswitch.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | --- 8 | title: Est-ce que P-KISS-SBC est un softswitch VoIP 9 | description: P-KISS-SBC est un softswitch VoIP de classe 4, il interconnecte les réseaux VoIP, les opérateurs et les IPBX. 10 | --- 11 | 12 | # Est-ce que P-KISS-SBC est un softswitch VoIP ? 13 | 14 | Un [softswitch](https://en.wikipedia.org/wiki/Softswitch) est un composant logiciel d'un réseau télécom permettant de connecter des appels entre abonnés ou d'autres équipements télécoms. 15 | 16 | Il existe 2 catégories de softswitch : les systèmes de classe 4 et ceux de classe 5. cette classification est un analogy avec les [réseaux téléphoniques commutés](https://en.wikipedia.org/wiki/Public_switched_telephone_network). 17 | 18 | Un softswitch de classe 4 sont utilisés pour transporter les flux VoIP entre opérateurs, ce sont des solutions d'interconnexion. 19 | Tandis qu'un softswitch de classe 5 a pour objectif de fournir un service de téléphonie aux abonnés finaux, comme un [IPBX](https://en.wikipedia.org/wiki/IP_PBX) par exemple. 20 | 21 | Et pour répondre à la question, oui P-KISS-SBC est un softswitch de classe 4. 22 | -------------------------------------------------------------------------------- /docs/faq/lcr-routing.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Does PKS do Least Cost Routing (LCR)? 8 | 9 | PKS cannot route calls based on the communication costs of SIP providers. This functionality, which is present in PyFreeBilling, has been removed, as it brings greater complexity, both in the scripting part and therefore in debugging, but also in terms of administration. 10 | 11 | If this functionality is needed, other solutions will be more appropriate. 12 | 13 | Nevertheless, a [discussion](https://github.com/mwolff44/pyfreebilling/discussions/186) exists on the forum to integrate [CGRateS](http://www.cgrates.org/). 14 | -------------------------------------------------------------------------------- /docs/faq/lcr-routing.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Est-ce que PKS fait du Least Cost Routing (LCR) ? 8 | 9 | PKS ne sait pas faire du routage des appels basés sur les coûts de communications des fournisseurs SIP. Cette fonctionnalité présente dans PyFreeBilling a été supprimée, car elle apportée une plus grande complexité, à la fois dans la partie scripting et donc du debug mais aussi au niveau de l'administration. 10 | 11 | Si cette fonctionnalité est nécessaire, d'autres solutions seront alors plus adaptées. 12 | 13 | Néanmoins, une [discussion](https://github.com/mwolff44/pyfreebilling/discussions/186) existe sur le forum afin d'intégrer [CGRateS](http://www.cgrates.org/). 14 | -------------------------------------------------------------------------------- /docs/faq/pyfreebilling-pks-differences.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # What are the differences between PyFreeBilling and P-KISS-SBC (PKS)? 8 | 9 | PyfreeBilling was created in 2011 in response to the need to buy and resell VoIP minutes and the constraints of stability, performance and security. 10 | 11 | The project then evolved to take into account the needs of SIP operators to connect providers and their customers. 12 | 13 | After many years, I decided to change the positioning of the project. There are solutions for billing calls, and PyFreeBilling doesn't add any value without adding additional functions such as managing subscriptions, packages, billing, etc. 14 | 15 | Another requirement is to have an easy-to-administer solution to secure SIP communications, to connect IPBXs with one or more SIP carriers in order to route calls to the outside world and incoming calls to the right IPBX. 16 | 17 | As I have a keen interest in security, and a wealth of ideas on the subject, I decided 2 years ago to reorient the project in this direction. P-KISS-SBC was created to separate the 2 solutions offering different functionalities. 18 | -------------------------------------------------------------------------------- /docs/faq/pyfreebilling-pks-differences.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Quelles sont les différences entre PyFreeBilling et P-KISS-SBC (PKS) ? 8 | 9 | PyfreeBilling a été créé en 2011 pour répondre à des besoins d'achat / revente de minutes téléphoniques et des contraintes de stabilité, de performances et de sécurité. 10 | 11 | Le projet a ensuite évolué afin de prendre en compte les besoins des opérateurs SIP pour connecter les opérateurs et leurs clients. 12 | 13 | Après de nombreuses années, j'ai pris la décision de modifier le positionnement du projet. En effet, des solutions permettent de réaliser la facturation des communications, et PyFreeBilling n'apportent pas de plus value sans ajouter de fonctionnalités complémentaires comme la gestion des abonnements, des forfaits, de la facturation ... 14 | 15 | Une autre demande est de disposer d'une solution simple à administrer afin de sécuriser ses communications SIP, de connecter des IPBX avec un ou plusieurs opérateurs SIP afin de router les appels vers le monde extérieur et les appels entrants vers le bon IPBX. 16 | 17 | Ayant un fort intérêt pour la sécurité, et fourmillant d'idées sur ce sujet, j'ai pris la décision il y a 2 ans de ré-orienter le projet dans cette direction. Afin de bien séparer les 2 solutions offrant des fonctionnalités différentes, P-KISS-SBC a été créé. 18 | -------------------------------------------------------------------------------- /docs/faq/voip-softswitch-caracteristics.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # What are the characteristics of a class 4 softswitch ? 8 | 9 | Softswitches used for the transit of VoIP traffic between operators are generally called class 4 softswitches. 10 | 11 | The main function of a class 4 softswitch is to route large volumes of VoIP calls. 12 | 13 | The most important features are scalability in terms of the number of simultaneous calls and new calls (CPS), protocol translation and transcoding. 14 | -------------------------------------------------------------------------------- /docs/faq/voip-softswitch-caracteristics.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | --- 8 | title: Quelles sont les caractéristiques d'un softswitch de classe 4 9 | description: Les softswitchs utilisés pour le transit du trafic VoIP entre les opérateurs sont généralement appelés softswitch de classe 4 ... 10 | --- 11 | 12 | # Quelles sont les caractéristiques d'un softswitch de classe 4 ? 13 | 14 | Les softswitchs utilisés pour le transit du trafic VoIP entre les opérateurs sont généralement appelés softswitch de classe 4. 15 | 16 | La fonction principale d'un softswitch de classe 4 est l'acheminement de gros volumes d'appels VoIP. 17 | 18 | Les caractéristiques les plus importantes sont la capacité de montée en charge en terme de nombre d'appels simultanés et de nouveaux appels (CPS), la traduction protocolaires et le transcodage. 19 | -------------------------------------------------------------------------------- /docs/getting-started.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Quick start 8 | 9 | :fontawesome-regular-map: __First steps__ 10 | 11 | - :octicons-tracked-by-closed-completed-24: [Check the requirements](user-guide/requirements.md) 12 | - :material-cloud-download: [Install P-KISS-SBC](user-guide/installation.md) 13 | - :octicons-paintbrush-16: [Configure P-KISS-SBC](user-guide/installation.md) 14 | - :material-phone-settings-outline: [Define the gateways, rules and routes]() 15 | - :material-play: [Try it]() 16 | -------------------------------------------------------------------------------- /docs/getting-started.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Démarrage rapide 8 | 9 | :fontawesome-regular-map: __Premiers pas__ 10 | 11 | - :octicons-tracked-by-closed-completed-24: [Vérifier les prérequis](user-guide/requirements.md) 12 | - :material-cloud-download: [Installer P-KISS-SBC](user-guide/installation.md) 13 | - :octicons-paintbrush-16: [Configurer P-KISS-SBC](user-guide/installation.md) 14 | - :material-phone-settings-outline: [Definir the gateways, rules and routes]() 15 | - :material-play: [Essayer PKS]() 16 | -------------------------------------------------------------------------------- /docs/how-to/apiban.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/how-to/backup-recovery.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Backup and Recovery 8 | 9 | Thanks to the P-KISS-SBC architecture, backups are simple. 10 | All the settings are held in one single file `.env` and the configuration in a single directory `/srv/db`. 11 | 12 | !!! Warning 13 | 14 | If you are not using the default DB, PostgreSQL, you need to use specific tools for backup and recovery. 15 | 16 | In vast majority of cases, this file and directory can be used to restore a system to a fully working state identical to what was running previously. 17 | 18 | ## Backup Strategies 19 | 20 | The optimal backup strategy can be summarized in 3 points : 21 | 22 | * Take frequent backup (automatic ones are the best) 23 | * Keep multiple copies of backups in a safe location off the system 24 | * Periodically test the backups 25 | 26 | ## Project layout 27 | 28 | The root directory is /srv/pks . 29 | 30 | .env # The configuration file. 31 | redis/ # The redis directory. 32 | db/ # The database directory. 33 | -------------------------------------------------------------------------------- /docs/how-to/backup-recovery.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Sauvegarde et Restauration 8 | 9 | Grâce à l'architecture P-KISS-SBC, les sauvegardes sont simples. 10 | Tous les paramètres sont conservés dans un seul fichier `.env` et la configuration dans un seul répertoire `/srv/db`. 11 | 12 | !!! Warning 13 | 14 | Si vous n'utilisez pas la base de données par défaut, PostgreSQL, vous devez utiliser des outils spécifiques pour la sauvegarde et la restauration. 15 | 16 | Dans la grande majorité des cas, ce fichier et ce répertoire peuvent être utilisés pour restaurer un système dans un état de fonctionnement identique à ce qui fonctionnait auparavant. 17 | 18 | ## Stratégies de sauvegarde 19 | 20 | La stratégie de sauvegarde optimale peut être résumée en 3 points : 21 | 22 | * Effectuer des sauvegardes fréquentes (les sauvegardes automatiques sont les meilleures). 23 | * Conserver plusieurs copies des sauvegardes dans un endroit sûr en dehors du système. 24 | * Tester périodiquement les sauvegardes 25 | 26 | ## Disposition des données du projet 27 | 28 | Le répertoire principal est /srv/pks . 29 | 30 | .env # Le fichier de configuration. 31 | redis/ # Le dossier redis. 32 | db/ # Le dossier de la base de données. 33 | -------------------------------------------------------------------------------- /docs/how-to/failover.en.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/failover.fr.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/loadbalancing.en.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/loadbalancing.fr.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/multi-tenant-ipbx.en.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/multi-tenant-ipbx.fr.md: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /docs/how-to/troubleshooting.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Troubleshooting -------------------------------------------------------------------------------- /docs/how-to/troubleshooting.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Troubleshooting -------------------------------------------------------------------------------- /docs/how-to/upgrade.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Upgrade 8 | -------------------------------------------------------------------------------- /docs/how-to/upgrade.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Upgrade 8 | -------------------------------------------------------------------------------- /docs/index.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Welcome 8 | 9 | ## P-KISS-SBC 10 | 11 | P-KISS-SBC, is a __simple SIP Proxy__, easy to learn, fast to deploy, ready for production 12 | 13 | ## Why P-KISS-SBC ? 14 | 15 | Numerous SIP / SBC Proxy or even SIP gateway solutions exist. 16 | Although the range may seem large, in reality there are 2 types of solution: 17 | 18 | * __complete solutions__, but __complex__ to implement and operate. The entry ticket in terms of infrastructure (server and/or licence) is high. Finally, the day-to-day management skills (SIP peer creation, SIP debugging, etc.) require a good deal of training. 19 | * __frameworks__, often OpenSource, such as Kamailio, OpenSIPS, Asterisk, FreeSwitch, Yate, etc., which allow you to develop your own in-house solution, but which require you to be familiar with the SIP/RTP protocols and these solutions. 20 | 21 | ## What is P-KISS-SBC ? 22 | 23 | PKS is a __simple__, __high-performance__ and __modern__ SIP proxy for interconnecting SIP trunks and IPBXs. 24 | 25 | Key features include : 26 | 27 | * __Easy__: Designed to be easy to use and learn. Less time spent reading documentation. 28 | * __Intuitive__: A clear, concise and useful web interface 29 | * __Quick to deploy__: Configuration and deployment wizard. 30 | * __High performance__: A single virtual machine can easily handle over a thousand simultaneous calls. 31 | * __Robust__: Ready for production: stable, secure and reliable 32 | 33 | P-KISS-SBC has been designed according to the __KISS__ principle, keep it simple, stupid! This principle defines a design guideline that advocates __simplicity__ and that any non-essential complexity should be avoided. 34 | 35 | ## What can I do with P-KISS-SBC ? 36 | 37 | PKS is positioned as a simple solution with limited functionality. Its purpose is to meet the need to interconnect one or more operator SIP trunks to one or more IPBXs. 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/index.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Bienvenue 8 | 9 | ## P-KISS-SBC 10 | 11 | P-KISS-SBC est un __proxy SIP simple__, facile à apprendre, rapide à déployer, prêt pour la production. 12 | 13 | ## Pourquoi P-KISS-SBC ? 14 | 15 | Il existe de nombreuses solutions de Proxy SIP / SBC ou même de passerelles SIP. 16 | Bien que l'offre puisse paraître importante, il existe en réalité 2 types de solutions : 17 | 18 | * des __solutions complètes__, mais complexes à mettre en œuvre et à exploiter. Le ticket d'entrée en termes d'infrastructure (serveur et/ou licence) est élevé. Enfin, les compétences de gestion au quotidien (création de pairs SIP, débogage SIP, etc.) nécessitent une bonne formation. 19 | * Les __frameworks__, souvent OpenSource, tels que Kamailio, OpenSIPS, Asterisk, FreeSwitch, Yate, etc., qui vous permettent de développer votre propre solution interne, mais qui nécessitent que vous soyez familier avec les protocoles SIP/RTP et ces solutions. 20 | 21 | ## Qu'est-ce que P-KISS-SBC ? 22 | 23 | PKS est un proxy SIP __simple__, __performant__ et __moderne__ pour interconnecter des trunks SIP et des IPBX. 24 | 25 | Ses principales caractéristiques sont les suivantes : 26 | 27 | * __Facile__ : Conçu pour être facile à utiliser et à apprendre. Moins de temps passé à lire la documentation. 28 | * __Intuitif__ : Une interface web claire, concise et utile 29 | * __Rapide à déployer__ : Assistant de configuration et de déploiement. 30 | * __Haute performance__ : Une seule machine virtuelle peut facilement gérer plus d'un millier d'appels simultanés. 31 | * __Robuste__ : Prêt pour la production : stable, sécurisé et fiable 32 | 33 | P-KISS-SBC a été conçu selon le principe __KISS__, keep it simple, stupid ! Ce principe définit une ligne directrice de conception qui prône la __simplicité__ et l'évitement de toute complexité non essentielle. 34 | 35 | ## Que puis-je faire avec P-KISS-SBC ? 36 | 37 | PKS se positionne comme une solution simple avec des fonctionnalités limitées. Son objectif est de répondre au besoin d'interconnecter un ou plusieurs trunks SIP d'opérateurs à un ou plusieurs IPBX. 38 | -------------------------------------------------------------------------------- /docs/philosophy.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Philosophy 8 | 9 | Before settling for P-KISS-SBC, it's a good idea to understand the philosophy behind the project, in order to make sure it aligns with your goals. 10 | 11 | This page explains the design principles anchored in P-KISS-SBC. 12 | 13 | ## Design principles 14 | 15 | - __KISS__: Focus on simplicity and deploy a SBC in minutes. 16 | No need to have technical knowledge about SIP, RTP, databases ... 17 | :octicons-arrow-right-24: let P-KISS-SBC do the heavy lifting for you. 18 | - __Made to be reliable__: Run your SBC with confidence. P-KISS-SBC is a fire and forget application. 19 | - __Fast and lightweight__: P-KISS-SBC is built to be run with excellent performance. 20 | - __Open Source__: Choose a mature and well-funded 21 | solution built with state-of-the-art Open Source technologies. Keep ownership 22 | of your content without fear of vendor lock-in. Licensed under [AGPL](license.md). 23 | -------------------------------------------------------------------------------- /docs/philosophy.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | --- 8 | title: PKS philosophie 9 | description: KISS Keep It SImple and Stupid 10 | --- 11 | 12 | # Philosophie 13 | 14 | Avant d'opter pour P-KISS-SBC, il convient de comprendre la philosophie qui sous-tend le projet, afin de s'assurer qu'il correspond à vos objectifs. 15 | 16 | Cette page explique les principes de conception ancrés dans P-KISS-SBC. 17 | 18 | ## Principes de conception 19 | 20 | - __KISS__ : Se concentrer sur la simplicité et déployer un SBC en quelques minutes. 21 | Pas besoin de connaissances techniques en SIP, de RTP, de bases de données... :octicons-arrow-right-24: laissez P-KISS-SBC faire le gros du travail pour vous. 22 | - __Pensé pour être fiable__ : Faites fonctionner votre SBC en toute confiance. P-KISS-SBC est une application facile à utiliser et à oublier (Fire and Forget). 23 | - __Rapide et léger__ : P-KISS-SBC est conçu pour fonctionner avec d'excellentes performances. 24 | - __Open Source__ : Choisissez une solution mature et bien financée, construite avec des technologies Open Source de pointe. Restez propriétaire de votre contenu sans crainte d'un verrouillage par le fournisseur. Sous [licence AGPL](license.md). 25 | -------------------------------------------------------------------------------- /docs/theme_overrides/404.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | 3 | 4 | {% block content %} 5 |
6 |
7 |

Ah, nuts!

8 |

We were unable to find the page you were looking for, but we'll get cracking on the problem.

9 |
10 | 11 |
12 | 13 | 14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /docs/theme_overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block analytics %} 4 | 5 | 6 | 7 | {% endblock %} 8 | 9 | {% block announce %} 10 | 11 | 28 | For update follow 29 | 30 | 31 | {% include ".icons/fontawesome/brands/mailchimp.svg" %} 32 | 33 | PKS project 34 | 35 | 36 | {% endblock %} -------------------------------------------------------------------------------- /docs/use-cases/connecting-ipbx-to-multiple-carriers.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Connecting an IPBX to more than one operator 8 | 9 | In order to save money on subscriptions and telephone communications, it may be advisable to use different operators depending on the destinations or numbers required, particularly for international calls. P-KISS-SBC makes it possible to connect several operators to an IPBX and to route incoming calls to the IPBX, whatever the original operator, and to route outgoing calls to the desired operator. Although it is possible to connect several operators directly to an IPBX, it is complex to route calls to the desired operator while integrating a failover function. P-KISS-SBC incorporates a function that allows you to attempt to route the call to a preferred operator and, if this fails, to attempt to terminate the call on a second operator. 10 | 11 | SIP PROVIDER 1 12 | ===== P-KISS-SBC ==== IPBX 13 | SIP PROVIDER 2 14 | -------------------------------------------------------------------------------- /docs/use-cases/connecting-mutitenant-ipbx-to-carrier.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Connecting an IPBX to more than one operator 8 | 9 | For administrations or sites hosting several companies, it is common to use a multi-tenant IPBX, i.e. hosting separate entities that are hermetically sealed from each other. Apart from a hack, it is impossible to connect this multi-tenant IPBX to a telecoms operator via a single trunk. P-KISS-SBC makes this possible: 10 | 11 | SIP PROVIDER ==== P-KISS-SBC ==tenant 1== IPBX tenant 1 12 | ==Holder 2== IPBX holding 2 13 | -------------------------------------------------------------------------------- /docs/use-cases/failover.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Fail over from a primary to a secondary IPBX 8 | 9 | Another simple use case to implement with P-KISS-SBC is IPBX high availability. 2 scenarios are possible. Firstly, failover enabling requests to be sent from the main IPBX to the secondary IPBX without any manual action. The telecoms operator(s) see no change and have no knowledge of the internal telephone infrastructure. 10 | 11 | Nominal operation: 12 | 13 | SIP PROVIDER ==== P-KISS-SBC ==== Main IPBX 14 | ---- Secondary IPBX 15 | 16 | In the event of loss of the main IPBX, flows are redirected to the secondary IPBX. 17 | 18 | SIP PROVIDER ==== P-KISS-SBC ---- Main IPBX 19 | ==== Secondary IPBX 20 | 21 | The return to nominal operation is automatic as soon as P-KISS-SBC detects that the main IPBX is back in working order. 22 | -------------------------------------------------------------------------------- /docs/use-cases/geographical-distribution-ipbx.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Geographical distribution of IPBX with centralised telecom operator connection 8 | 9 | For reasons of flow optimisation, availability or load distribution, IPBX instances can be deployed on different sites. P-KISS-SBC enables a single connection to an operator and the calls to be routed simply to the desired instance: 10 | 11 | Call to site 1 : 12 | 13 | SIP PROVIDER ==== P-KISS-SBC ==== IPBX 1 14 | ---- IPBX 2 15 | 16 | Call to site 2 : 17 | 18 | SIP PROVIDER ==== P-KISS-SBC ---- IPBX 1 19 | ==== IPBX 2 20 | -------------------------------------------------------------------------------- /docs/use-cases/ipbx-high-availability.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # High availability of an IPBX with 2 or more instances 8 | 9 | In addition to fail over, P-KISS-SBC also supports high availability where the IPBX operates with 2 or more simultaneously active instances. In this case, P-KISS-SBC routes requests equally between the instances: 10 | 11 | SIP PROVIDER ==== P-KISS-SBC ==50%== IPBX instance 1 12 | ==50%== IPBX instance 2 13 | 14 | -------------------------------------------------------------------------------- /docs/use-cases/securing-telephony-system.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Securing a telephony system 8 | 9 | This first use case is the simplest: use P-KISS-SBC between the outside world and the IPBX to protect it. The diagram will be as follows: 10 | 11 | SIP Provider ==== P-KISS-SBC ===== IPBX 12 | 13 | An SBC has more advanced and powerful security features than an IPBX, which must be considered as an application server. An IPBX exposes a large number of services, making its attack surface large. It is also not very robust to Denial of Service attacks. P-KISS-SBC by design offers a very low attack surface, detects and blocks attack attempts before they reach the IPBX and is very resilient due to its ability to support a large number of requests. 14 | 15 | TODO: detail security features and implementation 16 | -------------------------------------------------------------------------------- /docs/use-cases/usecases.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Use cases 8 | 9 | Despite its simplicity, PKS can address many of the issues encountered in SIP architectures. 10 | 11 | Here are a few use cases explained to give you a better understanding of how PKS can help you: 12 | 13 | - [:material-security: Securing a telephony system](securing-telephony-system.md) 14 | - [:material-server-off: Fail over from a primary to a secondary IPBX](failover.md) 15 | - [:material-server-network: High availability of an IPBX with 2 or more instances](ipbx-high-availability.md) 16 | - [:simple-osgeo: Geographical distribution of IPBX with centralised telecom operator connection](geographical-distribution-ipbx.md) 17 | - [:material-account-multiple: Connecting a multi-tenant IPBX to a telecom operator](connecting-mutitenant-ipbx-to-carrier.md) 18 | - [:material-hub: Connecting an IPBX to more than one operator](connecting-ipbx-to-multiple-carriers.md) 19 | - ... 20 | -------------------------------------------------------------------------------- /docs/use-cases/usecases.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Cas d'utilisation 8 | 9 | Malgré sa simplicité, PKS peut répondre à beaucoup de problématique rencontrées dans les architectures SIP. 10 | 11 | Vous trouverez quelques cas d'usage expliqués afin que vous puissiez mieux comprendre comment PKS peut vous aider : 12 | 13 | - [:material-security: Sécurisation d'un système de téléphonie](securing-telephony-system.md) 14 | - [:material-server-off: Fail over d'un IPBX principal à un secondaire](failover.md) 15 | - [:material-server-network: Haute disponibilité d'un IPBX avec 2 ou plus instances](ipbx-high-availability.md) 16 | - [:simple-osgeo: Répartition géographique d'IPBX avec connexion opérateur télécom centralisé](geographical-distribution-ipbx.md) 17 | - [:material-account-multiple: Connexion d'un IPBX mutli-entités avec un opérateur télécom](connecting-mutitenant-ipbx-to-carrier.md) 18 | - [:material-hub: Raccordement d'un IPBX à plus d'un opérateur](connecting-ipbx-to-multiple-carriers.md) 19 | - ... 20 | -------------------------------------------------------------------------------- /docs/user-guide/advanced-configuration.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Advanced Configuration 8 | 9 | To download the PKS code, you need to have installed git and make commands. On debian/ubuntu : 10 | 11 | ```bash 12 | apt install git make 13 | ``` 14 | 15 | ## Installation 16 | 17 | 2 folders must be created to host the P-KISS-SBC data: 18 | 19 | ```bash 20 | mkdir /src/pks/redis /srv/pks/db 21 | ``` 22 | 23 | and download the PKS script and run it : 24 | 25 | ```bash 26 | cd /usr/src 27 | git clone https://gitlab.com/mwolff44/pyfreebilling 28 | ln -s /usr/src/pyfreebilling/src/pks /usr/local/bin/pks 29 | ``` 30 | 31 | ## Setup 32 | 33 | ### Initial configuration 34 | 35 | create file in directory /srv/pks 36 | 37 | ```bash 38 | touch .env 39 | ``` 40 | 41 | And add values corresponding to your installation. This is an example : 42 | 43 | ```text 44 | # Public IP of my VM 45 | PUBLIC_IP=1.1.1.1 46 | LISTEN_ADVERTISE=1.1.1.1:5060 47 | 48 | # Private IP of my VM 49 | LOCAL_IP=192.168.0.1 50 | 51 | # RTP ports range 52 | PORT_MIN=16000 53 | PORT_MAX=18000 54 | 55 | ENVIRONMENT=prod 56 | RTPENGINE_URL=127.0.0.1 57 | BIND_HTTP_IP=127.0.0.1 58 | REDIS_URL=127.0.0.1 59 | 60 | # Disable gateway probing 61 | NOT_PROBING=true 62 | ``` 63 | 64 | ### Quick configuration 65 | 66 | #### Add a SIP Provider 67 | 68 | To add a SIP Provider, use the commandline PKS to declare the IP/PORT of the provider gateway and add a default route to route all calls coming from IPBX to this SIP Provider. 69 | 70 | ```bash 71 | pks admin add provider 72 | ``` 73 | 74 | #### Add an IPBX 75 | 76 | To add an IPBX, use the commandline PKS to declare the IP/PORT of the IPBX and add DIDs to route incoming calls to thid IPBX. 77 | 78 | ```bash 79 | pks admin add ipbx 80 | 81 | pks admin add did 82 | ``` 83 | -------------------------------------------------------------------------------- /docs/user-guide/advanced-configuration.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Configuration Avancée 8 | 9 | ## Prérequis 10 | 11 | Suivez les étapes suivantes pour installer P-KISS-SBC : 12 | 13 | 1. Installer docker, docker-compose et git 14 | 2. créer les dossiers dans /srv pour les données de P-KISS-SBC 15 | 3. télécharger le code PKS 16 | 17 | Pour télécharger le code PKS, vous devez avoir installé les commandes git et make. Sur debian/ubuntu : 18 | 19 | ```bash 20 | apt install git make 21 | ``` 22 | 23 | ## Installation 24 | 25 | 2 dossiers doivent être créés pour héberger les données P-KISS-SBC : 26 | 27 | ```bash 28 | mkdir /src/pks/redis /srv/pks/db 29 | ``` 30 | 31 | et télécharger le script PKS et l'exécuter : 32 | 33 | ```bash 34 | cd /usr/src 35 | git clone https://gitlab.com/mwolff44/pyfreebilling 36 | ln -s /usr/src/pyfreebilling/src/pks /usr/local/bin/pks 37 | ``` 38 | 39 | ## Setup 40 | 41 | ### Configuration initiale 42 | 43 | créer un fichier dans le répertoire /srv/pks 44 | 45 | ```bash 46 | touch .env 47 | ``` 48 | 49 | Et ajoutez les valeurs correspondant à votre installation. Voici un exemple : 50 | 51 | ```bash 52 | # IP publique de ma VM 53 | PUBLIC_IP=1.1.1.1 54 | LISTEN_ADVERTISE=1.1.1.1:5060 55 | 56 | # IP privée de ma VM 57 | LOCAL_IP=192.168.0.1 58 | 59 | # Gamme de ports RTP 60 | PORT_MIN=16000 61 | PORT_MAX=18000 62 | 63 | ENVIRONMENT=prod 64 | RTPENGINE_URL=127.0.0.1 65 | BIND_HTTP_IP=127.0.0.1 66 | REDIS_URL=127.0.0.1 67 | 68 | # Désactiver le sondage de la passerelle 69 | NOT_PROBING=true 70 | ``` 71 | 72 | ### Configuration rapide 73 | 74 | #### Ajouter un fournisseur SIP 75 | 76 | Pour ajouter un fournisseur SIP, utilisez la ligne de commande PKS pour déclarer l'IP/PORT de la passerelle du fournisseur et ajoutez une route par défaut pour acheminer tous les appels provenant de l'IPBX vers ce fournisseur SIP. 77 | 78 | ```bash 79 | pks admin add provider 80 | ``` 81 | 82 | #### Ajouter un IPBX 83 | 84 | Pour ajouter un IPBX, utilisez la ligne de commande PKS pour déclarer l'IP/PORT de l'IPBX et ajouter des SDAs pour router les appels entrants vers cet IPBX. 85 | 86 | ```bash 87 | pks admin add ipbx 88 | 89 | pks admin add did 90 | ``` 91 | -------------------------------------------------------------------------------- /docs/user-guide/cli.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Commands 8 | 9 | * `pks install` - Install a new P-KISS-SBC. 10 | * `pks start` - Start the P-KISS-SBC system. 11 | * `pks reload` - Reload the configuration. 12 | * `pks -h` - Print help message and exit. 13 | -------------------------------------------------------------------------------- /docs/user-guide/configuration.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Post Installation 8 | 9 | Now that P-KISS-SBC is installed, we're going to connect our first SIP provider, our first IPBX and route calls from a DID to our IPBX and route calls from the IPBX to our SIP operator. 10 | 11 | ## Optional step 12 | 13 | The *local* logging driver is recommended as it performs log-rotation by default, and uses a more efficient file format. 14 | To configure the Docker daemon to default to a specific logging driver, set the value of log-driver to the name of the logging driver in the daemon.json /etc/docker/daemon.json 15 | 16 | ```bash 17 | { 18 | “log-driver”: “local” 19 | } 20 | ``` 21 | 22 | Restart Docker for the changes to take effect 23 | 24 | ```bash 25 | sudo systemctl restart docker.service 26 | ``` 27 | 28 | And to check 29 | 30 | ```bash 31 | docker info --format '{{.LoggingDriver}}' 32 | ``` 33 | 34 | ## Simple steps 35 | 36 | 1. Create a SIP provider 37 | 2. Route calls to our SIP provider 38 | 2. Create an IPBX 39 | 3. Add DIDs and route them to our IPBX -------------------------------------------------------------------------------- /docs/user-guide/configuration.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Post Installation 8 | 9 | ## Étape optionnelle 10 | 11 | Le pilote de journalisation *local* est recommandé car il effectue la rotation des journaux par défaut et utilise un format de fichier plus efficace. 12 | Pour configurer le daemon Docker pour qu'il utilise par défaut un pilote de journalisation spécifique, définissez la valeur de log-driver avec le nom du pilote de journalisation dans le fichier daemon.json /etc/docker/daemon.json 13 | 14 | ``` 15 | { 16 | "log-driver" : "local" 17 | } 18 | ``` 19 | 20 | Redémarrez Docker pour que les changements soient pris en compte 21 | 22 | ``` 23 | sudo systemctl restart docker.service 24 | ``` 25 | 26 | Et pour vérifier 27 | 28 | ``` 29 | docker info --format '{{.LoggingDriver}}' 30 | ``` 31 | -------------------------------------------------------------------------------- /docs/user-guide/installation.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # One-Step Automated Install 8 | 9 | You may install P-KISS-SBC using the following command: 10 | 11 | ```bash 12 | curl -sSL http://bit.ly/pks-basic-install | bash 13 | ``` 14 | 15 | 16 | !!! info 17 | Piping to `bash` is a controversial topic, as it prevents you from reading code that is about to run on your system. 18 | 19 | If you would prefer to review the code before installation, you have an option before running the script. 20 | 21 | -------------------------------------------------------------------------------- /docs/user-guide/installation.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Installation automatisée en une étape 8 | 9 | Vous pouvez installer P-KISS-SBC en utilisant la commande suivante : 10 | 11 | ``bash 12 | curl -sSL http://bit.ly/pks-basic-install | bash 13 | ``` 14 | 15 | 16 | ! !! info 17 | Le piping vers `bash` est un sujet controversé, car il vous empêche de lire le code qui est sur le point de s'exécuter sur votre système. 18 | 19 | Si vous préférez revoir le code avant l'installation, vous avez une option avant d'exécuter le script. 20 | 21 | -------------------------------------------------------------------------------- /docs/user-guide/manage-fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Gérer P-KISS-SBC 8 | 9 | Pour lancer P-KISS-SBC et le gérer, vous utiliserez la ligne de commande simple mais efficace PKS. 10 | 11 | ```bash 12 | # Pour démarrer 13 | pks start 14 | 15 | # Pour arrêter 16 | pks stop 17 | 18 | # Pour recharger la configuration 19 | pks reload 20 | 21 | # Pour voir l'état des conteneurs 22 | pks status 23 | 24 | # Pour afficher les statistiques d'utilisation des ressources en direct pour des conteneurs 25 | pks stats 26 | 27 | # Pour voir les logs 28 | pks debug 29 | ``` 30 | -------------------------------------------------------------------------------- /docs/user-guide/manage.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Manage P-KISS-SBC 8 | 9 | To lauch P-KISS-SBC and manage it, you will use the simple but effective commandline PKS. 10 | 11 | ```bash 12 | # To start 13 | pks start 14 | 15 | # To stop 16 | pks stop 17 | 18 | # To reload the configuration 19 | pks reload 20 | 21 | # To see containers status 22 | pks status 23 | 24 | # To display a live stream of containers resource usage statistics 25 | pks stats 26 | 27 | # To see the logs 28 | pks debug 29 | ``` 30 | -------------------------------------------------------------------------------- /docs/user-guide/requirements.en.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Requirements 8 | 9 | P-KISS-SBC uses __Docker containers__ to run and supports all infrastructures that support containers. 10 | 11 | Automated deployment uses docker compose, but kubernetes will be supported in the near future. 12 | 13 | So, the only thing you need to install P-KISS-SBC is a server with Docker and docker compose installed. 14 | 15 | !!! Tip "HowTo install Docker ?" 16 | 17 | To install docker and docker compose on debian, follow this guide : [https://docs.docker.com/engine/install/debian/](https://docs.docker.com/engine/install/debian/) 18 | 19 | ## Supported Operating Systems 20 | 21 | The one-step automated install script can be used with limited operating system. 22 | 23 | The following operating systems are __officially__ supported: 24 | 25 | | Distribution | Release | Architecture | 26 | | ------------ | ---------------- | ------------------- | 27 | | DietPi | v8.xx | x86_64 | 28 | | Ubuntu | 22.04 | x86_64 | 29 | | Debian | 12 | x86_64 | 30 | 31 | !!! Note "Deploy to another OS 32 | It is perfectly possible to deploy PKS on another OS. The prerequisites will have to be installed manually! 33 | 34 | ## VM sizing 35 | 36 | The server must have a __CPU with x86_64__ and support for SSE 4.2 or equivalent NEON instructions. 37 | 38 | We recommend using a __minimum of 2 vcpu and 2GB of RAM__ but the requirements will depend on your VoIP traffic in terms of concurrent calls and new calls per second. 39 | 40 | !!! warning "Dedicated resources" 41 | It is important not to forget that PKS will be processing pseudo-real-time flows (VoIP). It is therefore essential to __dedicate__ hardware resources__ (CPU and RAM) to PKS. Over-allocation must be avoided, as this will result in degraded audio quality. 42 | Even if writes are not critical, as PKS does not use a database, you must ensure that disk accesses are fast enough. 43 | 44 | ## Network 45 | 46 | ### Quality 47 | 48 | VoIP requires a __network__ of good size and __quality__. Media flows must be __prioritised__ (by default `TOS 184` is defined). 49 | 50 | !!! tip "" 51 | __Bandwidth reservation__ is also interesting to implement within your network equipment. 52 | 53 | ### IP addressing 54 | 55 | PKS is deployed on a VM with __a single private IP address__. A __public IP address__ with the ports returned on this VM is __necessary__ (see list below). 56 | 57 | !!! tip "2 public IP adresses" 58 | It is possible to have a different IP address for signalling than the media's public IP address. 59 | 60 | ### Network ports 61 | 62 | PKS uses __2 different network ports__ for __signalling__ (UDP 5060 and UDP 5070) and a __range of predefined ports__ for __media__ (UDP 16000 to 18000). 63 | 64 | These __parameters__ can be __modified__ to suit your needs, including the RTP port range to handle more concurrent calls. 65 | 66 | !!! note "Web admin" 67 | In addition, if you are using PKS-Admin, the Web administration interface, TCP port 4433 must be open. 68 | -------------------------------------------------------------------------------- /docs/user-guide/requirements.fr.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Prérequis 8 | 9 | P-KISS-SBC utilise des __conteneurs Docker__ pour fonctionner et prend en charge toutes les infrastructures qui prennent en charge les conteneurs. 10 | 11 | Le déploiement automatisé utilise docker compose, mais kubernetes sera pris en charge dans un avenir proche. 12 | 13 | Ainsi, la seule chose dont vous avez besoin pour installer P-KISS-SBC est un serveur avec Docker et docker compose installés. 14 | 15 | !!! Tip "Comment installer Docker ?" 16 | 17 | Pour installer docker et docker compose sur debian, suivez ce guide : [https://docs.docker.com/engine/install/debian/](https://docs.docker.com/engine/install/debian/) 18 | 19 | ## Systèmes d'exploitation supportés 20 | 21 | Le script d'installation automatique en une étape peut être utilisé avec un nombre limité de systèmes d'exploitation. 22 | 23 | Les systèmes d'exploitation suivants sont __officiellement__ pris en charge : 24 | 25 | | Distribution | Release | Architecture | 26 | | ------------ | ---------------- | ------------------- | 27 | | DietPi | v8.xx | x86_64 | 28 | | Ubuntu | 22.04 | x86_64 | 29 | | Debian | 12 | x86_64 | 30 | 31 | !!! Note "Déployer sur un autre OS" 32 | Il est tout à fait possible de déployer PKS sur un autre OS. Les pré-requis devront-être installés manuellement ! 33 | 34 | ## Dimensionnement VM 35 | 36 | Le serveur doit être équipé de __processeur x86_64__ et prendre en charge SSE 4.2 ou des instructions NEON équivalentes. 37 | 38 | Nous recommandons d'utiliser un __minimum de 2 vcpu et 2GB de RAM__, mais les exigences dépendront de votre trafic VoIP en termes d'appels simultanés et de nouveaux appels par seconde. 39 | 40 | !!! warning "Ressources dédiées" 41 | Il est important de ne pas pas oublier que PKS va traiter des flux pseudo __temps réel__ (VoIP). Il est donc essentiel de __dédier__ les __ressources matériels__ (CPU et RAM) à PKS. Il faut éviter les sur-allocations qui auront pour conséquences une qualité audio dégradée. 42 | Même si les écritures ne sont pas critiques, PKS n'utilisant pas de base de données, il faut s'assurer que les accès disque soient assez rapide. 43 | 44 | ## Réseau 45 | 46 | ### Qualité 47 | 48 | La VoIP nécessite un __réseau__ bien dimensionné et de __bonne qualité__. Les __flux média__ doivent-être __priorisé__ (par défaut le `TOS 184` est défini). 49 | 50 | !!! tip "" 51 | La __réservation de bande passante__ est aussi intéressante à mettre en oeuvre au sein de vos équipements réseaux. 52 | 53 | ### Adressage IP 54 | 55 | PKS se déploie sur une VM avec __une seule adresse IP privée__. Une __adresse IP publique__ avec les ports renvoyés sur cette VM est __nécessaire__ (voir la liste ci-dessous). 56 | 57 | !!! tip "2 adresses IP publiques" 58 | Il est possible de disposer d'une addresse IP pour la signalisation différente de l'addresse IP publique du média. 59 | 60 | ### Ports réseaux 61 | 62 | PKS utilise __2 ports réseau différents__ pour la __signalisation__ (UDP 5060 et UDP 5070) et une __plage de ports__ prédéfinis pour le __média__ (UDP 16000 à 18000). 63 | 64 | Ces __paramètres__ peuvent-être __modifiés__ pour correspondre à vos besoins, notamment la plage de ports RTP afin de pouvoir gérer plus d'appels concurrents. 65 | 66 | !!! note "Administration web" 67 | De plus, si vous utilisez PKS-Admin, l'interface Web d'administration, le port TCP 4433 devra être ouvert. 68 | -------------------------------------------------------------------------------- /jampack.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | nocache: true, 3 | }; -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "mkdocs build" 3 | publis = "site" 4 | 5 | [[redirects]] 6 | from = "/js/script.js" 7 | to = "https://plausible.io/js/script.outbound-links.js" 8 | status = 200 9 | 10 | [[redirects]] 11 | from = "/api/event" 12 | to = "https://plausible.io/api/event" 13 | status = 200 14 | 15 | [[redirects]] 16 | from = "/knowledge-base/*" 17 | to = "/getting-started" 18 | status = 301 19 | 20 | [[redirects]] 21 | from = "/faq/*" 22 | to = "/" 23 | status = 301 24 | 25 | [[redirects]] 26 | from = "/customer-portal/" 27 | to = "/" 28 | status = 301 29 | 30 | [[redirects]] 31 | from = "/home/" 32 | to = "/" 33 | status = 301 34 | 35 | [[redirects]] 36 | from = "/support/" 37 | to = "/contributing/" 38 | status = 301 39 | 40 | [[redirects]] 41 | from = "/demo/" 42 | to = "/" 43 | status = 301 44 | 45 | [[redirects]] 46 | from = "/how-to-install-pyfreebilling-1-4-6-on-ubuntu-14-04-64-bits-lts/" 47 | to = "/getting-started" 48 | status = 301 49 | 50 | [[redirects]] 51 | from = "/new-stats-panel/" 52 | to = "/" 53 | status = 301 -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@divriots/jampack": "^0.24.4", 4 | "cz-conventional-changelog": "^3.3.0" 5 | }, 6 | "config": { 7 | "commitizen": { 8 | "path": "cz-conventional-changelog" 9 | } 10 | }, 11 | "scripts": { 12 | "optimize": "jampack --nocache ./site" 13 | }, 14 | "dependencies": { 15 | "preline": "^1.9.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /pyfb.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "path": "." 5 | }, 6 | { 7 | "path": "deploy/kubernetes/testing" 8 | } 9 | ], 10 | "settings": { 11 | "python.pythonPath": "/usr/bin/python" 12 | } 13 | } -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs==1.6.0 2 | mkdocs-git-authors-plugin==0.9.0 3 | mkdocs-material[imaging]==9.5.28 4 | mkdocs-minify-plugin==0.7.2 5 | mkdocs-static-i18n==1.2.3 6 | mkdocs-render-swagger-plugin==0.1.2 7 | mkdocs-git-revision-date-localized-plugin==1.2.6 8 | mkdocs-redirects==1.2.1 9 | mkdocs-static-i18n[material] 10 | mkdocs-rss-plugin==1.15.0 -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | 3.8 -------------------------------------------------------------------------------- /site/assets/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/favicon.png -------------------------------------------------------------------------------- /site/assets/images/pistachios.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/pistachios.jpg -------------------------------------------------------------------------------- /site/assets/images/social/__README.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/__README.png -------------------------------------------------------------------------------- /site/assets/images/social/api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/api.png -------------------------------------------------------------------------------- /site/assets/images/social/bestpractices.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/bestpractices.en.png -------------------------------------------------------------------------------- /site/assets/images/social/bestpractices.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/bestpractices.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/changelog/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/changelog/index.png -------------------------------------------------------------------------------- /site/assets/images/social/contributing/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/contributing/index.png -------------------------------------------------------------------------------- /site/assets/images/social/contributing/reporting-a-bug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/contributing/reporting-a-bug.png -------------------------------------------------------------------------------- /site/assets/images/social/contributing/reporting-a-docs-issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/contributing/reporting-a-docs-issue.png -------------------------------------------------------------------------------- /site/assets/images/social/contributing/requesting-a-change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/contributing/requesting-a-change.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/do-I-need-a-sbc-voip.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/do-I-need-a-sbc-voip.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/do-I-need-a-sbc-voip.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/do-I-need-a-sbc-voip.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/index.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/index.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/index.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/index.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/is-anyone-is-running-pyfreebilling-in-production.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/is-anyone-is-running-pyfreebilling-in-production.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/is-anyone-is-running-pyfreebilling-in-production.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/is-anyone-is-running-pyfreebilling-in-production.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/is-pks-softswitch.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/is-pks-softswitch.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/is-pks-softswitch.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/is-pks-softswitch.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/lcr-routing.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/lcr-routing.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/lcr-routing.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/lcr-routing.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/pyfreebilling-pks-differences.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/pyfreebilling-pks-differences.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/pyfreebilling-pks-differences.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/pyfreebilling-pks-differences.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/voip-softswitch-caracteristics.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/voip-softswitch-caracteristics.en.png -------------------------------------------------------------------------------- /site/assets/images/social/faq/voip-softswitch-caracteristics.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/faq/voip-softswitch-caracteristics.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/getting-started.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/getting-started.en.png -------------------------------------------------------------------------------- /site/assets/images/social/getting-started.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/getting-started.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/apiban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/apiban.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/backup-recovery.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/backup-recovery.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/backup-recovery.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/backup-recovery.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/failover.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/failover.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/failover.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/failover.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/loadbalancing.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/loadbalancing.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/loadbalancing.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/loadbalancing.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/multi-tenant-ipbx.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/multi-tenant-ipbx.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/multi-tenant-ipbx.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/multi-tenant-ipbx.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/pks-standby-failover.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/pks-standby-failover.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/pks-standby-failover.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/pks-standby-failover.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/troubleshooting.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/troubleshooting.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/troubleshooting.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/troubleshooting.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/upgrade.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/upgrade.en.png -------------------------------------------------------------------------------- /site/assets/images/social/how-to/upgrade.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/how-to/upgrade.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/index.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/index.en.png -------------------------------------------------------------------------------- /site/assets/images/social/index.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/index.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/license.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/license.png -------------------------------------------------------------------------------- /site/assets/images/social/philosophy.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/philosophy.en.png -------------------------------------------------------------------------------- /site/assets/images/social/philosophy.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/philosophy.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/connecting-ipbx-to-multiple-carriers.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/connecting-ipbx-to-multiple-carriers.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/connecting-mutitenant-ipbx-to-carrier.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/connecting-mutitenant-ipbx-to-carrier.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/failover.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/failover.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/geographical-distribution-ipbx.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/geographical-distribution-ipbx.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/ipbx-high-availability.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/ipbx-high-availability.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/securing-telephony-system.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/securing-telephony-system.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/usecases.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/usecases.en.png -------------------------------------------------------------------------------- /site/assets/images/social/use-cases/usecases.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/use-cases/usecases.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/advanced-configuration.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/advanced-configuration.en.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/advanced-configuration.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/advanced-configuration.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/cli.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/cli.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/configuration.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/configuration.en.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/configuration.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/configuration.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/installation.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/installation.en.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/installation.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/installation.fr.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/manage-fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/manage-fr.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/manage.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/manage.en.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/requirements.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/requirements.en.png -------------------------------------------------------------------------------- /site/assets/images/social/user-guide/requirements.fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/images/social/user-guide/requirements.fr.png -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.da.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lunr languages, `Danish` language 3 | * https://github.com/MihaiValentin/lunr-languages 4 | * 5 | * Copyright 2014, Mihai Valentin 6 | * http://www.mozilla.org/MPL/ 7 | */ 8 | /*! 9 | * based on 10 | * Snowball JavaScript Library v0.3 11 | * http://code.google.com/p/urim/ 12 | * http://snowball.tartarus.org/ 13 | * 14 | * Copyright 2010, Oleg Mazko 15 | * http://www.mozilla.org/MPL/ 16 | */ 17 | 18 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=function(){var r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){function e(){var e,r=f.cursor+3;if(d=f.limit,0<=r&&r<=f.limit){for(a=r;;){if(e=f.cursor,f.in_grouping(w,97,248)){f.cursor=e;break}if(f.cursor=e,e>=f.limit)return;f.cursor++}for(;!f.out_grouping(w,97,248);){if(f.cursor>=f.limit)return;f.cursor++}d=f.cursor,d=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(c,32),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del();break;case 2:f.in_grouping_b(p,97,229)&&f.slice_del()}}function t(){var e,r=f.limit-f.cursor;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.find_among_b(l,4)?(f.bra=f.cursor,f.limit_backward=e,f.cursor=f.limit-r,f.cursor>f.limit_backward&&(f.cursor--,f.bra=f.cursor,f.slice_del())):f.limit_backward=e)}function s(){var e,r,i,n=f.limit-f.cursor;if(f.ket=f.cursor,f.eq_s_b(2,"st")&&(f.bra=f.cursor,f.eq_s_b(2,"ig")&&f.slice_del()),f.cursor=f.limit-n,f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(m,5),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del(),i=f.limit-f.cursor,t(),f.cursor=f.limit-i;break;case 2:f.slice_from("løs")}}function o(){var e;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.out_grouping_b(w,97,248)?(f.bra=f.cursor,u=f.slice_to(u),f.limit_backward=e,f.eq_v_b(u)&&f.slice_del()):f.limit_backward=e)}var a,d,u,c=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],l=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],w=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],p=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],f=new i;this.setCurrent=function(e){f.setCurrent(e)},this.getCurrent=function(){return f.getCurrent()},this.stem=function(){var r=f.cursor;return e(),f.limit_backward=r,f.cursor=f.limit,n(),f.cursor=f.limit,t(),f.cursor=f.limit,s(),f.cursor=f.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}}(),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.hi.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.hi=function(){this.pipeline.reset(),this.pipeline.add(e.hi.trimmer,e.hi.stopWordFilter,e.hi.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.hi.stemmer))},e.hi.wordCharacters="ऀ-ःऄ-एऐ-टठ-यर-िी-ॏॐ-य़ॠ-९॰-ॿa-zA-Za-zA-Z0-90-9",e.hi.trimmer=e.trimmerSupport.generateTrimmer(e.hi.wordCharacters),e.Pipeline.registerFunction(e.hi.trimmer,"trimmer-hi"),e.hi.stopWordFilter=e.generateStopWordFilter("अत अपना अपनी अपने अभी अंदर आदि आप इत्यादि इन इनका इन्हीं इन्हें इन्हों इस इसका इसकी इसके इसमें इसी इसे उन उनका उनकी उनके उनको उन्हीं उन्हें उन्हों उस उसके उसी उसे एक एवं एस ऐसे और कई कर करता करते करना करने करें कहते कहा का काफ़ी कि कितना किन्हें किन्हों किया किर किस किसी किसे की कुछ कुल के को कोई कौन कौनसा गया घर जब जहाँ जा जितना जिन जिन्हें जिन्हों जिस जिसे जीधर जैसा जैसे जो तक तब तरह तिन तिन्हें तिन्हों तिस तिसे तो था थी थे दबारा दिया दुसरा दूसरे दो द्वारा न नके नहीं ना निहायत नीचे ने पर पहले पूरा पे फिर बनी बही बहुत बाद बाला बिलकुल भी भीतर मगर मानो मे में यदि यह यहाँ यही या यिह ये रखें रहा रहे ऱ्वासा लिए लिये लेकिन व वग़ैरह वर्ग वह वहाँ वहीं वाले वुह वे वो सकता सकते सबसे सभी साथ साबुत साभ सारा से सो संग ही हुआ हुई हुए है हैं हो होता होती होते होना होने".split(" ")),e.hi.stemmer=function(){return function(e){return"function"==typeof e.update?e.update(function(e){return e}):e}}();var r=e.wordcut;r.init(),e.hi.tokenizer=function(i){if(!arguments.length||null==i||void 0==i)return[];if(Array.isArray(i))return i.map(function(r){return isLunr2?new e.Token(r.toLowerCase()):r.toLowerCase()});var t=i.toString().toLowerCase().replace(/^\s+/,"");return r.cut(t).split("|")},e.Pipeline.registerFunction(e.hi.stemmer,"stemmer-hi"),e.Pipeline.registerFunction(e.hi.stopWordFilter,"stopWordFilter-hi")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.hy.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.hy=function(){this.pipeline.reset(),this.pipeline.add(e.hy.trimmer,e.hy.stopWordFilter)},e.hy.wordCharacters="[A-Za-z԰-֏ff-ﭏ]",e.hy.trimmer=e.trimmerSupport.generateTrimmer(e.hy.wordCharacters),e.Pipeline.registerFunction(e.hy.trimmer,"trimmer-hy"),e.hy.stopWordFilter=e.generateStopWordFilter("դու և եք էիր էիք հետո նաև նրանք որը վրա է որ պիտի են այս մեջ ն իր ու ի այդ որոնք այն կամ էր մի ես համար այլ իսկ էին ենք հետ ին թ էինք մենք նրա նա դուք եմ էի ըստ որպես ում".split(" ")),e.Pipeline.registerFunction(e.hy.stopWordFilter,"stopWordFilter-hy"),e.hy.stemmer=function(){return function(e){return"function"==typeof e.update?e.update(function(e){return e}):e}}(),e.Pipeline.registerFunction(e.hy.stemmer,"stemmer-hy")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.ja.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.ja=function(){this.pipeline.reset(),this.pipeline.add(e.ja.trimmer,e.ja.stopWordFilter,e.ja.stemmer),r?this.tokenizer=e.ja.tokenizer:(e.tokenizer&&(e.tokenizer=e.ja.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.ja.tokenizer))};var t=new e.TinySegmenter;e.ja.tokenizer=function(i){var n,o,s,p,a,u,m,l,c,f;if(!arguments.length||null==i||void 0==i)return[];if(Array.isArray(i))return i.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(o=i.toString().toLowerCase().replace(/^\s+/,""),n=o.length-1;n>=0;n--)if(/\S/.test(o.charAt(n))){o=o.substring(0,n+1);break}for(a=[],s=o.length,c=0,l=0;c<=s;c++)if(u=o.charAt(c),m=c-l,u.match(/\s/)||c==s){if(m>0)for(p=t.segment(o.slice(l,c)).filter(function(e){return!!e}),f=l,n=0;n=w.limit)return;w.cursor=e+1}for(;!w.out_grouping(d,97,248);){if(w.cursor>=w.limit)return;w.cursor++}a=w.cursor,a=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(m,29),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:n=w.limit-w.cursor,w.in_grouping_b(c,98,122)?w.slice_del():(w.cursor=w.limit-n,w.eq_s_b(1,"k")&&w.out_grouping_b(d,97,248)&&w.slice_del());break;case 3:w.slice_from("er")}}function t(){var e,r=w.limit-w.cursor;w.cursor>=a&&(e=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,w.find_among_b(u,2)?(w.bra=w.cursor,w.limit_backward=e,w.cursor=w.limit-r,w.cursor>w.limit_backward&&(w.cursor--,w.bra=w.cursor,w.slice_del())):w.limit_backward=e)}function o(){var e,r;w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(l,11),e?(w.bra=w.cursor,w.limit_backward=r,1==e&&w.slice_del()):w.limit_backward=r)}var s,a,m=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],u=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],c=[119,125,149,1],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,i(),w.cursor=w.limit,t(),w.cursor=w.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.sa.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.sa=function(){this.pipeline.reset(),this.pipeline.add(e.sa.trimmer,e.sa.stopWordFilter,e.sa.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sa.stemmer))},e.sa.wordCharacters="ऀ-ःऄ-एऐ-टठ-यर-िी-ॏॐ-य़ॠ-९॰-ॿ꣠-꣱ꣲ-ꣷ꣸-ꣻ꣼-ꣽꣾ-ꣿᆰ0-ᆰ9",e.sa.trimmer=e.trimmerSupport.generateTrimmer(e.sa.wordCharacters),e.Pipeline.registerFunction(e.sa.trimmer,"trimmer-sa"),e.sa.stopWordFilter=e.generateStopWordFilter('तथा अयम्‌ एकम्‌ इत्यस्मिन्‌ तथा तत्‌ वा अयम्‌ इत्यस्य ते आहूत उपरि तेषाम्‌ किन्तु तेषाम्‌ तदा इत्यनेन अधिकः इत्यस्य तत्‌ केचन बहवः द्वि तथा महत्वपूर्णः अयम्‌ अस्य विषये अयं अस्ति तत्‌ प्रथमः विषये इत्युपरि इत्युपरि इतर अधिकतमः अधिकः अपि सामान्यतया ठ इतरेतर नूतनम्‌ द न्यूनम्‌ कश्चित्‌ वा विशालः द सः अस्ति तदनुसारम् तत्र अस्ति केवलम्‌ अपि अत्र सर्वे विविधाः तत्‌ बहवः यतः इदानीम्‌ द दक्षिण इत्यस्मै तस्य उपरि नथ अतीव कार्यम्‌ सर्वे एकैकम्‌ इत्यादि। एते सन्ति उत इत्थम्‌ मध्ये एतदर्थं . स कस्य प्रथमः श्री. करोति अस्मिन् प्रकारः निर्मिता कालः तत्र कर्तुं समान अधुना ते सन्ति स एकः अस्ति सः अर्थात् तेषां कृते . स्थितम् विशेषः अग्रिम तेषाम्‌ समान स्रोतः ख म समान इदानीमपि अधिकतया करोतु ते समान इत्यस्य वीथी सह यस्मिन् कृतवान्‌ धृतः तदा पुनः पूर्वं सः आगतः किम्‌ कुल इतर पुरा मात्रा स विषये उ अतएव अपि नगरस्य उपरि यतः प्रतिशतं कतरः कालः साधनानि भूत तथापि जात सम्बन्धि अन्यत्‌ ग अतः अस्माकं स्वकीयाः अस्माकं इदानीं अन्तः इत्यादयः भवन्तः इत्यादयः एते एताः तस्य अस्य इदम् एते तेषां तेषां तेषां तान् तेषां तेषां तेषां समानः सः एकः च तादृशाः बहवः अन्ये च वदन्ति यत् कियत् कस्मै कस्मै यस्मै यस्मै यस्मै यस्मै न अतिनीचः किन्तु प्रथमं सम्पूर्णतया ततः चिरकालानन्तरं पुस्तकं सम्पूर्णतया अन्तः किन्तु अत्र वा इह इव श्रद्धाय अवशिष्यते परन्तु अन्ये वर्गाः सन्ति ते सन्ति शक्नुवन्ति सर्वे मिलित्वा सर्वे एकत्र"'.split(" ")),e.sa.stemmer=function(){return function(e){return"function"==typeof e.update?e.update(function(e){return e}):e}}();var r=e.wordcut;r.init(),e.sa.tokenizer=function(t){if(!arguments.length||null==t||void 0==t)return[];if(Array.isArray(t))return t.map(function(r){return isLunr2?new e.Token(r.toLowerCase()):r.toLowerCase()});var i=t.toString().toLowerCase().replace(/^\s+/,"");return r.cut(i).split("|")},e.Pipeline.registerFunction(e.sa.stemmer,"stemmer-sa"),e.Pipeline.registerFunction(e.sa.stopWordFilter,"stopWordFilter-sa")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js: -------------------------------------------------------------------------------- 1 | !function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursors||e>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor>1),f=0,l=o0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o=0;m--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var _=t[s];if(o>=_.s_size){if(this.cursor=n-_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n-_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.sv.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Lunr languages, `Swedish` language 3 | * https://github.com/MihaiValentin/lunr-languages 4 | * 5 | * Copyright 2014, Mihai Valentin 6 | * http://www.mozilla.org/MPL/ 7 | */ 8 | /*! 9 | * based on 10 | * Snowball JavaScript Library v0.3 11 | * http://code.google.com/p/urim/ 12 | * http://snowball.tartarus.org/ 13 | * 14 | * Copyright 2010, Oleg Mazko 15 | * http://www.mozilla.org/MPL/ 16 | */ 17 | 18 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){function e(){var e,r=w.cursor+3;if(o=w.limit,0<=r||r<=w.limit){for(a=r;;){if(e=w.cursor,w.in_grouping(l,97,246)){w.cursor=e;break}if(w.cursor=e,w.cursor>=w.limit)return;w.cursor++}for(;!w.out_grouping(l,97,246);){if(w.cursor>=w.limit)return;w.cursor++}o=w.cursor,o=o&&(w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(u,37),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.in_grouping_b(d,98,121)&&w.slice_del()}}function i(){var e=w.limit_backward;w.cursor>=o&&(w.limit_backward=o,w.cursor=w.limit,w.find_among_b(c,7)&&(w.cursor=w.limit,w.ket=w.cursor,w.cursor>w.limit_backward&&(w.bra=--w.cursor,w.slice_del())),w.limit_backward=e)}function s(){var e,r;if(w.cursor>=o){if(r=w.limit_backward,w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(m,5))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.slice_from("lös");break;case 3:w.slice_from("full")}w.limit_backward=r}}var a,o,u=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],c=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],l=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],d=[119,127,149],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,t(),w.cursor=w.limit,i(),w.cursor=w.limit,s(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}}(),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.ta.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.ta=function(){this.pipeline.reset(),this.pipeline.add(e.ta.trimmer,e.ta.stopWordFilter,e.ta.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.ta.stemmer))},e.ta.wordCharacters="஀-உஊ-ஏஐ-ஙச-ட஠-னப-யர-ஹ஺-ிீ-௉ொ-௏ௐ-௙௚-௟௠-௩௪-௯௰-௹௺-௿a-zA-Za-zA-Z0-90-9",e.ta.trimmer=e.trimmerSupport.generateTrimmer(e.ta.wordCharacters),e.Pipeline.registerFunction(e.ta.trimmer,"trimmer-ta"),e.ta.stopWordFilter=e.generateStopWordFilter("அங்கு அங்கே அது அதை அந்த அவர் அவர்கள் அவள் அவன் அவை ஆக ஆகவே ஆகையால் ஆதலால் ஆதலினால் ஆனாலும் ஆனால் இங்கு இங்கே இது இதை இந்த இப்படி இவர் இவர்கள் இவள் இவன் இவை இவ்வளவு உனக்கு உனது உன் உன்னால் எங்கு எங்கே எது எதை எந்த எப்படி எவர் எவர்கள் எவள் எவன் எவை எவ்வளவு எனக்கு எனது எனவே என் என்ன என்னால் ஏது ஏன் தனது தன்னால் தானே தான் நாங்கள் நாம் நான் நீ நீங்கள்".split(" ")),e.ta.stemmer=function(){return function(e){return"function"==typeof e.update?e.update(function(e){return e}):e}}();var t=e.wordcut;t.init(),e.ta.tokenizer=function(r){if(!arguments.length||null==r||void 0==r)return[];if(Array.isArray(r))return r.map(function(t){return isLunr2?new e.Token(t.toLowerCase()):t.toLowerCase()});var i=r.toString().toLowerCase().replace(/^\s+/,"");return t.cut(i).split("|")},e.Pipeline.registerFunction(e.ta.stemmer,"stemmer-ta"),e.Pipeline.registerFunction(e.ta.stopWordFilter,"stopWordFilter-ta")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.te.min.js: -------------------------------------------------------------------------------- 1 | !function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.te=function(){this.pipeline.reset(),this.pipeline.add(e.te.trimmer,e.te.stopWordFilter,e.te.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.te.stemmer))},e.te.wordCharacters="ఀ-ఄఅ-ఔక-హా-ౌౕ-ౖౘ-ౚౠ-ౡౢ-ౣ౦-౯౸-౿఼ఽ్ౝ౷౤౥",e.te.trimmer=e.trimmerSupport.generateTrimmer(e.te.wordCharacters),e.Pipeline.registerFunction(e.te.trimmer,"trimmer-te"),e.te.stopWordFilter=e.generateStopWordFilter("అందరూ అందుబాటులో అడగండి అడగడం అడ్డంగా అనుగుణంగా అనుమతించు అనుమతిస్తుంది అయితే ఇప్పటికే ఉన్నారు ఎక్కడైనా ఎప్పుడు ఎవరైనా ఎవరో ఏ ఏదైనా ఏమైనప్పటికి ఒక ఒకరు కనిపిస్తాయి కాదు కూడా గా గురించి చుట్టూ చేయగలిగింది తగిన తర్వాత దాదాపు దూరంగా నిజంగా పై ప్రకారం ప్రక్కన మధ్య మరియు మరొక మళ్ళీ మాత్రమే మెచ్చుకో వద్ద వెంట వేరుగా వ్యతిరేకంగా సంబంధం".split(" ")),e.te.stemmer=function(){return function(e){return"function"==typeof e.update?e.update(function(e){return e}):e}}();var t=e.wordcut;t.init(),e.te.tokenizer=function(r){if(!arguments.length||null==r||void 0==r)return[];if(Array.isArray(r))return r.map(function(t){return isLunr2?new e.Token(t.toLowerCase()):t.toLowerCase()});var i=r.toString().toLowerCase().replace(/^\s+/,"");return t.cut(i).split("|")},e.Pipeline.registerFunction(e.te.stemmer,"stemmer-te"),e.Pipeline.registerFunction(e.te.stopWordFilter,"stopWordFilter-te")}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.th.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.th=function(){this.pipeline.reset(),this.pipeline.add(e.th.trimmer),r?this.tokenizer=e.th.tokenizer:(e.tokenizer&&(e.tokenizer=e.th.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.th.tokenizer))},e.th.wordCharacters="[฀-๿]",e.th.trimmer=e.trimmerSupport.generateTrimmer(e.th.wordCharacters),e.Pipeline.registerFunction(e.th.trimmer,"trimmer-th");var t=e.wordcut;t.init(),e.th.tokenizer=function(i){if(!arguments.length||null==i||void 0==i)return[];if(Array.isArray(i))return i.map(function(t){return r?new e.Token(t):t});var n=i.toString().replace(/^\s+/,"");return t.cut(n).split("|")}}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.vi.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.vi=function(){this.pipeline.reset(),this.pipeline.add(e.vi.stopWordFilter,e.vi.trimmer)},e.vi.wordCharacters="[A-Za-ẓ̀͐́͑̉̃̓ÂâÊêÔôĂ-ăĐ-đƠ-ơƯ-ư]",e.vi.trimmer=e.trimmerSupport.generateTrimmer(e.vi.wordCharacters),e.Pipeline.registerFunction(e.vi.trimmer,"trimmer-vi"),e.vi.stopWordFilter=e.generateStopWordFilter("là cái nhưng mà".split(" "))}}); -------------------------------------------------------------------------------- /site/assets/javascripts/lunr/min/lunr.zh.min.js: -------------------------------------------------------------------------------- 1 | !function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r(require("@node-rs/jieba")):r()(e.lunr)}(this,function(e){return function(r,t){if(void 0===r)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===r.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var i="2"==r.version[0];r.zh=function(){this.pipeline.reset(),this.pipeline.add(r.zh.trimmer,r.zh.stopWordFilter,r.zh.stemmer),i?this.tokenizer=r.zh.tokenizer:(r.tokenizer&&(r.tokenizer=r.zh.tokenizer),this.tokenizerFn&&(this.tokenizerFn=r.zh.tokenizer))},r.zh.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(e){return i?new r.Token(e.toLowerCase()):e.toLowerCase()});t&&e.load(t);var o=n.toString().trim().toLowerCase(),s=[];e.cut(o,!0).forEach(function(e){s=s.concat(e.split(" "))}),s=s.filter(function(e){return!!e});var u=0;return s.map(function(e,t){if(i){var n=o.indexOf(e,u),s={};return s.position=[n,e.length],s.index=t,u=n,new r.Token(e,s)}return e})},r.zh.wordCharacters="\\w一-龥",r.zh.trimmer=r.trimmerSupport.generateTrimmer(r.zh.wordCharacters),r.Pipeline.registerFunction(r.zh.trimmer,"trimmer-zh"),r.zh.stemmer=function(){return function(e){return e}}(),r.Pipeline.registerFunction(r.zh.stemmer,"stemmer-zh"),r.zh.stopWordFilter=r.generateStopWordFilter("的 一 不 在 人 有 是 为 為 以 于 於 上 他 而 后 後 之 来 來 及 了 因 下 可 到 由 这 這 与 與 也 此 但 并 並 个 個 其 已 无 無 小 我 们 們 起 最 再 今 去 好 只 又 或 很 亦 某 把 那 你 乃 它 吧 被 比 别 趁 当 當 从 從 得 打 凡 儿 兒 尔 爾 该 該 各 给 給 跟 和 何 还 還 即 几 幾 既 看 据 據 距 靠 啦 另 么 麽 每 嘛 拿 哪 您 凭 憑 且 却 卻 让 讓 仍 啥 如 若 使 谁 誰 虽 雖 随 隨 同 所 她 哇 嗡 往 些 向 沿 哟 喲 用 咱 则 則 怎 曾 至 致 着 著 诸 諸 自".split(" ")),r.Pipeline.registerFunction(r.zh.stopWordFilter,"stopWordFilter-zh")}}); -------------------------------------------------------------------------------- /site/assets/stylesheets/extra.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/assets/stylesheets/extra.css -------------------------------------------------------------------------------- /site/assets/stylesheets/palette.06af60db.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["src/templates/assets/stylesheets/palette/_scheme.scss","../../../../src/templates/assets/stylesheets/palette.scss","src/templates/assets/stylesheets/palette/_accent.scss","src/templates/assets/stylesheets/palette/_primary.scss","src/templates/assets/stylesheets/utilities/_break.scss"],"names":[],"mappings":"AA2BA,cAGE,6BAME,sDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CACA,mDAAA,CACA,6DAAA,CACA,+DAAA,CACA,gEAAA,CAGA,mDAAA,CACA,gDAAA,CAGA,0BAAA,CACA,mCAAA,CAGA,iCAAA,CACA,kCAAA,CACA,mCAAA,CACA,mCAAA,CACA,kCAAA,CACA,iCAAA,CACA,+CAAA,CACA,6DAAA,CACA,gEAAA,CACA,4DAAA,CACA,4DAAA,CACA,6DAAA,CAGA,6CAAA,CAGA,+CAAA,CAGA,uDAAA,CACA,6DAAA,CACA,2DAAA,CAGA,iCAAA,CAGA,yDAAA,CACA,iEAAA,CAGA,mDAAA,CACA,mDAAA,CAGA,qDAAA,CACA,uDAAA,CAGA,8DAAA,CAKA,8DAAA,CAKA,0DAAA,CAvEA,iBCeF,CD6DE,kHAEE,YC3DJ,CDkFE,yDACE,4BChFJ,CD+EE,2DACE,4BC7EJ,CD4EE,gEACE,4BC1EJ,CDyEE,2DACE,4BCvEJ,CDsEE,yDACE,4BCpEJ,CDmEE,0DACE,4BCjEJ,CDgEE,gEACE,4BC9DJ,CD6DE,0DACE,4BC3DJ,CD0DE,2OACE,4BC/CJ,CDsDA,+FAGE,iCCpDF,CACF,CC/CE,2BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCD2CN,CCrDE,4BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDkDN,CC5DE,8BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDyDN,CCnEE,mCACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDgEN,CC1EE,8BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDuEN,CCjFE,4BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCD8EN,CCxFE,kCACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDqFN,CC/FE,4BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCD4FN,CCtGE,4BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDmGN,CC7GE,6BACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCD0GN,CCpHE,mCACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDiHN,CC3HE,4BACE,4BAAA,CACA,2CAAA,CAIE,8BAAA,CACA,qCD2HN,CClIE,8BACE,4BAAA,CACA,2CAAA,CAIE,8BAAA,CACA,qCDkIN,CCzIE,6BACE,yBAAA,CACA,2CAAA,CAIE,8BAAA,CACA,qCDyIN,CChJE,8BACE,4BAAA,CACA,2CAAA,CAIE,8BAAA,CACA,qCDgJN,CCvJE,mCACE,4BAAA,CACA,2CAAA,CAOE,yBAAA,CACA,qCDoJN,CEzJE,4BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsJN,CEjKE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8JN,CEzKE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsKN,CEjLE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8KN,CEzLE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsLN,CEjME,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8LN,CEzME,mCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsMN,CEjNE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8MN,CEzNE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsNN,CEjOE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8NN,CEzOE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsON,CEjPE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,+BAAA,CACA,sCFiPN,CEzPE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,+BAAA,CACA,sCFyPN,CEjQE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,+BAAA,CACA,sCFiQN,CEzQE,+BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAIE,+BAAA,CACA,sCFyQN,CEjRE,oCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCF8QN,CEzRE,8BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCFsRN,CEjSE,6BACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCAAA,CAKA,4BF0RN,CE1SE,kCACE,6BAAA,CACA,oCAAA,CACA,mCAAA,CAOE,0BAAA,CACA,sCAAA,CAKA,4BFmSN,CEpRE,sEACE,4BFuRJ,CExRE,+DACE,4BF2RJ,CE5RE,iEACE,4BF+RJ,CEhSE,gEACE,4BFmSJ,CEpSE,iEACE,4BFuSJ,CE9RA,8BACE,mDAAA,CACA,4DAAA,CACA,0DAAA,CACA,oDAAA,CACA,2DAAA,CAGA,4BF+RF,CE5RE,yCACE,+BF8RJ,CE3RI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCF+RN,CG3MI,mCD1EA,+CACE,8CFwRJ,CErRI,qDACE,8CFuRN,CElRE,iEACE,mCFoRJ,CACF,CGtNI,sCDvDA,uCACE,oCFgRJ,CACF,CEvQA,8BACE,kDAAA,CACA,4DAAA,CACA,wDAAA,CACA,oDAAA,CACA,6DAAA,CAGA,4BFwQF,CErQE,yCACE,+BFuQJ,CEpQI,kDAEE,0CAAA,CACA,sCAAA,CAFA,mCFwQN,CEjQE,yCACE,6CFmQJ,CG5NI,0CDhCA,8CACE,gDF+PJ,CACF,CGjOI,0CDvBA,iFACE,6CF2PJ,CACF,CGzPI,sCDKA,uCACE,6CFuPJ,CACF","file":"palette.css"} -------------------------------------------------------------------------------- /site/sitemap.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mwolff44/pk-sbc/47e2f2d9d29806e9dcbe968ebfa5947b44b776e0/site/sitemap.xml.gz -------------------------------------------------------------------------------- /site/theme_overrides/404.html: -------------------------------------------------------------------------------- 1 | {% extends "main.html" %} 2 | 3 | 4 | {% block content %} 5 |
6 |
7 |

Ah, nuts!

8 |

We were unable to find the page you were looking for, but we'll get cracking on the problem.

9 |
10 | 11 |
12 | 13 | 14 | 15 | {% endblock %} -------------------------------------------------------------------------------- /site/theme_overrides/main.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block analytics %} 4 | 5 | 6 | 7 | {% endblock %} 8 | 9 | {% block announce %} 10 | 11 | 28 | For update follow 29 | 30 | 31 | {% include ".icons/fontawesome/brands/mailchimp.svg" %} 32 | 33 | PKS project 34 | 35 | 36 | {% endblock %} -------------------------------------------------------------------------------- /src/basic-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # PKS P-KISS-SBC 4 | # 5 | # Copyright: (c) 2007-2024 Mathias WOLFF (mathias@celea.org) 6 | # GNU Affero General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/agpl-3.0.txt) 7 | # SPDX-License-Identifier: AGPL-3.0-or-later 8 | 9 | # Append common folders to the PATH to ensure that all basic commands are available. 10 | export PATH+=':/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' 11 | 12 | # Variables 13 | readonly PKS_GIT_URL="https://raw.githubusercontent.com/mwolff44/pyfreebilling" 14 | readonly PKS_INSTALL_DIR="/srv/pks/scripts" 15 | readonly PKS_BIN_DIR="/usr/local/bin" 16 | readonly VERSION="v4.2.0" 17 | 18 | # Install the PKS script from repository 19 | installScript() { 20 | local str="Installing scripts from PKS sources" 21 | printf " %b %s..." "${INFO}" "${str}" 22 | 23 | # DEPENDENCIES 24 | apt install -y curl 25 | 26 | install -d ${PKS_INSTALL_DIR} 27 | curl -fsSL -o ${PKS_INSTALL_DIR}/pks "$PKS_GIT_URL/$VERSION/src/pks" 28 | chmod +x ${PKS_INSTALL_DIR}/pks 29 | ln -sf ${PKS_INSTALL_DIR}/pks ${PKS_BIN_DIR}/pks 30 | } 31 | 32 | # Launch the PKS script 33 | launchScript() { 34 | local str="Launching PKS script" 35 | printf " %b %s..." "${INFO}" "${str}" 36 | pks install 37 | } 38 | 39 | ###### MAIN ##### 40 | 41 | 42 | read -p "Do you want to execute the script ? [y/N]" -n 1 -r 4 | 5 | ENV REFRESHED_AT 2023-04-29 6 | ENV VERSION 1.0.1 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | ENV DIST="bullseye" 11 | ENV REL="56" 12 | 13 | ENV KAMAILIO_LOG_LEVEL info 14 | 15 | # avoid httpredir errors 16 | RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list 17 | 18 | RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get install --assume-yes gnupg wget iproute2 19 | 20 | # kamailio repo 21 | RUN echo "deb http://deb.kamailio.org/kamailio$REL $DIST main" > /etc/apt/sources.list.d/kamailio.list 22 | RUN wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add - 23 | 24 | RUN apt-get update && apt-get install --assume-yes \ 25 | libhiredis0.14 \ 26 | kamailio \ 27 | kamailio-extra-modules \ 28 | kamailio-json-modules \ 29 | kamailio-utils-modules \ 30 | kamailio-redis-modules \ 31 | kamailio-xml-modules 32 | 33 | # clean 34 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* 35 | 36 | COPY ./kamailio.cfg /etc/kamailio/kamailio.cfg 37 | COPY ./bootstrap.sh /etc/kamailio/bootstrap.sh 38 | RUN chmod a+x /etc/kamailio/bootstrap.sh 39 | 40 | ENTRYPOINT ["/etc/kamailio/bootstrap.sh"] 41 | CMD ["kamailio"] 42 | 43 | HEALTHCHECK CMD curl --fail http://localhost:8080/ping || exit 1 44 | -------------------------------------------------------------------------------- /src/sip/Dockerfile.mysql: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | MAINTAINER Mathias WOLFF 4 | 5 | ENV REFRESHED_AT 2023-04-29 6 | ENV VERSION 1.0.1 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | ENV DIST="bullseye" 11 | ENV REL="56" 12 | 13 | ENV KAMAILIO_LOG_LEVEL info 14 | 15 | # avoid httpredir errors 16 | RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list 17 | 18 | RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get install --assume-yes gnupg wget iproute2 19 | 20 | # kamailio repo 21 | RUN echo "deb http://deb.kamailio.org/kamailio$REL $DIST main" > /etc/apt/sources.list.d/kamailio.list 22 | RUN wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add - 23 | 24 | RUN apt-get update && apt-get install --assume-yes \ 25 | libhiredis0.14 \ 26 | virtual-mysql-client \ 27 | kamailio \ 28 | kamailio-extra-modules \ 29 | kamailio-json-modules \ 30 | kamailio-utils-modules \ 31 | kamailio-redis-modules \ 32 | kamailio-xml-modules \ 33 | kamailio kamailio-mysql-modules 34 | 35 | # clean 36 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* 37 | 38 | COPY ./kamailio.cfg /etc/kamailio/kamailio.cfg 39 | COPY ./bootstrap.sh /etc/kamailio/bootstrap.sh 40 | RUN chmod a+x /etc/kamailio/bootstrap.sh 41 | 42 | ENTRYPOINT ["/etc/kamailio/bootstrap.sh"] 43 | CMD ["kamailio"] 44 | 45 | HEALTHCHECK CMD curl --fail http://localhost:8080/ping || exit 1 46 | -------------------------------------------------------------------------------- /src/sip/Dockerfile.sqlite3: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | MAINTAINER Mathias WOLFF 4 | 5 | ENV REFRESHED_AT 2023-04-29 6 | ENV VERSION 1.0.1 7 | 8 | ENV DEBIAN_FRONTEND noninteractive 9 | 10 | ENV DIST="bullseye" 11 | ENV REL="56" 12 | 13 | ENV KAMAILIO_LOG_LEVEL info 14 | 15 | # avoid httpredir errors 16 | RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list 17 | 18 | RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get install --assume-yes gnupg wget iproute2 19 | 20 | # kamailio repo 21 | RUN echo "deb http://deb.kamailio.org/kamailio$REL $DIST main" > /etc/apt/sources.list.d/kamailio.list 22 | RUN wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add - 23 | 24 | RUN apt-get update && apt-get install --assume-yes \ 25 | libhiredis0.14 \ 26 | libsqlite3-0 \ 27 | sqlite3 \ 28 | kamailio \ 29 | kamailio-extra-modules \ 30 | kamailio-json-modules \ 31 | kamailio-utils-modules \ 32 | kamailio-redis-modules \ 33 | kamailio-xml-modules \ 34 | kamailio-sqlite-modules 35 | 36 | # clean 37 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* 38 | 39 | COPY ./kamailio.cfg /etc/kamailio/kamailio.cfg 40 | COPY ./bootstrap.sh /etc/kamailio/bootstrap.sh 41 | RUN chmod a+x /etc/kamailio/bootstrap.sh 42 | 43 | ENTRYPOINT ["/etc/kamailio/bootstrap.sh"] 44 | CMD ["kamailio"] 45 | 46 | HEALTHCHECK CMD curl --fail http://localhost:8080/ping || exit 1 47 | -------------------------------------------------------------------------------- /src/sip/Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | MAINTAINER Mathias WOLFF 4 | 5 | # Important! Update this no-op ENV variable when this Dockerfile 6 | # is updated with the current date. It will force refresh of all 7 | # of the base images and things like 'apt-get update' won't be using 8 | # old cached versions when the Dockerfile is built. 9 | ENV REFRESHED_AT 2023-04-29 10 | ENV VERSION 1.0.1 11 | 12 | # avoid httpredir errors 13 | RUN sed -i 's/httpredir/deb/g' /etc/apt/sources.list 14 | 15 | RUN rm -rf /var/lib/apt/lists/* && apt-get update && apt-get install --assume-yes gnupg wget 16 | 17 | # kamailio repo 18 | RUN echo "deb http://deb.kamailio.org/kamailio56 bullseye main" > /etc/apt/sources.list.d/kamailio.list 19 | RUN wget -O- http://deb.kamailio.org/kamailiodebkey.gpg | apt-key add - 20 | 21 | RUN apt-get update && apt-get install --assume-yes \ 22 | libhiredis0.14 \ 23 | kamailio \ 24 | kamailio-extra-modules \ 25 | kamailio-json-modules \ 26 | kamailio-utils-modules \ 27 | kamailio-redis-modules \ 28 | kamailio-xml-modules 29 | 30 | # clean 31 | RUN apt-get clean && rm -rf /var/lib/apt/lists/* 32 | 33 | # Add config file 34 | VOLUME /etc/kamailio 35 | ADD ./kamailio.cfg /etc/kamailio/kamailio.cfg 36 | 37 | CMD ["/usr/sbin/kamailio", "-c", "/etc/kamailio/kamailio.cfg"] 38 | -------------------------------------------------------------------------------- /src/sip/Makefile: -------------------------------------------------------------------------------- 1 | # Copyright: (c) 2007-2024 (see the AUTHORS file) 2 | # GNU Affero General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/agpl-3.0.txt) 3 | # SPDX-License-Identifier: AGPL-3.0-or-later 4 | 5 | include .envrc 6 | 7 | # ==================================================================================== # 8 | # HELPERS 9 | # ==================================================================================== # 10 | 11 | ## help: print this help message 12 | .PHONY: help 13 | help: 14 | @echo 'Usage:' 15 | @sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /' 16 | 17 | .PHONY: confirm 18 | confirm: 19 | @echo -n 'Are you sure? [y/N] ' && read ans && [ $${ans:-N} = y ] 20 | 21 | # ==================================================================================== # 22 | # DEVELOPMENT 23 | # ==================================================================================== # 24 | 25 | DOCKER_COMPOSE := docker compose -f docker-compose.yml --env-file /srv/pks/.env 26 | 27 | ## check/proxy: check the kamailio file 28 | .PHONY: check/proxy 29 | check/proxy: 30 | docker build -f Dockerfile.test -t pks-proxy-test . 31 | docker run --name pks-proxy-test pks-proxy-test 32 | docker rm pks-proxy-test 33 | 34 | ## build/proxy-mysql: build the MySQL kamailio image 35 | .PHONY: build/proxy-mysql 36 | build/proxy-mysql: 37 | docker build -f Dockerfile.mysql -t pks-proxy-mysql . 38 | docker run --name pks-proxy-mysql pks-proxy-mysql 39 | docker rm pks-proxy-mysql 40 | 41 | ## check/removecontainer: remove the remaining container used for checking the kamailio file 42 | .PHONY: check/removecontainer 43 | check/removecontainer: 44 | docker rm pks-proxy-test 45 | 46 | ## build/proxy: build the proxy application 47 | .PHONY: build/proxy 48 | build/proxy: 49 | @$(DOCKER_COMPOSE) build 50 | 51 | ## run/proxy: run the proxy application 52 | .PHONY: run/proxy 53 | run/proxy: 54 | @$(DOCKER_COMPOSE) up -d 55 | 56 | ## stop/proxy: stop the proxy application 57 | .PHONY: stop/proxy 58 | stop/proxy: 59 | @$(DOCKER_COMPOSE) down 60 | 61 | ## restart/proxy: restart the proxy application 62 | .PHONY: restart/proxy 63 | restart/proxy: 64 | @$(DOCKER_COMPOSE) stop 65 | @$(DOCKER_COMPOSE) up -d 66 | 67 | ## run/sipproxy: run the sip proxy 68 | .PHONY: run/sipproxy 69 | run/sipproxy: 70 | @$(DOCKER_COMPOSE) up -d pks-sip 71 | 72 | ## stop/sipproxy: stop the sip proxy 73 | .PHONY: stop/sipproxy 74 | stop/sipproxy: 75 | @$(DOCKER_COMPOSE) stop pks-sip 76 | 77 | ## logs/proxy: view logs of the proxy application 78 | .PHONY: logs/proxy 79 | logs/proxy: 80 | @$(DOCKER_COMPOSE) logs --tail=100 -f 81 | 82 | ## ps/proxy: view processes of the proxy application 83 | .PHONY: ps/proxy 84 | ps/proxy: 85 | @$(DOCKER_COMPOSE) ps 86 | 87 | # ==================================================================================== # 88 | # PRODUCTION 89 | # ==================================================================================== # 90 | -------------------------------------------------------------------------------- /src/sip/api_tests.md: -------------------------------------------------------------------------------- 1 | # API Requests 2 | 3 | ## SIP proxy status 4 | 5 | ```bash 6 | # curl -I "http://localhost:8064/status" 7 | 8 | HTTP/1.1 200 OK 9 | Sia: SIP/2.0/TCP 127.0.0.1:55960 10 | Content-Type: text/plain 11 | Server: kamailio (5.7.4 (x86_64/linux)) 12 | Content-Length: 0 13 | ``` 14 | 15 | ## Reload dispatcher 16 | 17 | ```bash 18 | # curl -X POST "http://localhost:8064/rpc" -d '{"jsonrpc": "2.0", "method": "dispatcher.reload", "id": 1}' 19 | 20 | { 21 | "jsonrpc": "2.0", 22 | "result": "Ok. Dispatcher successfully reloaded.", 23 | "id": 1 24 | } 25 | ``` 26 | 27 | ## Reload dialplan 28 | 29 | ```bash 30 | # curl -X POST "http://localhost:8064/rpc" -d '{"jsonrpc": "2.0", "method": "dialplan.reload", "id": 1}' 31 | 32 | { 33 | "jsonrpc": "2.0", 34 | "result": { 35 | }, 36 | "id": 1 37 | } 38 | ``` 39 | 40 | ## Reload permissions 41 | 42 | ```bash 43 | # curl -X POST "http://localhost:8064/rpc" -d '{"jsonrpc": "2.0", "method": "permissions.addressReload", "id": 1}' 44 | 45 | { 46 | "jsonrpc": "2.0", 47 | "result": "Reload OK", 48 | "id": 1 49 | } 50 | ``` 51 | 52 | ## Reload tenant table 53 | 54 | ```bash 55 | # curl -X POST "http://localhost:8064/rpc" -d '{"jsonrpc": "2.0", "method": "htable.reload", "params": "tenantmap", "id": 1}' 56 | 57 | { 58 | "jsonrpc": "2.0", 59 | "result": { 60 | }, 61 | "id": 1 62 | } 63 | ``` 64 | -------------------------------------------------------------------------------- /src/sip/cron/pks: -------------------------------------------------------------------------------- 1 | PATH=/usr/sbin 2 | 3 | * 07 * * * root /usr/src/pyfreebilling/src/pks reload >> /var/log/cron.log 4 | 5 | -------------------------------------------------------------------------------- /src/sip/db/acc: -------------------------------------------------------------------------------- 1 | id(int,auto) method(string) from_tag(string) to_tag(string) callid(string) sip_code(string) sip_reason(string) time(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/acc_cdrs: -------------------------------------------------------------------------------- 1 | id(int,auto) start_time(int) end_time(int) duration(double) 2 | -------------------------------------------------------------------------------- /src/sip/db/address: -------------------------------------------------------------------------------- 1 | id(int,auto) grp(int) ip_addr(string) mask(int) port(int) tag(string,null) 2 | -------------------------------------------------------------------------------- /src/sip/db/dialog: -------------------------------------------------------------------------------- 1 | id(int,auto) hash_entry(int) hash_id(int) callid(string) from_uri(string) from_tag(string) to_uri(string) to_tag(string) caller_cseq(string) callee_cseq(string) caller_route_set(string,null) callee_route_set(string,null) caller_contact(string) callee_contact(string) caller_sock(string) callee_sock(string) state(int) start_time(int) timeout(int) sflags(int) iflags(int) toroute_name(string,null) req_uri(string) xdata(string,null) 2 | -------------------------------------------------------------------------------- /src/sip/db/dialog_vars: -------------------------------------------------------------------------------- 1 | id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string) 2 | -------------------------------------------------------------------------------- /src/sip/db/dialplan: -------------------------------------------------------------------------------- 1 | id(int,auto) dpid(int) pr(int) match_op(int) match_exp(string) match_len(int) subst_exp(string) repl_exp(string) attrs(string) 2 | -------------------------------------------------------------------------------- /src/sip/db/dispatcher: -------------------------------------------------------------------------------- 1 | id(int,auto) setid(int) destination(string) flags(int) priority(int) attrs(string) description(string) 2 | -------------------------------------------------------------------------------- /src/sip/db/domain: -------------------------------------------------------------------------------- 1 | id(int,auto) domain(string) did(string,null) last_modified(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/domain_attrs: -------------------------------------------------------------------------------- 1 | id(int,auto) did(string) name(string) type(int) value(string) last_modified(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/htable: -------------------------------------------------------------------------------- 1 | id(int,auto) key_name(string) key_type(int) value_type(int) key_value(string) expires(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/mysql/init.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `version` ( 2 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 3 | `table_name` VARCHAR(32) NOT NULL, 4 | `table_version` INT UNSIGNED DEFAULT 0 NOT NULL, 5 | CONSTRAINT table_name_idx UNIQUE (`table_name`) 6 | ); 7 | 8 | INSERT INTO version (table_name, table_version) values ('version','1'); 9 | 10 | CREATE TABLE IF NOT EXISTS `dialplan` ( 11 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 12 | `dpid` INT(11) NOT NULL, 13 | `pr` INT(11) NOT NULL, 14 | `match_op` INT(11) NOT NULL, 15 | `match_exp` VARCHAR(64) NOT NULL, 16 | `match_len` INT(11) NOT NULL, 17 | `subst_exp` VARCHAR(64) NOT NULL, 18 | `repl_exp` VARCHAR(256) NOT NULL, 19 | `attrs` VARCHAR(64) NOT NULL 20 | ); 21 | 22 | INSERT INTO version (table_name, table_version) values ('dialplan','2'); 23 | 24 | CREATE TABLE IF NOT EXISTS `dispatcher` ( 25 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 26 | `setid` INT DEFAULT 0 NOT NULL, 27 | `destination` VARCHAR(192) DEFAULT '' NOT NULL, 28 | `flags` INT DEFAULT 0 NOT NULL, 29 | `priority` INT DEFAULT 0 NOT NULL, 30 | `attrs` VARCHAR(128) DEFAULT '' NOT NULL, 31 | `description` VARCHAR(64) DEFAULT '' NOT NULL 32 | ); 33 | 34 | INSERT INTO version (table_name, table_version) values ('dispatcher','4'); 35 | 36 | CREATE TABLE IF NOT EXISTS `domain` ( 37 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 38 | `domain` VARCHAR(64) NOT NULL, 39 | `did` VARCHAR(64) DEFAULT NULL, 40 | `last_modified` DATETIME DEFAULT '2000-01-01 00:00:01' NOT NULL, 41 | CONSTRAINT domain_idx UNIQUE (`domain`) 42 | ); 43 | 44 | INSERT INTO version (table_name, table_version) values ('domain','2'); 45 | 46 | CREATE TABLE IF NOT EXISTS `domain_attrs` ( 47 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 48 | `did` VARCHAR(64) NOT NULL, 49 | `name` VARCHAR(32) NOT NULL, 50 | `type` INT UNSIGNED NOT NULL, 51 | `value` VARCHAR(255) NOT NULL, 52 | `last_modified` DATETIME DEFAULT '2000-01-01 00:00:01' NOT NULL 53 | ); 54 | 55 | CREATE INDEX domain_attrs_idx ON domain_attrs (`did`, `name`); 56 | 57 | INSERT INTO version (table_name, table_version) values ('domain_attrs','1'); 58 | 59 | CREATE TABLE IF NOT EXISTS `htable` ( 60 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 61 | `key_name` VARCHAR(64) DEFAULT '' NOT NULL, 62 | `key_type` INT DEFAULT 0 NOT NULL, 63 | `value_type` INT DEFAULT 0 NOT NULL, 64 | `key_value` VARCHAR(128) DEFAULT '' NOT NULL, 65 | `expires` INT DEFAULT 0 NOT NULL 66 | ); 67 | 68 | INSERT INTO version (table_name, table_version) values ('htable','2'); 69 | 70 | CREATE TABLE IF NOT EXISTS `tenant` ( 71 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 72 | `key_name` VARCHAR(64) DEFAULT '' NOT NULL, 73 | `key_type` INT DEFAULT 0 NOT NULL, 74 | `value_type` INT DEFAULT 0 NOT NULL, 75 | `key_value` VARCHAR(128) DEFAULT '' NOT NULL, 76 | `expires` INT DEFAULT 0 NOT NULL 77 | ); 78 | 79 | INSERT INTO version (table_name, table_version) values ('tenant','1'); 80 | 81 | CREATE TABLE IF NOT EXISTS `trusted` ( 82 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 83 | `src_ip` VARCHAR(50) NOT NULL, 84 | `proto` VARCHAR(4) NOT NULL, 85 | `from_pattern` VARCHAR(64) DEFAULT NULL, 86 | `ruri_pattern` VARCHAR(64) DEFAULT NULL, 87 | `tag` VARCHAR(64), 88 | `priority` INT DEFAULT 0 NOT NULL 89 | ); 90 | 91 | CREATE INDEX peer_idx ON trusted (`src_ip`); 92 | 93 | INSERT INTO version (table_name, table_version) values ('trusted','6'); 94 | 95 | CREATE TABLE IF NOT EXISTS `address` ( 96 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 97 | `grp` INT(11) UNSIGNED DEFAULT 1 NOT NULL, 98 | `ip_addr` VARCHAR(50) NOT NULL, 99 | `mask` INT DEFAULT 32 NOT NULL, 100 | `port` SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL, 101 | `tag` VARCHAR(64) 102 | ); 103 | 104 | INSERT INTO version (table_name, table_version) values ('address','6'); 105 | 106 | CREATE TABLE IF NOT EXISTS `rtpengine` ( 107 | `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, 108 | `setid` INT(10) UNSIGNED DEFAULT 0 NOT NULL, 109 | `url` VARCHAR(64) NOT NULL, 110 | `weight` INT(10) UNSIGNED DEFAULT 1 NOT NULL, 111 | `disabled` INT(1) DEFAULT 0 NOT NULL, 112 | `stamp` DATETIME DEFAULT '1900-01-01 00:00:01' NOT NULL, 113 | CONSTRAINT rtpengine_nodes UNIQUE (`setid`, `url`) 114 | ); 115 | 116 | INSERT INTO version (table_name, table_version) values ('rtpengine','1'); 117 | -------------------------------------------------------------------------------- /src/sip/db/postgresql/init.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS version ( 2 | id SERIAL PRIMARY KEY NOT NULL, 3 | table_name VARCHAR(32) NOT NULL, 4 | table_version INTEGER DEFAULT 0 NOT NULL, 5 | CONSTRAINT version_table_name_idx UNIQUE (table_name) 6 | ); 7 | 8 | INSERT INTO version (table_name, table_version) values ('version','1'); 9 | 10 | CREATE TABLE IF NOT EXISTS dialplan ( 11 | id SERIAL PRIMARY KEY NOT NULL, 12 | dpid INTEGER NOT NULL, 13 | pr INTEGER NOT NULL, 14 | match_op INTEGER NOT NULL, 15 | match_exp VARCHAR(64) NOT NULL, 16 | match_len INTEGER NOT NULL, 17 | subst_exp VARCHAR(64) NOT NULL, 18 | repl_exp VARCHAR(256) NOT NULL, 19 | attrs VARCHAR(64) NOT NULL 20 | ); 21 | 22 | INSERT INTO version (table_name, table_version) values ('dialplan','2'); 23 | 24 | CREATE TABLE IF NOT EXISTS dispatcher ( 25 | id SERIAL PRIMARY KEY NOT NULL, 26 | setid INTEGER DEFAULT 0 NOT NULL, 27 | destination VARCHAR(192) DEFAULT '' NOT NULL, 28 | flags INTEGER DEFAULT 0 NOT NULL, 29 | priority INTEGER DEFAULT 0 NOT NULL, 30 | attrs VARCHAR(128) DEFAULT '' NOT NULL, 31 | description VARCHAR(64) DEFAULT '' NOT NULL 32 | ); 33 | 34 | INSERT INTO version (table_name, table_version) values ('dispatcher','4'); 35 | 36 | CREATE TABLE IF NOT EXISTS domain ( 37 | id SERIAL PRIMARY KEY NOT NULL, 38 | domain VARCHAR(64) NOT NULL, 39 | did VARCHAR(64) DEFAULT NULL, 40 | last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, 41 | CONSTRAINT domain_domain_idx UNIQUE (domain) 42 | ); 43 | 44 | INSERT INTO version (table_name, table_version) values ('domain','2'); 45 | 46 | CREATE TABLE IF NOT EXISTS domain_attrs ( 47 | id SERIAL PRIMARY KEY NOT NULL, 48 | did VARCHAR(64) NOT NULL, 49 | name VARCHAR(32) NOT NULL, 50 | type INTEGER NOT NULL, 51 | value VARCHAR(255) NOT NULL, 52 | last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL 53 | ); 54 | 55 | CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name); 56 | 57 | INSERT INTO version (table_name, table_version) values ('domain_attrs','1'); 58 | 59 | CREATE TABLE IF NOT EXISTS htable ( 60 | id SERIAL PRIMARY KEY NOT NULL, 61 | key_name VARCHAR(64) DEFAULT '' NOT NULL, 62 | key_type INTEGER DEFAULT 0 NOT NULL, 63 | value_type INTEGER DEFAULT 0 NOT NULL, 64 | key_value VARCHAR(128) DEFAULT '' NOT NULL, 65 | expires INTEGER DEFAULT 0 NOT NULL 66 | ); 67 | 68 | INSERT INTO version (table_name, table_version) values ('htable','2'); 69 | 70 | CREATE TABLE IF NOT EXISTS tenant ( 71 | id SERIAL PRIMARY KEY NOT NULL, 72 | key_name VARCHAR(64) DEFAULT '' NOT NULL, 73 | key_type INTEGER DEFAULT 0 NOT NULL, 74 | value_type INTEGER DEFAULT 0 NOT NULL, 75 | key_value VARCHAR(128) DEFAULT '' NOT NULL, 76 | expires INTEGER DEFAULT 0 NOT NULL 77 | ); 78 | 79 | INSERT INTO version (table_name, table_version) values ('tenant','1'); 80 | 81 | CREATE TABLE IF NOT EXISTS trusted ( 82 | id SERIAL PRIMARY KEY NOT NULL, 83 | src_ip VARCHAR(50) NOT NULL, 84 | proto VARCHAR(4) NOT NULL, 85 | from_pattern VARCHAR(64) DEFAULT NULL, 86 | ruri_pattern VARCHAR(64) DEFAULT NULL, 87 | tag VARCHAR(64), 88 | priority INTEGER DEFAULT 0 NOT NULL 89 | ); 90 | 91 | CREATE INDEX trusted_peer_idx ON trusted (src_ip); 92 | 93 | INSERT INTO version (table_name, table_version) values ('trusted','6'); 94 | 95 | CREATE TABLE IF NOT EXISTS address ( 96 | id SERIAL PRIMARY KEY NOT NULL, 97 | grp INTEGER DEFAULT 1 NOT NULL, 98 | ip_addr VARCHAR(50) NOT NULL, 99 | mask INTEGER DEFAULT 32 NOT NULL, 100 | port SMALLINT DEFAULT 0 NOT NULL, 101 | tag VARCHAR(64) 102 | ); 103 | 104 | INSERT INTO version (table_name, table_version) values ('address','6'); 105 | 106 | CREATE TABLE IF NOT EXISTS rtpengine ( 107 | id SERIAL PRIMARY KEY NOT NULL, 108 | setid INTEGER DEFAULT 0 NOT NULL, 109 | url VARCHAR(64) NOT NULL, 110 | weight INTEGER DEFAULT 1 NOT NULL, 111 | disabled INTEGER DEFAULT 0 NOT NULL, 112 | stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL, 113 | CONSTRAINT rtpengine_rtpengine_nodes UNIQUE (setid, url) 114 | ); 115 | 116 | INSERT INTO version (table_name, table_version) values ('rtpengine','1'); 117 | 118 | -------------------------------------------------------------------------------- /src/sip/db/rtpengine: -------------------------------------------------------------------------------- 1 | id(int,auto) setid(int) url(string) weight(int) disabled(int) stamp(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/sqlite/init.sql: -------------------------------------------------------------------------------- 1 | BEGIN TRANSACTION; 2 | 3 | CREATE TABLE IF NOT EXISTS version ( 4 | id INTEGER PRIMARY KEY NOT NULL, 5 | table_name VARCHAR(32) NOT NULL, 6 | table_version INTEGER DEFAULT 0 NOT NULL, 7 | CONSTRAINT version_table_name_idx UNIQUE (table_name) 8 | ); 9 | 10 | INSERT INTO version (table_name, table_version) values ('version','1'); 11 | 12 | CREATE TABLE IF NOT EXISTS dialplan ( 13 | id INTEGER PRIMARY KEY NOT NULL, 14 | dpid INTEGER NOT NULL, 15 | pr INTEGER NOT NULL, 16 | match_op INTEGER NOT NULL, 17 | match_exp VARCHAR(64) NOT NULL, 18 | match_len INTEGER NOT NULL, 19 | subst_exp VARCHAR(64) NOT NULL, 20 | repl_exp VARCHAR(256) NOT NULL, 21 | attrs VARCHAR(64) NOT NULL 22 | ); 23 | 24 | INSERT INTO version (table_name, table_version) values ('dialplan','2'); 25 | 26 | CREATE TABLE IF NOT EXISTS dispatcher ( 27 | id INTEGER PRIMARY KEY NOT NULL, 28 | setid INTEGER DEFAULT 0 NOT NULL, 29 | destination VARCHAR(192) DEFAULT '' NOT NULL, 30 | flags INTEGER DEFAULT 0 NOT NULL, 31 | priority INTEGER DEFAULT 0 NOT NULL, 32 | attrs VARCHAR(128) DEFAULT '' NOT NULL, 33 | description VARCHAR(64) DEFAULT '' NOT NULL 34 | ); 35 | 36 | INSERT INTO version (table_name, table_version) values ('dispatcher','4'); 37 | 38 | CREATE TABLE IF NOT EXISTS domain ( 39 | id INTEGER PRIMARY KEY NOT NULL, 40 | domain VARCHAR(64) NOT NULL, 41 | did VARCHAR(64) DEFAULT NULL, 42 | last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL, 43 | CONSTRAINT domain_domain_idx UNIQUE (domain) 44 | ); 45 | 46 | INSERT INTO version (table_name, table_version) values ('domain','2'); 47 | 48 | CREATE TABLE IF NOT EXISTS domain_attrs ( 49 | id INTEGER PRIMARY KEY NOT NULL, 50 | did VARCHAR(64) NOT NULL, 51 | name VARCHAR(32) NOT NULL, 52 | type INTEGER NOT NULL, 53 | value VARCHAR(255) NOT NULL, 54 | last_modified TIMESTAMP WITHOUT TIME ZONE DEFAULT '2000-01-01 00:00:01' NOT NULL 55 | ); 56 | 57 | CREATE INDEX domain_attrs_domain_attrs_idx ON domain_attrs (did, name); 58 | 59 | INSERT INTO version (table_name, table_version) values ('domain_attrs','1'); 60 | 61 | CREATE TABLE IF NOT EXISTS htable ( 62 | id INTEGER PRIMARY KEY NOT NULL, 63 | key_name VARCHAR(64) DEFAULT '' NOT NULL, 64 | key_type INTEGER DEFAULT 0 NOT NULL, 65 | value_type INTEGER DEFAULT 0 NOT NULL, 66 | key_value VARCHAR(128) DEFAULT '' NOT NULL, 67 | expires INTEGER DEFAULT 0 NOT NULL 68 | ); 69 | 70 | INSERT INTO version (table_name, table_version) values ('htable','2'); 71 | 72 | CREATE TABLE IF NOT EXISTS tenant ( 73 | id INTEGER PRIMARY KEY NOT NULL, 74 | key_name VARCHAR(64) DEFAULT '' NOT NULL, 75 | key_type INTEGER DEFAULT 0 NOT NULL, 76 | value_type INTEGER DEFAULT 0 NOT NULL, 77 | key_value VARCHAR(128) DEFAULT '' NOT NULL, 78 | expires INTEGER DEFAULT 0 NOT NULL 79 | ); 80 | 81 | INSERT INTO version (table_name, table_version) values ('tenant','1'); 82 | 83 | CREATE TABLE IF NOT EXISTS trusted ( 84 | id INTEGER PRIMARY KEY NOT NULL, 85 | src_ip VARCHAR(50) NOT NULL, 86 | proto VARCHAR(4) NOT NULL, 87 | from_pattern VARCHAR(64) DEFAULT NULL, 88 | ruri_pattern VARCHAR(64) DEFAULT NULL, 89 | tag VARCHAR(64), 90 | priority INTEGER DEFAULT 0 NOT NULL 91 | ); 92 | 93 | CREATE INDEX trusted_peer_idx ON trusted (src_ip); 94 | 95 | INSERT INTO version (table_name, table_version) values ('trusted','6'); 96 | 97 | CREATE TABLE IF NOT EXISTS address ( 98 | id INTEGER PRIMARY KEY NOT NULL, 99 | grp INTEGER DEFAULT 1 NOT NULL, 100 | ip_addr VARCHAR(50) NOT NULL, 101 | mask INTEGER DEFAULT 32 NOT NULL, 102 | port SMALLINT DEFAULT 0 NOT NULL, 103 | tag VARCHAR(64) 104 | ); 105 | 106 | INSERT INTO version (table_name, table_version) values ('address','6'); 107 | 108 | CREATE TABLE IF NOT EXISTS rtpengine ( 109 | id INTEGER PRIMARY KEY NOT NULL, 110 | setid INTEGER DEFAULT 0 NOT NULL, 111 | url VARCHAR(64) NOT NULL, 112 | weight INTEGER DEFAULT 1 NOT NULL, 113 | disabled INTEGER DEFAULT 0 NOT NULL, 114 | stamp TIMESTAMP WITHOUT TIME ZONE DEFAULT '1900-01-01 00:00:01' NOT NULL, 115 | CONSTRAINT rtpengine_rtpengine_nodes UNIQUE (setid, url) 116 | ); 117 | 118 | INSERT INTO version (table_name, table_version) values ('rtpengine','1'); 119 | 120 | COMMIT; -------------------------------------------------------------------------------- /src/sip/db/tenant: -------------------------------------------------------------------------------- 1 | id(int,auto) key_name(string) key_type(int) value_type(int) key_value(string) expires(int) 2 | -------------------------------------------------------------------------------- /src/sip/db/version: -------------------------------------------------------------------------------- 1 | table_name(string) table_version(int) 2 | version|1| 3 | acc|5| 4 | acc_cdrs|2| 5 | address|6| 6 | dialog|7| 7 | dialog_vars|1| 8 | dialplan|2| 9 | dispatcher|4| 10 | domain|2| 11 | domain_attrs|1| 12 | htable|2| 13 | rtpengine|1| 14 | tenant|1| 15 | -------------------------------------------------------------------------------- /src/sip/docker-compose.fs.yml: -------------------------------------------------------------------------------- 1 | services: 2 | pks-fs-1: 3 | container_name: pks-fs-1 4 | hostname: fs1.pks.local 5 | build: 6 | context: ./tests/freeswitch 7 | dockerfile: Dockerfile 8 | restart: unless-stopped 9 | logging: 10 | options: 11 | max-size: 50m 12 | volumes: 13 | - ./tests/freeswitch/conf:/usr/local/freeswitch/conf:ro 14 | networks: 15 | main: 16 | aliases: 17 | - pks-fs-1 -------------------------------------------------------------------------------- /src/sip/docker-compose.mysql.yml: -------------------------------------------------------------------------------- 1 | pks-sip: 2 | depends_on: 3 | - pks-redis 4 | - pks-rtp 5 | - pks-fs-1 6 | - pks_mysql 7 | environment: 8 | - DB_URL: mysql://root:mypass@pks-mysql/pks 9 | 10 | pks-mysql: 11 | container_name: pks-mysql 12 | hostname: mysql.pks.local 13 | image: image: mysql:7.0 14 | cap_add: 15 | - SYS_NICE 16 | restart: unless-stopped 17 | volumes: 18 | - pks-mysql-data:/var/lib/mysql 19 | - ./db/mysql/init.sql:/docker-entrypoint-initdb.d/init.sql 20 | environment: 21 | MYSQL_ROOT_PASSWORD: mypass 22 | MYSQL_DATABASE: pks 23 | networks: 24 | main: 25 | aliases: 26 | - pks-mysql 27 | 28 | volumes: 29 | pks-mysql-data: -------------------------------------------------------------------------------- /src/sip/docker-compose.postgres.yml: -------------------------------------------------------------------------------- 1 | pks-sip: 2 | depends_on: 3 | - pks-redis 4 | - pks-rtp 5 | - pks-fs-1 6 | - pks_pgsql 7 | environment: 8 | - DB_URL: postgres://postgres:mypass@pks-postgres/pks 9 | 10 | pks-pgsql: 11 | container_name: pks-postgres 12 | hostname: postgres.pks.local 13 | image: image: postgres 14 | restart: unless-stopped 15 | volumes: 16 | - pks-pgsql-data:/var/lib/postgresql/data 17 | - ./db/postgresql/init.sql:/docker-entrypoint-initdb.d/init.sql 18 | environment: 19 | - POSTGRES_USER=postgres 20 | - POSTGRES_PASSWORD=mypass 21 | networks: 22 | main: 23 | aliases: 24 | - pks-postgres 25 | 26 | volumes: 27 | pks-pgsql-data: -------------------------------------------------------------------------------- /src/sip/docker-compose.test.yml: -------------------------------------------------------------------------------- 1 | services: 2 | pks-sip: 3 | build: 4 | context: . 5 | dockerfile: Dockerfile 6 | volumes: 7 | #- ./kamailio.cfg:/etc/kamailio/kamailio.cfg 8 | - ./tests/db-test:/etc/kamailio/db:ro 9 | depends_on: 10 | - pks-redis 11 | - pks-rtp 12 | - pks-fs-1 13 | 14 | pks-fs-1: 15 | container_name: pks-fs-1 16 | hostname: fs1.pks.local 17 | build: 18 | context: ./tests/freeswitch 19 | dockerfile: Dockerfile 20 | restart: unless-stopped 21 | logging: 22 | options: 23 | max-size: 50m 24 | volumes: 25 | - ./tests/freeswitch/conf:/usr/local/freeswitch/conf:ro 26 | networks: 27 | main: 28 | aliases: 29 | - pks-fs-1 -------------------------------------------------------------------------------- /src/sip/template.kamailio-local.cfg: -------------------------------------------------------------------------------- 1 | ##!define WITH_TLS 2 | ##!define WITH_DEBUG 3 | ##!define WITH_BLOCK3XX 4 | ##!define WITH_BLOCK401407 5 | #!define WITH_ANTIFLOOD 6 | 7 | # REDIS_URL=$REDIS_URL 8 | # RTPENGINE=$RTPENGINE 9 | 10 | server_header="Server: P-Kiss-SBC" 11 | user_agent_header="User-Agent: P-Kiss-SBC" 12 | 13 | # LISTEN_PUBLIC=$LISTEN_PUBLIC 14 | # LISTEN_ADVERTISE=$LISTEN_ADVERTISE 15 | # LISTEN_PRIVATE=$LISTEN_PRIVATE 16 | # alias=ALIAS -------------------------------------------------------------------------------- /src/sip/tests/db-test/acc: -------------------------------------------------------------------------------- 1 | id(int,auto) method(string) from_tag(string) to_tag(string) callid(string) sip_code(string) sip_reason(string) time(int) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/acc_cdrs: -------------------------------------------------------------------------------- 1 | id(int,auto) start_time(int) end_time(int) duration(double) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/address: -------------------------------------------------------------------------------- 1 | id(int,auto) grp(int) ip_addr(string) mask(int) port(int) tag(string,null) 2 | 1|1|172.17.0.2|16|5080|100| 3 | 2|2|10.0.3.52|24|43010|200| 4 | 3|1|172.31.0.2|16|5080|0| 5 | 4|1|192.168.0.2|16|5080|0| 6 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/dialog: -------------------------------------------------------------------------------- 1 | id(int,auto) hash_entry(int) hash_id(int) callid(string) from_uri(string) from_tag(string) to_uri(string) to_tag(string) caller_cseq(string) callee_cseq(string) caller_route_set(string,null) callee_route_set(string,null) caller_contact(string) callee_contact(string) caller_sock(string) callee_sock(string) state(int) start_time(int) timeout(int) sflags(int) iflags(int) toroute_name(string,null) req_uri(string) xdata(string,null) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/dialog_vars: -------------------------------------------------------------------------------- 1 | id(int,auto) hash_entry(int) hash_id(int) dialog_key(string) dialog_value(string) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/dialplan: -------------------------------------------------------------------------------- 1 | id(int,auto) dpid(int) pr(int) match_op(int) match_exp(string) match_len(int) subst_exp(string) repl_exp(string) attrs(string) 2 | 1|1|1|1|^3320202020[0-9]+$|11|1|1|100| 3 | 2|2|1|1|^33[1-9][0-9]+$|12|1|1|200| 4 | 3|1|1|0|100|3|1|1|100| 5 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/dispatcher: -------------------------------------------------------------------------------- 1 | id(int,auto) setid(int) destination(string) flags(int) priority(int) attrs(string) description(string) 2 | 1|100|sip:fs1.pks.local:5080|0|0|sockname=private;tenant=toto|fs1| 3 | 2|200|sip:10.0.3.254:5060|0|0|sockname=public;tenant=none|provider| 4 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/domain: -------------------------------------------------------------------------------- 1 | id(int,auto) domain(string) did(string,null) last_modified(int) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/domain_attrs: -------------------------------------------------------------------------------- 1 | id(int,auto) did(string) name(string) type(int) value(string) last_modified(int) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/htable: -------------------------------------------------------------------------------- 1 | id(int,auto) key_name(string) key_type(int) value_type(int) key_value(string) expires(int) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/rtpengine: -------------------------------------------------------------------------------- 1 | id(int,auto) setid(int) url(string) weight(int) disabled(int) stamp(int) 2 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/tenant: -------------------------------------------------------------------------------- 1 | id(int,auto) key_name(string) key_type(int) value_type(int) key_value(string) expires(int) 2 | 1|toto|0|0|200|0| 3 | 2|tutu|0|0|200|0| 4 | 3|riri|0|0|300|0| 5 | -------------------------------------------------------------------------------- /src/sip/tests/db-test/version: -------------------------------------------------------------------------------- 1 | table_name(string) table_version(int) 2 | version|1| 3 | acc|5| 4 | acc_cdrs|2| 5 | address|6| 6 | dialog|7| 7 | dialog_vars|1| 8 | dialplan|2| 9 | dispatcher|4| 10 | domain|2| 11 | domain_attrs|1| 12 | htable|2| 13 | rtpengine|1| 14 | tenant|1| 15 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:bullseye 2 | 3 | COPY ./modules.conf /modules.conf 4 | 5 | RUN apt-get update && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get -y install git build-essential pkg-config uuid-dev zlib1g-dev libjpeg-dev libsqlite3-dev libcurl4-openssl-dev libpcre3-dev libspeexdsp-dev libldns-dev libedit-dev libtiff5-dev yasm libopus-dev libsndfile1-dev unzip libavformat-dev libswscale-dev libavresample-dev liblua5.2-dev liblua5.2-0 cmake libpq-dev unixodbc-dev autoconf automake ntpdate libxml2-dev libpq-dev libpq5 &&\ 7 | \ 8 | cd /usr/src/ && \ 9 | git clone https://github.com/signalwire/libks.git && \ 10 | cd libks && \ 11 | cmake . && \ 12 | make && make install && \ 13 | \ 14 | cd /usr/src/ && \ 15 | git clone https://github.com/signalwire/signalwire-c.git && \ 16 | cd signalwire-c && \ 17 | cmake . && \ 18 | make && make install && \ 19 | \ 20 | cd /usr/src/ && \ 21 | git clone https://github.com/freeswitch/sofia-sip.git && \ 22 | cd sofia-sip && \ 23 | ./bootstrap.sh && \ 24 | ./configure && \ 25 | make && make install && \ 26 | \ 27 | cd /usr/src/ && \ 28 | git clone https://github.com/freeswitch/spandsp.git && \ 29 | cd spandsp && \ 30 | ./bootstrap.sh && \ 31 | ./configure && \ 32 | make && make install && \ 33 | \ 34 | ldconfig && \ 35 | \ 36 | cd /usr/src/ && \ 37 | git clone https://github.com/signalwire/freeswitch.git -bv1.10 freeswitch && \ 38 | cd freeswitch && \ 39 | git config pull.rebase true && \ 40 | #Here you can build your Freeswitch on specific commit, it is allways good practice to do so 41 | #git checkout f9990221e6094886066ec2bf9685648135bd405a && \ 42 | #git checkout v1.10.8 && \ 43 | cp /modules.conf /usr/src/freeswitch/modules.conf && \ 44 | \ 45 | ./bootstrap.sh -j && \ 46 | ./configure && \ 47 | make && \ 48 | make install 49 | 50 | CMD ["/usr/local/freeswitch/bin/freeswitch", "-nonat"] -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/README.md: -------------------------------------------------------------------------------- 1 | ## Minimal FreeSWITCH Configuration 2 | 3 | The default "vanilla" configuration that comes with FreeSWITCH has 4 | been designed as a showcase of the configurability of the myriad of 5 | features that FreeSWITCH comes with out of the box. While it is very 6 | helpful in tinkering with FreeSWITCH, it has a lot of extraneous stuff 7 | enabled/configured for use in a production system. This configuration 8 | aims to take the reverse stance -- it attempts to be a starting point 9 | for configuring a new system by "adding" required features (instead of 10 | removing them as one would do if one starts with the default 11 | configuration). 12 | 13 | This folder also includes the corresponding `modules.conf` that lists 14 | the modules that are required to get this configuration working. 15 | 16 | ### Test 17 | 18 | This configuration was tested by sending an INVITE (without 19 | registration) using the `siprtp` example program that comes with 20 | PJSIP, and verifying that the info dump is produced on the FreeSWITCH 21 | console. 22 | 23 | $ ./siprtp -q -p 1234 "sip:stub@$(my_ip):5080" 24 | 25 | ### Upstream 26 | 27 | The configuration in this folder comes from 28 | [mx4492/freeswitch-minimal-conf](https://github.com/mx4492/freeswitch-minimal-conf/commit/270941d6f2dca279f1bb8762d072940273d5ae11). 29 | 30 | ### Other Minimal Configurations 31 | 32 | * [voxserv/freeswitch_conf_minimal](https://github.com/voxserv/freeswitch_conf_minimal) 33 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/acl.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/cdr_csv.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/conference.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/console.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/db.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/event_socket.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/logfile.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/modules.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/sofia.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/switch.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/autoload_configs/xml_rpc.conf.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/dialplan/default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/dialplan/public.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/dialplan/public/00_stub.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/freeswitch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 |
13 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/modules.conf: -------------------------------------------------------------------------------- 1 | applications/mod_commands 2 | applications/mod_conference 3 | applications/mod_db 4 | applications/mod_dptools 5 | applications/mod_esf 6 | applications/mod_expr 7 | applications/mod_hash 8 | dialplans/mod_dialplan_xml 9 | endpoints/mod_loopback 10 | endpoints/mod_sofia 11 | event_handlers/mod_cdr_csv 12 | event_handlers/mod_event_socket 13 | formats/mod_native_file 14 | formats/mod_sndfile 15 | loggers/mod_console 16 | loggers/mod_logfile 17 | xml_int/mod_xml_rpc 18 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/sip_profiles/external.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/sip_profiles/external/stub.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | --> 7 | 8 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/sip_profiles/internal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/conf/vars.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/sip/tests/freeswitch/modules.conf: -------------------------------------------------------------------------------- 1 | applications/mod_commands 2 | applications/mod_conference 3 | applications/mod_db 4 | applications/mod_dptools 5 | applications/mod_esf 6 | applications/mod_expr 7 | applications/mod_hash 8 | dialplans/mod_dialplan_xml 9 | endpoints/mod_loopback 10 | endpoints/mod_sofia 11 | event_handlers/mod_cdr_csv 12 | event_handlers/mod_event_socket 13 | formats/mod_native_file 14 | formats/mod_sndfile 15 | loggers/mod_console 16 | loggers/mod_logfile 17 | xml_int/mod_xml_rpc -------------------------------------------------------------------------------- /src/sip/tests/security_checks.feature: -------------------------------------------------------------------------------- 1 | Feature: Security checks 2 | In order to check the security features of P-KISS-SBC 3 | I want to block unwanted calls and perform assertions on their progress 4 | 5 | Scenario: R-URI user part is not phone number 6 | Given the following providers exist in the address table of the database: 7 | | grp | ip_addr | mask | port | tag | 8 | | 2 | 10.0.3.10 | 32 | 5060 | 200 | 9 | Given the following IPBXs exist in the address table of the database: 10 | | grp | ip_addr | mask | port | tag | 11 | | 1 | 10.0.3.2 | 32 | 5060 | 100 | 12 | And the following rules exist in the dialplan table of database: 13 | | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs | 14 | | 2 | 1 | 1 | ^\\+33[1-9][0-9]+$ | 12 | 1 | 1 | 201 | 15 | | 2 | 1 | 1 | ^0[1-9][0-9]+$ | 10 | 1 | 1 | 200 | 16 | And the following destinations exist in the dispatcher table of database: 17 | | setid | destination | flags | priority | attrs | description | 18 | | 200 | 10.0.3.10:5060 | 0 | 0 | sockname=public | prov1 | 19 | | 201 | 10.0.3.20.5060 | 0 | 0 | sockname=public | prov2 | 20 | When SBC receives an SIP INVITE from this source ""/"" with one of this "" in R-URI userpart 21 | Then SBC generates a response to provider with this "" and "" 22 | 23 | Examples: 24 | | ip | port | did | code | message | 25 | | 10.0.3.10 | 5060 | a34240506070 | 404 | Dialed number is not valid | 26 | | 10.0.3.2 | 5060 | a34240506070 | 404 | Dialed number is not valid | -------------------------------------------------------------------------------- /src/sip/tests/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo $0 starting 3 | # to start it with settings environment values on the fly : 4 | # VOIP_DOMAIN=dev-voip.com FROM_CALLER=+33613000014 /scripts/full_test.sh 5 | 6 | MSISDN_FROM=${FROM_CALLER} 7 | VOIP_DOMAIN=${VOIP_DOMAIN} 8 | 9 | VOIP_PATROL_DIR=. 10 | VOIP_PATROL_XML_DIR=scripts/xml/ 11 | VOIP_PATROL_BINARY=$(which voip_patrol) 12 | VOIP_PATROL_BINARY=./voip_patrol 13 | VOIP_PATROL_RESULTS_DIR=/ 14 | VOIP_PATROL_RESULTS_FILENAME=results.json 15 | 16 | SIP_RESPONSE_LIST="403,404,408,486,487,503,200" 17 | IFS=, 18 | for SIP_RESPONSE_CODE in $SIP_RESPONSE_LIST; 19 | do 20 | echo ============== SIP_RESPONSE_CODE = $SIP_RESPONSE_CODE========================== 21 | MSISDN_TO=+33100000$SIP_RESPONSE_CODE 22 | 23 | echo "makecall from $MSISDN_FROM to $MSISDN_TO expecting SIP reesponse code $SIP_RESPONSE_CODE..." 24 | VOIP_PATROL_XML_FILE=makecall_$SIP_RESPONSE_CODE.xml 25 | 26 | 27 | XMLFILE=$VOIP_PATROL_XML_DIR/$VOIP_PATROL_XML_FILE 28 | 29 | sed -i -r "s/registrar=.*/registrar=\"${VOIP_DOMAIN}\"/" $XMLFILE 30 | sed -i -r "s/callee=.*/callee=\"${MSISDN_TO}@${VOIP_DOMAIN}\"/" $XMLFILE 31 | sed -i -r "s/caller=.*/caller=\"${CALLER}@${VOIP_DOMAIN}\"/" $XMLFILE 32 | sed -i -r "s/account=.*/account=\"${USER_ID_TEST}\"/" $XMLFILE 33 | sed -i -r "s/username=.*/username=\"${MSISDN_FROM}\"/" $XMLFILE 34 | sed -i -r "s/\"Bearer .*\"/\"Bearer ${TOKEN_TEST}\"/" $XMLFILE 35 | sed -i -r "s/label=.*/label=\"${VOIP_PATROL_XML_FILE}\"/" $XMLFILE 36 | 37 | # execute in /scripts/ to use default /tls/* certifcates 38 | cd $VOIP_PATROL_DIR 39 | $VOIP_PATROL_BINARY -c $XMLFILE -o $VOIP_PATROL_RESULTS_DIR/$VOIP_PATROL_RESULTS_FILENAME --gracefull-shutdown --log-level-file 0 --log-level-console 3 40 | 41 | done --------------------------------------------------------------------------------