I test everything on my laptop before deploying. Here's my workflow.
This uses PJSUA, a command-line SIP client. It's ugly but it works.
./scripts/install-test-client.shThis downloads and builds PJSUA. Takes a minute.
Terminal 1:
./scripts/test-user1000.shYou should see a bunch of SIP messages ending with something like "Registration successful".
Terminal 2:
./scripts/test-user1001.shSame thing.
In Terminal 2 (user 1001):
- Type
mthen hit Enter - Type
sip:1000@127.0.0.1then hit Enter - Terminal 1 should start ringing!
- In Terminal 1, type
ato answer - You now have a voice call between two terminal windows. Wild.
Controls:
h- hang upa- answer incoming callm- make callq- quit
If registration fails:
- Is Asterisk running?
docker ps | grep asterisk - Did you start the right script?
./scripts/test-user1000.shnot./test-user1000.sh(moved those) - Try
127.0.0.1instead oflocalhost- PJSUA is picky
See Client Setup Guide for Linphone screenshots. I spent way too long getting the settings right, wrote it all down.
docker exec asterisk-server asterisk -rx "pjsip show endpoints"Should show:
Endpoint: 1000 Available 0 of 1
Endpoint: 1001 Available 0 of 1
If it says "Unavailable", the phone never actually registered. Usually means wrong password or firewall blocking 5060.
| Problem | What I Did |
|---|---|
| Can't register | Opened firewall: sudo firewall-cmd --add-port=5060/udp --permanent |
| No audio at all | Opened RTP range: sudo firewall-cmd --add-port=10000-10100/udp --permanent |
| Call drops immediately | Checked logs: docker logs asterisk-server, usually a codec mismatch |
| Audio one-way only | Enabled ICE in Linphone settings |
The firewall thing gets me every time on a fresh Fedora install.