Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - leowilkin/pact-id: πŸŒπŸ“ž Cheap, international dialling with PaCT ID & Twilio
Nothing Special   »   [go: up one dir, main page]

Skip to content

leowilkin/pact-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

30 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“ž PaCT ID - Personal and Cheap International Dialling

PaCT ID is a Twilio-powered local-to-international calling bridge. It allows you to call and receive calls across borders using local Twilio numbers while preserving caller IDs β€” with a handy PWA frontend for mobile dialing.

GitHub Actions Workflow Status GitHub commits since latest release Website GitHub Repo stars

What does PaCT ID stand for?

Probably Cheaper To Internationally Dial

Ironically, it's actually much cheaper. From 'research', Leo found that it costs like Β£0.025 per minute going from a UK -> US, and his data plan is like Β£0.13 a minute, so big savings.

Someone's probably going to reverse engineer my server and find all my numbers, so it'll end out to be more expensive when they f me with twilio bills.


🌍 How It Works

  • Inbound Calls from Others

    • If someone calls your US Twilio number, it's forwarded to your UK personal number via your UK Twilio number, showing the original US caller ID.
    • If someone calls your UK Twilio number, it's forwarded to your US personal number via your US Twilio number, showing the original UK caller ID.
  • Outbound Calls from You

    • If you call the UK Twilio number, you're prompted to enter a number (e.g., a US number) [then press hash], and it connects using your US Twilio number, showing your personal UK number as caller ID.
    • If you call the US Twilio number, you're prompted to enter a number (e.g., a UK number) [then press hash], and it connects using your UK Twilio number, showing your personal US number as caller ID.

βœ… Features

  • Local-to-international call bridging
  • Full preservation of original caller IDs
  • Web-based PWA dialler interface - hosted seperately
  • Secure Cloudflare Tunnel support
  • Call normalisation (07 and +44 formats accepted)
  • Configurable via environment variables

πŸ›  Prerequisites

  • A Linux VPS (e.g. Ubuntu 22.04 or later)
  • Python 3.8+ installed
  • cloudflared for secure tunnel to Twilio
  • Two Twilio phone numbers (1x US, 1x UK)
  • Your personal phone number(s) in both regions

πŸ”§ Installation

1. Clone the Repo

git clone https://github.com/leowilkin/pactid.git
cd pactid

2. Set up virtual environment

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

3. Create a .env file

nano .env

See example

4. Create systemd Service

sudo nano /etc/systemd/system/twilio.service
In development

In that crispy new file, paste this weird ass code in, and apparently it makes it run automatically which is pretty neat.

Then hit it with an enable & start

sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable twilio
sudo systemctl start twilio
In production

"Apparently" using Flask servers in prod isn't such a good idea, so when you're running it for realsies, use this systemd file

Then hit it with an refresh

sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl refresh twilio

🌐 Configure Cloudflare Tunnel

  1. Go to dash.cloudflare.com, and enter Zero Trust
  2. Networks > Tunnels
  3. Create a new tunnel > Cloudflared > name your tunnel
  4. Debian > 64-bit
  5. Copy and paste the install code into your terminal
  6. Once completed, copy and paste the activation code into your terminal
  7. Next > configure public hostname as twilio.yourdomain.com, and save

πŸ” Configure Twilio Webhooks

Important

You cannot be on a trial account, as you have to have two numbers.

Set the following webhook URLs for your Twilio numbers:

Number Type Webhook URL
US Number https://twilio.yourdomain.com/voice_us
UK Number https://twilio.yourdomain.com/voice_uk

These should be set as the Voice & Fax > A Call Comes In handler (Webhook + TwiML).

οΏ½ Deploying on Coolify

Coolify just needs a Dockerfile, so point it at this repo and set the build context to the repository root. The image exposes port 8080; Coolify will map it automatically as long as you set the Internal Port to 8080 in the service settings.

Environment variables

Populate the following environment variables in Coolify (or use secrets) so the container can talk to Twilio:

  • US_TWILIO_NUMBER
  • UK_TWILIO_NUMBER
  • PERSONAL_US
  • PERSONAL_UK
  • TWILIO_ACCOUNT_SID
  • TWILIO_AUTH_TOKEN

Optionally, override the defaults:

  • PORT – defaults to 8080
  • GUNICORN_WORKERS – defaults to 2
  • GUNICORN_THREADS – defaults to 4

Once the container is running, Twilio can reach it at https://<your-domain>/voice_us, https://<your-domain>/voice_uk, and https://<your-domain>/text.

οΏ½πŸ“± Using the PWA Dialler

Head on over to leowilkin/pactid-pwa to find out more - currently a WIP.

View Logs

To view the access logs for the service, on your terminal do:

journalctl -u twilio.service -f

Testing

Outbound

https://thetestcall.blogspot.com/

Inbound

Find a friend!

Extra Features!

Set your MOTD to a custom Linux PaCT ID message so you can remember all those commands easily!

Simply:

nano /etc/motd

and paste:

πŸ‘‹ You're logged into $(hostname), your PaCT ID server!

Useful commands:

- systemctl stop twilio
- systemctl start twilio && journalctl -u twilio.service -f
- systemctl status twilio
- nano /opt/twilio/bridge.py

Fully reload & restart?

1. sudo systemctl daemon-reexec
2. sudo systemctl daemon-reload
3. sudo systemctl restart twilio.service


Want to re-enable the default MOTD? https://gist.github.com/leowilkin/483f3968681a78f4f8eabf11228209f0

simples 🀌

About

πŸŒπŸ“ž Cheap, international dialling with PaCT ID & Twilio

Topics

Resources

Stars

Watchers

Forks

0