|
@@ -1409,189 +1409,6 @@ rm -f flatpress.tar.gz
|
1409
|
1409
|
|
1410
|
1410
|
Now visit your blog and follow the setup instructions, which are quite minimal. Various themes and addons are available from the Flatpress web site, http://www.flatpress.org
|
1411
|
1411
|
|
1412
|
|
-** Install a VoIP server
|
1413
|
|
-
|
1414
|
|
-#+BEGIN_VERSE
|
1415
|
|
-/Our core principles, whether in software or sovereignty, have always been about freedom and dignity, for all people, on an equal basis/
|
1416
|
|
-
|
1417
|
|
-#+END_VERSE
|
1418
|
|
-
|
1419
|
|
-*** The server
|
1420
|
|
-Sipwitch is like an introduction service or phone book for SIP VoIP clients. Once introduced the clients can then talk directly, and this means that sipwitch is very lightweight and can run on low power systems such as the BBB.
|
1421
|
|
-
|
1422
|
|
-Edit your package sources:
|
1423
|
|
-
|
1424
|
|
-#+BEGIN_SRC: bash
|
1425
|
|
-emacs /etc/apt/sources.list
|
1426
|
|
-#+END_SRC
|
1427
|
|
-
|
1428
|
|
-Append the following line:
|
1429
|
|
-
|
1430
|
|
-#+BEGIN_SRC: bash
|
1431
|
|
-deb http://dev.gnutelephony.org/archive/ wheezy/
|
1432
|
|
-#+END_SRC
|
1433
|
|
-
|
1434
|
|
-Save and exit.
|
1435
|
|
-
|
1436
|
|
-To load the repository the first time after adding it to the sources.list, since you do not have the verification keys already installed yet. Then do
|
1437
|
|
-
|
1438
|
|
-#+BEGIN_SRC: bash
|
1439
|
|
-apt-get install gnutelephony-keyring
|
1440
|
|
-#+END_SRC
|
1441
|
|
-
|
1442
|
|
-After that it will be happy to accept it as a signed repository. The verification keys can also be directly fetched with
|
1443
|
|
-
|
1444
|
|
-#+BEGIN_SRC: bash
|
1445
|
|
-cd /tmp
|
1446
|
|
-wget http://dev.gnutelephony.org/archive/wheezy/public.key
|
1447
|
|
-#+END_SRC
|
1448
|
|
-
|
1449
|
|
-and manually added instead with
|
1450
|
|
-
|
1451
|
|
-#+BEGIN_SRC: bash
|
1452
|
|
-apt-key add public.key
|
1453
|
|
-#+END_SRC
|
1454
|
|
-
|
1455
|
|
-To make sure you have all dependencies, do
|
1456
|
|
-
|
1457
|
|
-#+BEGIN_SRC: bash
|
1458
|
|
-apt-get update;apt-get dist-upgrade
|
1459
|
|
-#+END_SRC
|
1460
|
|
-
|
1461
|
|
-Before we install anything, let's inspect what is available to us by using
|
1462
|
|
-
|
1463
|
|
-#+BEGIN_SRC: bash
|
1464
|
|
-dpkg -l sipwitch
|
1465
|
|
-#+END_SRC
|
1466
|
|
-
|
1467
|
|
-To see the main application. The columns will indicate if the package is installed, which version and a description of the package. Then do
|
1468
|
|
-
|
1469
|
|
-#+BEGIN_SRC: bash
|
1470
|
|
-dpkg -l sipwitch-*
|
1471
|
|
-#+END_SRC
|
1472
|
|
-
|
1473
|
|
-to see available supporting applications and plugins. Again, the columns will indicate if the package is installed, which version and a description of each of these.
|
1474
|
|
-
|
1475
|
|
-To install only the main application, do
|
1476
|
|
-
|
1477
|
|
-#+BEGIN_SRC: bash
|
1478
|
|
-apt-get install sipwitch
|
1479
|
|
-#+END_SRC
|
1480
|
|
-
|
1481
|
|
-and to install all supporting plugins:
|
1482
|
|
-
|
1483
|
|
-#+BEGIN_SRC: bash
|
1484
|
|
-apt-get install sipwitch-plugin-scripting sipwitch-plugin-subscriber sipwitch-plugin-forward sipwitch-plugin-zeroconf
|
1485
|
|
-#+END_SRC
|
1486
|
|
-
|
1487
|
|
-Add your user into the sipwitch group
|
1488
|
|
-
|
1489
|
|
-#+BEGIN_SRC: bash
|
1490
|
|
-groupadd sipwitch
|
1491
|
|
-groupadd sipusers
|
1492
|
|
-usermod -aG sipwitch myusername
|
1493
|
|
-usermod -aG sipusers myusername
|
1494
|
|
-#+END_SRC
|
1495
|
|
-
|
1496
|
|
-Then edit the configuration
|
1497
|
|
-
|
1498
|
|
-#+BEGIN_SRC: bash
|
1499
|
|
-emacs /etc/sipwitch.conf
|
1500
|
|
-#+END_SRC
|
1501
|
|
-
|
1502
|
|
-Change the *mapped* value from 200 to 20, since we don't want to be serving huge numbers of calls.
|
1503
|
|
-
|
1504
|
|
-Alter the *range* value to 10, since we don't need a large number of extensions. This will mean that exension numbers 200 to 209 are available.
|
1505
|
|
-
|
1506
|
|
-Do not set the *realm* value, as doing so seems to prevent the server from working.
|
1507
|
|
-
|
1508
|
|
-Save and exit.
|
1509
|
|
-
|
1510
|
|
-Create a digest string for your username:
|
1511
|
|
-
|
1512
|
|
-#+BEGIN_SRC: bash
|
1513
|
|
-sipwitch digest myusername
|
1514
|
|
-#+END_SRC
|
1515
|
|
-
|
1516
|
|
-Make a note of the resulting string because you're going to use it in the users file you'll now create.
|
1517
|
|
-
|
1518
|
|
-#+BEGIN_SRC: bash
|
1519
|
|
-export HOSTNAME=mydomainname.com
|
1520
|
|
-touch /etc/sipwitch.d/$HOSTNAME.xml
|
1521
|
|
-chmod 600 /etc/sipwitch.d/$HOSTNAME.xml
|
1522
|
|
-emacs /etc/sipwitch.d/$HOSTNAME.xml
|
1523
|
|
-#+END_SRC
|
1524
|
|
-
|
1525
|
|
-It should look something like the following:
|
1526
|
|
-
|
1527
|
|
-#+BEGIN_SRC: bash
|
1528
|
|
-<provision>
|
1529
|
|
- <user id="myusername">
|
1530
|
|
- <digest>yourdigeststring</digest>
|
1531
|
|
- <extension>201</extension>
|
1532
|
|
- <display>Your full name</display>
|
1533
|
|
- </user>
|
1534
|
|
-</provision>
|
1535
|
|
-#+END_SRC
|
1536
|
|
-
|
1537
|
|
-Save and exit. Now edit the configuration.
|
1538
|
|
-
|
1539
|
|
-#+BEGIN_SRC: bash
|
1540
|
|
-emacs /etc/default/sipwitch
|
1541
|
|
-#+END_SRC
|
1542
|
|
-
|
1543
|
|
-Change "desktop" to "server", then save and exit.
|
1544
|
|
-
|
1545
|
|
-Update the IP settings:
|
1546
|
|
-
|
1547
|
|
-#+BEGIN_SRC: bash
|
1548
|
|
-iptables -A INPUT -p tcp --dport 5060 -j ACCEPT
|
1549
|
|
-iptables -A INPUT -p udp --dport 5060 -j ACCEPT
|
1550
|
|
-iptables -A INPUT -p tcp --dport 5061 -j ACCEPT
|
1551
|
|
-iptables -A INPUT -p udp --dport 5061 -j ACCEPT
|
1552
|
|
-iptables-save
|
1553
|
|
-#+END_SRC
|
1554
|
|
-
|
1555
|
|
-Test that it's working:
|
1556
|
|
-
|
1557
|
|
-#+BEGIN_SRC: bash
|
1558
|
|
-pkill -9 sipw
|
1559
|
|
-sipw -x9 -f
|
1560
|
|
-#+END_SRC
|
1561
|
|
-
|
1562
|
|
-Then try to register with the server using a SIP client (such as Jitsi). If everything worked then use CTRL-C to exit. Then start the service.
|
1563
|
|
-
|
1564
|
|
-#+BEGIN_SRC: bash
|
1565
|
|
-service sipwitch start
|
1566
|
|
-#+END_SRC
|
1567
|
|
-
|
1568
|
|
-*** Clients
|
1569
|
|
-**** Jitsi
|
1570
|
|
-Download the latst version from https://jitsi.org/index.php/Main/Download
|
1571
|
|
-
|
1572
|
|
-TODO
|
1573
|
|
-**** Twinkle client
|
1574
|
|
-
|
1575
|
|
-The client should have a user profile as following:
|
1576
|
|
-
|
1577
|
|
-The "user name" is the xxx id used in the <user id="xxx"> entry of /etc/sipwitch.conf
|
1578
|
|
-
|
1579
|
|
-The "domain" is the yyy domain in the main config <stack><domain>yyy entry of /etc/sipwitch.conf
|
1580
|
|
-
|
1581
|
|
-The SIP Authentication should have:
|
1582
|
|
-
|
1583
|
|
-realm = realm as set in <registry><realm> of /etc/sipwitch.conf
|
1584
|
|
-
|
1585
|
|
-authentication name = <user id="xx"> entry, same as "User Name" field.
|
1586
|
|
-
|
1587
|
|
-password = value of <secret>zzz in <user> entry of /etc/sipwitch.conf
|
1588
|
|
-
|
1589
|
|
-Under security tab, set "Enable ZRTP/SRTP encryption"
|
1590
|
|
-**** Android
|
1591
|
|
-TODO
|
1592
|
|
-
|
1593
|
|
-CSipSimple?
|
1594
|
1412
|
** Install an IRC server
|
1595
|
1413
|
|
1596
|
1414
|
#+BEGIN_VERSE
|
|
@@ -3159,8 +2976,122 @@ make install
|
3159
|
2976
|
pybitmessage
|
3160
|
2977
|
#+END_SRC
|
3161
|
2978
|
|
|
2979
|
+** Install Tripwire
|
|
2980
|
+
|
|
2981
|
+#+BEGIN_VERSE
|
|
2982
|
+/...by the time you get done with all of that, we have a freedom box/
|
|
2983
|
+
|
|
2984
|
+-- Eben Moglen
|
|
2985
|
+#+END_VERSE
|
|
2986
|
+
|
|
2987
|
+Tripwire will try to detect any intrusions into your system. It's a good idea to install it after you have installed all of the other programs which you intend to use.
|
|
2988
|
+
|
|
2989
|
+#+BEGIN_SRC: bash
|
|
2990
|
+apt-get install tripwire
|
|
2991
|
+export HOSTNAME=mydomainname.com
|
|
2992
|
+cd /etc/tripwire
|
|
2993
|
+cp arm-local.key $HOSTNAME-local.key
|
|
2994
|
+cp site.key $HOSTNAME-site.key
|
|
2995
|
+tripwire --init
|
|
2996
|
+tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
|
|
2997
|
+tripwire --check --interactive
|
|
2998
|
+#+END_SRC
|
|
2999
|
+
|
|
3000
|
+you will be asked for two passphrases ("site" and "local"). Make a note of these.
|
|
3001
|
+
|
|
3002
|
+If you subsequently install any more packages or make configuration changes then update the policy again with:
|
|
3003
|
+
|
|
3004
|
+#+BEGIN_SRC: bash
|
|
3005
|
+tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
|
|
3006
|
+#+END_SRC
|
|
3007
|
+
|
|
3008
|
+Also, to look for any rootkits.
|
|
3009
|
+
|
|
3010
|
+#+BEGIN_SRC: bash
|
|
3011
|
+apt-get install rkhunter
|
|
3012
|
+#+END_SRC
|
|
3013
|
+
|
|
3014
|
+* Router/Firewall ports
|
|
3015
|
+The following ports on your internet router/firewall should be forwarded to the BBB.
|
|
3016
|
+
|
|
3017
|
+| Protocol | Port/s |
|
|
3018
|
+|---------------+------------|
|
|
3019
|
+| Gopher | 70 |
|
|
3020
|
+| HTTP | 80 |
|
|
3021
|
+| HTTPS | 443 |
|
|
3022
|
+| IMAP | 143 |
|
|
3023
|
+| IRC SSL | 6670 |
|
|
3024
|
+| SIP | 5060..5061 |
|
|
3025
|
+| SMTP | 25 |
|
|
3026
|
+| SMTPS | 465 |
|
|
3027
|
+| SSH | 22 |
|
|
3028
|
+| XMPP | 5222..5223 |
|
|
3029
|
+| XMPP (server) | 5269 |
|
|
3030
|
+| XMPP (BOSH) | 5280..5281 |
|
|
3031
|
+| Bitmessage | 8444 |
|
|
3032
|
+
|
|
3033
|
+* Hints and Tips
|
|
3034
|
+** Messaging security
|
|
3035
|
+If you're connected to other friends via Friendica then the preferred way to send private messages is via Friendica's built-in messaging system. This is a lot more convenient than using GPG with ordinary email and yet still provides a similar level of protection from unwarranted interception.
|
|
3036
|
+** Restrictive/hostile user environments
|
|
3037
|
+If you are typically operating within a restrictive of hostile environment where using ssh is not an option because everything other than web ports are blocked then you may wish to try installing oterm:
|
|
3038
|
+
|
|
3039
|
+http://www.coralbits.com/oterm/
|
|
3040
|
+
|
|
3041
|
+https://github.com/davidmoreno/onion
|
|
3042
|
+** Moving Domains
|
|
3043
|
+If you're moving servers and using a different domain name or path then you can search and replace URLs within files in the following way:
|
|
3044
|
+
|
|
3045
|
+#+BEGIN_SRC: bash
|
|
3046
|
+find /var/www/mynewdomain/htdocs -type f -exec sed -i 's@myolddomain@mynewdomain@g' {} \;
|
|
3047
|
+#+END_SRC
|
|
3048
|
+
|
|
3049
|
+** MySql foo
|
|
3050
|
+*** Backup all databases
|
|
3051
|
+To back up all mysql databases:
|
|
3052
|
+
|
|
3053
|
+#+BEGIN_SRC: bash
|
|
3054
|
+mysqldump -u root -p --all-databases --events > /var/backups/databasebackup.sql
|
|
3055
|
+#+END_SRC
|
|
3056
|
+*** Restoring a particular mysql database
|
|
3057
|
+To restore yesterday's friendica backup:
|
|
3058
|
+
|
|
3059
|
+#+BEGIN_SRC: bash
|
|
3060
|
+mysql -D friendica -o < /var/backups/friendica_daily.sql
|
|
3061
|
+#+END_SRC
|
|
3062
|
+
|
|
3063
|
+To restore yesterday's mediawiki backup:
|
|
3064
|
+
|
|
3065
|
+#+BEGIN_SRC: bash
|
|
3066
|
+mysql -D wikidb -o < /var/backups/wikidb_daily.sql
|
|
3067
|
+#+END_SRC
|
|
3068
|
+*** Removing mysql server
|
|
3069
|
+
|
|
3070
|
+If you manage to screw up sql server completely then it can be fully deleted with:
|
|
3071
|
+
|
|
3072
|
+#+BEGIN_SRC: bash
|
|
3073
|
+ps aux | grep mysql
|
|
3074
|
+#+END_SRC
|
|
3075
|
+
|
|
3076
|
+and use /kill -9 <pid>/ to kill all mysql processes.
|
|
3077
|
+
|
|
3078
|
+#+BEGIN_SRC: bash
|
|
3079
|
+apt-get remove --purge mysql\*
|
|
3080
|
+apt-get clean
|
|
3081
|
+updatedb
|
|
3082
|
+#+END_SRC
|
|
3083
|
+* Deprecated
|
|
3084
|
+
|
|
3085
|
+The following items have been deprecated until such time as a successful installation is achieved.
|
|
3086
|
+
|
3162
|
3087
|
** Collaborative Document Editing
|
3163
|
3088
|
|
|
3089
|
+#+BEGIN_VERSE
|
|
3090
|
+/Openness and participation are antidotes to surveillance and control./
|
|
3091
|
+
|
|
3092
|
+-- Howard Rheingold
|
|
3093
|
+#+END_VERSE
|
|
3094
|
+
|
3164
|
3095
|
#+BEGIN_SRC: bash
|
3165
|
3096
|
echo "deb http://ftp.us.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
|
3166
|
3097
|
apt-get update
|
|
@@ -3395,107 +3326,187 @@ etherpad: myusername
|
3395
|
3326
|
|
3396
|
3327
|
Save and exit.
|
3397
|
3328
|
|
3398
|
|
-** Install Tripwire
|
|
3329
|
+
|
|
3330
|
+** Install a VoIP server
|
3399
|
3331
|
|
3400
|
3332
|
#+BEGIN_VERSE
|
3401
|
|
-/...by the time you get done with all of that, we have a freedom box/
|
|
3333
|
+/Our core principles, whether in software or sovereignty, have always been about freedom and dignity, for all people, on an equal basis/
|
3402
|
3334
|
|
|
3335
|
+-- David Sugar, GNU Telephony
|
3403
|
3336
|
#+END_VERSE
|
3404
|
3337
|
|
3405
|
|
-Tripwire will try to detect any intrusions into your system. It's a good idea to install it after you have installed all of the other programs which you intend to use.
|
|
3338
|
+*** The server
|
|
3339
|
+Sipwitch is like an introduction service or phone book for SIP VoIP clients. Once introduced the clients can then talk directly, and this means that sipwitch is very lightweight and can run on low power systems such as the BBB.
|
|
3340
|
+
|
|
3341
|
+Edit your package sources:
|
3406
|
3342
|
|
3407
|
3343
|
#+BEGIN_SRC: bash
|
3408
|
|
-apt-get install tripwire
|
3409
|
|
-export HOSTNAME=mydomainname.com
|
3410
|
|
-cd /etc/tripwire
|
3411
|
|
-cp arm-local.key $HOSTNAME-local.key
|
3412
|
|
-cp site.key $HOSTNAME-site.key
|
3413
|
|
-tripwire --init
|
3414
|
|
-tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
|
3415
|
|
-tripwire --check --interactive
|
|
3344
|
+emacs /etc/apt/sources.list
|
3416
|
3345
|
#+END_SRC
|
3417
|
3346
|
|
3418
|
|
-you will be asked for two passphrases ("site" and "local"). Make a note of these.
|
|
3347
|
+Append the following line:
|
3419
|
3348
|
|
3420
|
|
-If you subsequently install any more packages or make configuration changes then update the policy again with:
|
|
3349
|
+#+BEGIN_SRC: bash
|
|
3350
|
+deb http://dev.gnutelephony.org/archive/ wheezy/
|
|
3351
|
+#+END_SRC
|
|
3352
|
+
|
|
3353
|
+Save and exit.
|
|
3354
|
+
|
|
3355
|
+To load the repository the first time after adding it to the sources.list, since you do not have the verification keys already installed yet. Then do
|
3421
|
3356
|
|
3422
|
3357
|
#+BEGIN_SRC: bash
|
3423
|
|
-tripwire --update-policy --secure-mode low /etc/tripwire/twpol.txt
|
|
3358
|
+apt-get install gnutelephony-keyring
|
3424
|
3359
|
#+END_SRC
|
3425
|
3360
|
|
3426
|
|
-Also, to look for any rootkits.
|
|
3361
|
+After that it will be happy to accept it as a signed repository. The verification keys can also be directly fetched with
|
3427
|
3362
|
|
3428
|
3363
|
#+BEGIN_SRC: bash
|
3429
|
|
-apt-get install rkhunter
|
|
3364
|
+cd /tmp
|
|
3365
|
+wget http://dev.gnutelephony.org/archive/wheezy/public.key
|
3430
|
3366
|
#+END_SRC
|
3431
|
3367
|
|
3432
|
|
-* Router/Firewall ports
|
3433
|
|
-The following ports on your internet router/firewall should be forwarded to the BBB.
|
|
3368
|
+and manually added instead with
|
3434
|
3369
|
|
3435
|
|
-| Protocol | Port/s |
|
3436
|
|
-|---------------+------------|
|
3437
|
|
-| Gopher | 70 |
|
3438
|
|
-| HTTP | 80 |
|
3439
|
|
-| HTTPS | 443 |
|
3440
|
|
-| IMAP | 143 |
|
3441
|
|
-| IRC SSL | 6670 |
|
3442
|
|
-| SIP | 5060..5061 |
|
3443
|
|
-| SMTP | 25 |
|
3444
|
|
-| SMTPS | 465 |
|
3445
|
|
-| SSH | 22 |
|
3446
|
|
-| XMPP | 5222..5223 |
|
3447
|
|
-| XMPP (server) | 5269 |
|
3448
|
|
-| XMPP (BOSH) | 5280..5281 |
|
3449
|
|
-| Bitmessage | 8444 |
|
|
3370
|
+#+BEGIN_SRC: bash
|
|
3371
|
+apt-key add public.key
|
|
3372
|
+#+END_SRC
|
3450
|
3373
|
|
3451
|
|
-* Hints and Tips
|
3452
|
|
-** Messaging security
|
3453
|
|
-If you're connected to other friends via Friendica then the preferred way to send private messages is via Friendica's built-in messaging system. This is a lot more convenient than using GPG with ordinary email and yet still provides a similar level of protection from unwarranted interception.
|
3454
|
|
-** Restrictive/hostile user environments
|
3455
|
|
-If you are typically operating within a restrictive of hostile environment where using ssh is not an option because everything other than web ports are blocked then you may wish to try installing oterm:
|
|
3374
|
+To make sure you have all dependencies, do
|
3456
|
3375
|
|
3457
|
|
-http://www.coralbits.com/oterm/
|
|
3376
|
+#+BEGIN_SRC: bash
|
|
3377
|
+apt-get update;apt-get dist-upgrade
|
|
3378
|
+#+END_SRC
|
3458
|
3379
|
|
3459
|
|
-https://github.com/davidmoreno/onion
|
3460
|
|
-** Moving Domains
|
3461
|
|
-If you're moving servers and using a different domain name or path then you can search and replace URLs within files in the following way:
|
|
3380
|
+Before we install anything, let's inspect what is available to us by using
|
3462
|
3381
|
|
3463
|
3382
|
#+BEGIN_SRC: bash
|
3464
|
|
-find /var/www/mynewdomain/htdocs -type f -exec sed -i 's@myolddomain@mynewdomain@g' {} \;
|
|
3383
|
+dpkg -l sipwitch
|
3465
|
3384
|
#+END_SRC
|
3466
|
3385
|
|
3467
|
|
-** MySql foo
|
3468
|
|
-*** Backup all databases
|
3469
|
|
-To back up all mysql databases:
|
|
3386
|
+To see the main application. The columns will indicate if the package is installed, which version and a description of the package. Then do
|
3470
|
3387
|
|
3471
|
3388
|
#+BEGIN_SRC: bash
|
3472
|
|
-mysqldump -u root -p --all-databases --events > /var/backups/databasebackup.sql
|
|
3389
|
+dpkg -l sipwitch-*
|
3473
|
3390
|
#+END_SRC
|
3474
|
|
-*** Restoring a particular mysql database
|
3475
|
|
-To restore yesterday's friendica backup:
|
|
3391
|
+
|
|
3392
|
+to see available supporting applications and plugins. Again, the columns will indicate if the package is installed, which version and a description of each of these.
|
|
3393
|
+
|
|
3394
|
+To install only the main application, do
|
3476
|
3395
|
|
3477
|
3396
|
#+BEGIN_SRC: bash
|
3478
|
|
-mysql -D friendica -o < /var/backups/friendica_daily.sql
|
|
3397
|
+apt-get install sipwitch
|
3479
|
3398
|
#+END_SRC
|
3480
|
3399
|
|
3481
|
|
-To restore yesterday's mediawiki backup:
|
|
3400
|
+and to install all supporting plugins:
|
3482
|
3401
|
|
3483
|
3402
|
#+BEGIN_SRC: bash
|
3484
|
|
-mysql -D wikidb -o < /var/backups/wikidb_daily.sql
|
|
3403
|
+apt-get install sipwitch-plugin-scripting sipwitch-plugin-subscriber sipwitch-plugin-forward sipwitch-plugin-zeroconf
|
3485
|
3404
|
#+END_SRC
|
3486
|
|
-*** Removing mysql server
|
3487
|
3405
|
|
3488
|
|
-If you manage to screw up sql server completely then it can be fully deleted with:
|
|
3406
|
+Add your user into the sipwitch group
|
3489
|
3407
|
|
3490
|
3408
|
#+BEGIN_SRC: bash
|
3491
|
|
-ps aux | grep mysql
|
|
3409
|
+groupadd sipwitch
|
|
3410
|
+groupadd sipusers
|
|
3411
|
+usermod -aG sipwitch myusername
|
|
3412
|
+usermod -aG sipusers myusername
|
3492
|
3413
|
#+END_SRC
|
3493
|
3414
|
|
3494
|
|
-and use /kill -9 <pid>/ to kill all mysql processes.
|
|
3415
|
+Then edit the configuration
|
3495
|
3416
|
|
3496
|
3417
|
#+BEGIN_SRC: bash
|
3497
|
|
-apt-get remove --purge mysql\*
|
3498
|
|
-apt-get clean
|
3499
|
|
-updatedb
|
|
3418
|
+emacs /etc/sipwitch.conf
|
|
3419
|
+#+END_SRC
|
|
3420
|
+
|
|
3421
|
+Change the *mapped* value from 200 to 20, since we don't want to be serving huge numbers of calls.
|
|
3422
|
+
|
|
3423
|
+Alter the *range* value to 10, since we don't need a large number of extensions. This will mean that exension numbers 200 to 209 are available.
|
|
3424
|
+
|
|
3425
|
+Do not set the *realm* value, as doing so seems to prevent the server from working.
|
|
3426
|
+
|
|
3427
|
+Save and exit.
|
|
3428
|
+
|
|
3429
|
+Create a digest string for your username:
|
|
3430
|
+
|
|
3431
|
+#+BEGIN_SRC: bash
|
|
3432
|
+sipwitch digest myusername
|
3500
|
3433
|
#+END_SRC
|
|
3434
|
+
|
|
3435
|
+Make a note of the resulting string because you're going to use it in the users file you'll now create.
|
|
3436
|
+
|
|
3437
|
+#+BEGIN_SRC: bash
|
|
3438
|
+export HOSTNAME=mydomainname.com
|
|
3439
|
+touch /etc/sipwitch.d/$HOSTNAME.xml
|
|
3440
|
+chmod 600 /etc/sipwitch.d/$HOSTNAME.xml
|
|
3441
|
+emacs /etc/sipwitch.d/$HOSTNAME.xml
|
|
3442
|
+#+END_SRC
|
|
3443
|
+
|
|
3444
|
+It should look something like the following:
|
|
3445
|
+
|
|
3446
|
+#+BEGIN_SRC: bash
|
|
3447
|
+<provision>
|
|
3448
|
+ <user id="myusername">
|
|
3449
|
+ <digest>yourdigeststring</digest>
|
|
3450
|
+ <extension>201</extension>
|
|
3451
|
+ <display>Your full name</display>
|
|
3452
|
+ </user>
|
|
3453
|
+</provision>
|
|
3454
|
+#+END_SRC
|
|
3455
|
+
|
|
3456
|
+Save and exit. Now edit the configuration.
|
|
3457
|
+
|
|
3458
|
+#+BEGIN_SRC: bash
|
|
3459
|
+emacs /etc/default/sipwitch
|
|
3460
|
+#+END_SRC
|
|
3461
|
+
|
|
3462
|
+Change "desktop" to "server", then save and exit.
|
|
3463
|
+
|
|
3464
|
+Update the IP settings:
|
|
3465
|
+
|
|
3466
|
+#+BEGIN_SRC: bash
|
|
3467
|
+iptables -A INPUT -p tcp --dport 5060 -j ACCEPT
|
|
3468
|
+iptables -A INPUT -p udp --dport 5060 -j ACCEPT
|
|
3469
|
+iptables -A INPUT -p tcp --dport 5061 -j ACCEPT
|
|
3470
|
+iptables -A INPUT -p udp --dport 5061 -j ACCEPT
|
|
3471
|
+iptables-save
|
|
3472
|
+#+END_SRC
|
|
3473
|
+
|
|
3474
|
+Test that it's working:
|
|
3475
|
+
|
|
3476
|
+#+BEGIN_SRC: bash
|
|
3477
|
+pkill -9 sipw
|
|
3478
|
+sipw -x9 -f
|
|
3479
|
+#+END_SRC
|
|
3480
|
+
|
|
3481
|
+Then try to register with the server using a SIP client (such as Jitsi). If everything worked then use CTRL-C to exit. Then start the service.
|
|
3482
|
+
|
|
3483
|
+#+BEGIN_SRC: bash
|
|
3484
|
+service sipwitch start
|
|
3485
|
+#+END_SRC
|
|
3486
|
+
|
|
3487
|
+*** Clients
|
|
3488
|
+**** Jitsi
|
|
3489
|
+Download the latst version from https://jitsi.org/index.php/Main/Download
|
|
3490
|
+
|
|
3491
|
+TODO
|
|
3492
|
+**** Twinkle client
|
|
3493
|
+
|
|
3494
|
+The client should have a user profile as following:
|
|
3495
|
+
|
|
3496
|
+The "user name" is the xxx id used in the <user id="xxx"> entry of /etc/sipwitch.conf
|
|
3497
|
+
|
|
3498
|
+The "domain" is the yyy domain in the main config <stack><domain>yyy entry of /etc/sipwitch.conf
|
|
3499
|
+
|
|
3500
|
+The SIP Authentication should have:
|
|
3501
|
+
|
|
3502
|
+realm = realm as set in <registry><realm> of /etc/sipwitch.conf
|
|
3503
|
+
|
|
3504
|
+authentication name = <user id="xx"> entry, same as "User Name" field.
|
|
3505
|
+
|
|
3506
|
+password = value of <secret>zzz in <user> entry of /etc/sipwitch.conf
|
|
3507
|
+
|
|
3508
|
+Under security tab, set "Enable ZRTP/SRTP encryption"
|
|
3509
|
+**** Android
|
|
3510
|
+TODO
|
|
3511
|
+
|
|
3512
|
+CSipSimple?
|