Macos Customization About
Total Page:16
File Type:pdf, Size:1020Kb
macOS Customization About This section describes how to customize macOS and FreeSWITCH™ to provide additional benefits. It is part of the FreeSWITCH™ macOS documentation. 1 Configuration Introduction 2 24x7 Operation 3 Email Voicemails 4 Remotely Accessing a Mac 4.1 Screen Sharing 4.1.1 Drag and Drop Files 4.2 Setup File Sharing 4.3 SSH 5 Invisible Files and Directories 5.1 Scripts and Widgets 5.2 Show and Hide Scripts 5.3 Show Invisible Files in Open Dialog Window Configuration Introduction Read Configuring FreeSWITCH to learn about the various configuration files and "poke around" the sample configuration in the /usr/local/freeswitch/conf folder. To setup the gateway to your ITSP and dialplans so you can make and receive calls these files require changing: Gateway to your ITSP in conf/sip_profiles User extensions in conf/directory/default Outgoing dialplans in /conf/dialplan/default Incoming dialplans in /conf/dialplan/public These are default directories, files can be placed in other locations. In addition there are other files for IVR, sounds, etc. you should become familiar with. And don't forget the FreeSWITCH™ documentation. To find parameters in configuration files easily you should learn how to use Grep, a Unix find tool. Grep will search for text in the directory and display lines with matching text. For instance, if you want to find where the word "mail" is used type the following command: grep mail conf/* grep -r mail conf/* # The -r (recursive) option includes all subdirectories in the search. You can perform all editing using Textedit, however, you should become familiar with the Xcode editor. Its advantage is that it displays XML code colorized so you can find syntax errors quickly. This is ideal for editing FreeSWITCH™ XML configuration files. A great way to save a lot of time learning to configure and customize FreeSWITCH™ is to Buy The Books! 24x7 Operation Setting up for 24x7 operation instructions are located at macOS 24x7 Preparation. Email Voicemails For instructions on how to automatically send voicemails as email attachments see macOS Email Voicemail. Remotely Accessing a Mac Screen Sharing FreeSWITCH™ and a Mac Mini can provide PBX and other server functions while taking up almost no space since it does not require a keyboard, mouse or monitor. If you are using a Mac Mini this way or your Mac is located in a closet or other remote location you can control one Mac from another. The big bonus is that you can run Xcode and work on configurations, changes, updates, etc. all using the normal macOS screen. Perform these steps on the remote Mac to be controlled: 1. Start System Preferences 2. Click Sharing 3. Check "Screen Sharing" This Mac will now display in the Finder of other Macs on the local network. On the "controlling" Mac: 1. Open the Finder 2. Select the remote Mac in the SHARED section 3. Click on "Share Screen" 4. Enter the password for the remote Mac. The entire Desktop of the remote Mac is displayed and controllable. It will run it as if the monitor is connected and is very fast and extremely reliable. You can even restart the remote Mac and the screen will reappear. One caveat is that sound does not play remotely. If the remote Mac is close enough turn up its volume to full to hear sounds. Drag and Drop Files If you have a remote Mac running FreeSWITCH™ it may be desirable to access or transfer files between them. macOS screen sharing provides drag and drop of files between screens to transfer them! No need for file transfers or other unproductive options. Nothing to setup, once screen sharing is active drag and drop is available. Setup File Sharing In addition to the previously mentioned Drag and Drop, you can display file directories on a remote Mac and drag files between them. Perform these steps on the remote Mac so it can share files with other Macs: 1. Start System Preferences 2. Click Sharing 3. Check "File Sharing" This Mac will now display in the Finder of other Macs on the local network. Use the same procedure for the controlling Mac above except select "Connect" instead of "Share Screen". The directories you setup to share will display. SSH If you have a headless Mac but don't have another one to use for screen or file sharing, or your only other system is Linux or Windows, you can access the remote mac via SSH. Turn on SSH access through System Preferences -> Sharing -> Remote Login. This provides limited access compared to the options above and requires knowledge of SSH usage. Simply perform a web search for "macOS SSH" to find much more information and examples. Invisible Files and Directories macOS hides many Unix directories and files from the finder and Terminal app. You won't be able to view /usr or other hidden directories without special commands or extra steps. Here are some options to allow you to see hidden files: Scripts and Widgets Search the web for an automator application, applescript or program that modifies the AppleShowAllFiles finder setting. For example, macOS hidden files Dashboard widget. Open Dashboard and run it to flip the setting. Show and Hide Scripts Create scripts that run in the Terminal application to flip between hide and show of invisible files. The file name must end with ".command" and can be placed on the Desktop for easy access. For each of the two files below: 1. Start Textedit 2. Paste the lines into the empty document 3. Pull down the Format menu 4. Select Make Plain Text 5. Save the file on the Desktop as -filename- File invis show.command: defaults write com.apple.finder AppleShowAllFiles YES killall Finder File invis hide.command: defaults write com.apple.finder AppleShowAllFiles NO killall Finder Then run the Terminal application and issue the following commands to make the files executable: cd ~/Desktop <- this is the directory where you placed the files chmod +x "invis show.command" chmod +x "invis hide.command" Double clicking the file icons will run Terminal and change the hide/show setting. Show Invisible Files in Open Dialog Window While any open file dialog window is displayed press command+shift+.(period) to view hidden files. Press again to hide. Note that this does not work in the finder, only for the open dialog box while in an application such as Textedit. .