Introduction 1 7 Introduction Teleport-Video SD image is based on Asterisk and FreePBX running on the Raspberry Pi. For any information related to Raspberry Pi, check the original website at raspberrypi.org. Raspberry Pi is a trademark of the Raspberry Pi Foundation. 1.1 Connections and wiring Diagram 1.2 Determine hostname / IP address Once your PBX is booted, you need to know it s hostname or IP address for ssh login or to open the web GUI. Be sure that network cable is plugged-in and router is set as a DHCP server in order to release an IP to your device. Plug your device to power and allow in about 90 seconds to boot and start. If you will plug HDMI or Video cable to the TV, you will see standard Debian Linux screen,
8 and in the end of starting, the screen will popup the IP address of the device. If is not connected to the TV, check the status page on the router and find the address in the list. On Windows computers, you can just use the hostname teleportfreepbx to access your PBX. SSH login: ssh root@ teleportfreepbx Web GUI: http://teleportfreepbx On Macintosh, use teleportfreepbx.local instead: ssh root@teleportfreepbx.local Web GUI: http://teleportfreepbx.local In case this is not successful you can check your router s DHCP client list, and search for the IP associated with the name teleportfreepbx. If this is still not working out, you can always just connect an HDMI monitor and USB keyboard, log in to the console with user root, password teleportvideo, and run the command: ifconfig
10 2 Next steps after booting Point your browser to the PBX s hostname or IP address or host http://teleportfreepbx The default login to PBX is: user: adm in password: adm in Most of the configuration steps presented here apply to the PBX as well. For all configuration changes just use the red apply config button in the GUI. 2.1 Overview What is the performance of Asterisk running on the Raspberry Pi? In a typical setup with RasPBX, 5 video concurrent calls are possible. This is also the case for conferences, meaning 5 participants can join a conference. More than 5 calls do work, but audio and video quality decreases considerably with every additional call. How to configure a static IP address? Network configuration is done the standard Debian way. Edit the file /etc/network/interfaces: nano /etc/network/interfaces In this file, remove the line iface eth0 inet dhcp and insert instead: iface eth0 inet static address 192.168.0.50 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1
Next steps after booting 11 Replace the values above with your addresses. Then run: service networking restart 2.2 Create accounts In order to register your devices in house, you have to create extensions accounts for them and include phone type devices in the ring group. Remember, Teleportvideo device using one extension and is excluded from the ring group. On the alarm events, motion or push button trigger, Teleportvide is calling to the ring group. In advanced mode you can use more features, such as follow me and calling to external world. PBX is not providing video recording, and the size on SD card is very limited, but enough to keep CDR and VM. 2.2.1 Create Extensions
12
Next steps after booting Use these extensions to register your phones and adapters in your house. 2.2.2 Create Ring group 13
14
Next steps after booting Define this number in the Teleportvideo device as a number to call on tyriggered events. 2.3 FreePBX basic features FreePBX is a full-featured PBX web application. Add or change extension and voicemail accounts in seconds Native support of SIP, IAX, and ZAP clients (other endpoints are supported through custom extensions) Supports all Asterisk supported trunk technologies Reduce long distance costs with LCR Route incoming calls based on time-of-day Create interactive Digital Receptionist (IVR) menus Design sophisticated call groups 15
16 Manage callers with Queues Upload custom on-hold music (MOH) Search company directory, based on first or last name Detect and receive incoming faxes Share administrative duties Backup and Restore your system Save audio recordings of calls View call detail reporting with asterisk-stat View extension and trunk status with Flash Operator Panel View conversation recordings with Asterisk Recording Interface (ARI)
18 3 Basic configuration After your PBX has booted successfully, log in either on the console or by ssh with user root and password teleportvideo. Follow these steps to complete the initial configuration: Choose your timezone: configure-timezone Configure locale settings: dpkg-reconfigure locales Configure keyboard settings (not needed when working with ssh only): dpkg-reconfigure keyboard-configuration
20 4 Email setup Email delivery from your PBX is needed if you plan to have voicemails sent to users by email. Email already works in the default configuration using Exim4 as MTA. By default, Exim is configured to directly send mails to the recipient MX hosts. This is however discouraged, as many email providers classify emails coming from dynamic IP addresses as spam. To avoid this, you need to set a smarthost. Unless you have an open SMTP server on your network that can be used as smarthost without authentication, you will need to specify SMTP authentication credentials as well. It is basically possible to use almost any publicly available freemailer as smarthost with the PBX. Have username and password as well as SMTP hostname (sometimes also referred to as outgoing mail server) of the email account you are going to use ready. Run on the console: dpkg-reconfigure exim4-config On the first configuration page select mail sent by smarthost; received via SMTP or fetchmail. On the following pages just keep the default values by pressing enter, until you reach the page starting with Please enter the IP address or the host name of a mail server. Here, enter the SMTP hostname of your email provider. Again, keep default values on the remaining pages. Then, edit the file passwd.client by running: nano /etc/exim4/passwd.client Add your credentials at the bottom of this file in the following format: SMTP_HOSTNAME:USERNAME:PASSWORD In most cases, the SMTP hostname used in this file is identical to the hostname used as smarthost before. If email fails to work, specify the reverse lookup of your email provider s SMTP host IP address here. For Google Mail, this is currently gm ail-sm tp-m sa.l.google.com Some email providers also require you to use sender addresses identical to one of the public email adresses of your account. In this case, edit: nano /etc/email-addresses On the bottom of this file add: root: your_email@someisp.com asterisk: your_email@someisp.com This configures the sender address of all outgoing mail to your_em ail@ som eisp.com. Finally, to activate your configuration run: update-exim4.conf You can test your email setup with this command: send_test_email your_email@someisp.com A test email should reach your inbox shortly.
22 5 Running without Internet connection If Internet connection is not continuously present or not present at all, 2 issues can appear that prevent calling between extensions: A. On system boot, current time is obtained through NTP. Asterisk only starts after time has been set correctly, to avoid problems that have been seen in connection with a large time jump on the system. If Asterisk is started with wrong time first and time is properly set later, audio on calls can be seriously distorted. Thus, the boot scripts only start Asterisk after time has been set, and in setups without Internet connection Asterisk will not start by default. To overcome this, install fake-hwclock: apt-get install fake-hwclock It saves the time on shutdown and loads it again on reboot. B. Asterisk gets into trouble when DNS lookups fail, leaving an unstable system. This can be fixed by installing dnsmasq: apt-get install dnsmasq configure: cd /etc mv resolv.conf resolv.conf.dnsmasq edit /etc/dnsmasq.conf, change this section # Change this line if you want dns to get its upstream servers from # somewhere other that /etc/resolv.conf resolv-file=/etc/resolv.conf.dnsmasq Then create /etc/resolv.conf with contents: nameserver 127.0.0.1 Then reload: /etc/init.d/dnsmasq restart