IP-PBX with Raspberry Pi3

9
FREEPBX with Raspberry Pi 3 and Telkom SPA-3102 SIP Trunk By Doni Kuswaryadi Preparations : Raspberry Pi 3 – Buy it from Tokopedia Linksys SPA-3102 MicroSD 8 GB Minimum, 16 GB recomended MicroUSB adaptor 2 x RJ-45 Ethernet Cables 2 x RJ-11 Telephony Cables IP-PBX procedure : 1. Download the FreePBX 13 image for raspberry at http://www.raspberry-asterisk.org/ 2. Extract the image, and install it to microSD using Win32DiskImager at http://www.raspberry-asterisk.org/ 3. Place your microSD into raspberry pi and turn on your raspberry, don’t forget to plug-in the ethernet cable and make sure your router have DHCP Server running, otherwise your raspberry inaccessible 4. SSH remote your raspberry Pi from your PC or notebook, the default ID’s of raspberry pi freepbx is User : root Password : raspberry 5. If you have access to ssh of raspberry, type it “raspbx-upgrade” (without quote) enter and please wait around 30-45 minutes depend on your internet connection 6. After success upgrade the engine, lets we configure our timezone by typing “configure-timezone” and choose Asia – Jakarta 7. Reboot your server by typing “reboot” 8. Remote your IPPBX from browser by typing the IP address, default ID’s are User : admin Password : admin

Transcript of IP-PBX with Raspberry Pi3

FREEPBX with Raspberry Pi 3 and Telkom SPA-3102 SIP Trunk By Doni Kuswaryadi

Preparations :

Raspberry Pi 3 – Buy it from Tokopedia

Linksys SPA-3102

MicroSD 8 GB Minimum, 16 GB recomended

MicroUSB adaptor

2 x RJ-45 Ethernet Cables

2 x RJ-11 Telephony Cables IP-PBX procedure :

1. Download the FreePBX 13 image for raspberry at http://www.raspberry-asterisk.org/ 2. Extract the image, and install it to microSD using Win32DiskImager at http://www.raspberry-asterisk.org/ 3. Place your microSD into raspberry pi and turn on your raspberry, don’t forget to plug-in the ethernet cable

and make sure your router have DHCP Server running, otherwise your raspberry inaccessible 4. SSH remote your raspberry Pi from your PC or notebook, the default ID’s of raspberry pi freepbx is

User : root Password : raspberry

5. If you have access to ssh of raspberry, type it “raspbx-upgrade” (without quote) enter and please wait around 30-45 minutes depend on your internet connection

6. After success upgrade the engine, lets we configure our timezone by typing “configure-timezone” and choose Asia – Jakarta

7. Reboot your server by typing “reboot” 8. Remote your IPPBX from browser by typing the IP address, default ID’s are

User : admin Password : admin

9. Next, we create extension for each person, by click Application Extentions

10. Next is click Add extension Add New Chan_SIP Extension, fill the forms (as bellow example) a. User Extension : 100 b. Display Name : Operator c. Secret : t3st1ng5@w d. Click “Submit”

11. Try to create another 1 extension with same configuration above, to test end to end communication. 12. Next, we would like to set TELKOM as a trunk. Go to “Connectivity Trunks”

13. Click, “Add Trunk Add SIP (Chan_sip) Trunk” and fill these information in General TAB a. Trunk Name : Telkom b. Outbond Caller ID : 7892494 (No. Telepon sendiri) c. Maximum Channel : 1

14. Go to, “SIP Settings Outgoing” and fill these information as example a. Trunk Name : Telkom b. Peer detail :

disallow=all (Codec) allow=ulaw&alaw&g729&gsm (Allowed Codec) fromuser=telkom authuser=telkom username=telkom secret=admin123 host=192.168.1.3 (IP Address SPA-3102) context=from-trunk type=friend nat=yes (For NAT network) canreinvite=no qualify=yes incominglimit=1 port=5061 dtmfmode=rfc2833

c. Click “Submit”

15. Now, we let the flow of the outbond. Go to, “Connectivity Outbond Routes” and fill these information in Route Settings as example.

a. Route Name : to-telkom b. Trunk Sequence for Matched Route : Telkom

16. Go to, “Dial Patterns” if you would like to set, prefix code or number(s) before make outbond call. In this case, I use 9 as a pattern, so you need press 9 then followed with the number you would like to call.

17. OK, next we create a rule for inbound call. Go to, “Connectivity Inbound” and fill these information as example.

a. Description : Telkom b. DID Number : 9999999 (I use my telkom number, but its bounced back) c. Set Destination : Ring Groups (When there is incoming call, all of the extension under 4105

Operator group will ring) d. Click “Submit” to finish all configuration.

18. Go to, “Application Ring Group” to set your ring group. 19. Next, lets we configure our network environment and codec priority. Go to, “Settings Asterisk SIP

Settings” and fill these information as example in General SIP Settings. a. Allow anonymous inbound SIP calls : No. b. External Address : Click “detect network settings” to get your IP Public. c. Local Networks : Put your local network subnet. d. Audio codecs : ulaw, alaw, g722, gsm & g729.

20. Next, we set our Public IP status, go to “Chan SIP Setting” tab. a. NAT : Yes (if your network is NAT environment). b. IP Configuration : Static IP (if your IP is static from your ISP).

21. DONE, for IP-PBX Side. Now we switch to SPA-3102 configuration Linksys SPA-3102 procedure :

1. Plug your telkom RJ-11 line into proper port. 2. Open your linksys, make sure your network is DHCP, SPA-3102 only work with DHCP network for initial, click

“Admin Login” and “Advanced”.

3. Go to, “PSTN Line” to config, see screen as example

4. DONE, click “Submit All Changes”.

Try to call your new extension for local communication and try to dial 9 + destination number to outbound call. If you can hear your partner voice its mean you good to go.

NOTES, If your network if double NAT and you need your external softphone access to your Public IP of IP-PBX, use IAX than SIP. IAX is VERY suitable and adaptive for NAT’ed network.