Git Product home page Git Product logo

homebrew-asterisk's Introduction

Homebrew Asterisk

Build Status

This repo contains the Homebrew formulas I use for my Asterisk dev machine. This is pretty much a few packages which, for one reason or another, aren't the best fit for going into Homebrew itself.

Installation

xcode-select --install
brew tap leedm777/homebrew-asterisk
brew install asterisk

Installation options

  • --with-clang - Compile with clang instead of gcc
    • This is a new-ish option in Asterisk, and might be a bit crashy.
  • --with-dev-mode - Enable dev mode in Asterisk
    • Disable optimizations, turns up build warnings, and enables the test framework.
  • --devel - Install development version 13
    • Build the latest code from the 13 branch.
  • --HEAD - Install HEAD version
    • Build the latest code from the master branch.

Configuration

Configuration files are in /usr/local/etc/asterisk. Detailed configuration docs can be found on the Asterisk wiki.

If you have problems after an upgrade, it may be because of bad path information that ended up in asterisk.conf. Check that the directories section looks like:

[directories](!)
astetcdir => /usr/local/etc/asterisk
astmoddir => /usr/local/opt/asterisk/lib/asterisk/modules
astvarlibdir => /usr/local/var/lib/asterisk
astdbdir => /usr/local/var/lib/asterisk
astkeydir => /usr/local/var/lib/asterisk
astdatadir => /usr/local/var/lib/asterisk
astagidir => /usr/local/var/lib/asterisk/agi-bin
astspooldir => /usr/local/var/spool/asterisk
astrundir => /usr/local/var/run/asterisk
astlogdir => /usr/local/var/log/asterisk
astsbindir => /usr/local/opt/asterisk/sbin

Running asterisk

If you want to just run Asterisk occasionally, just start it up using /usr/local/sbin/asterisk -c. It is recommended to not run Asterisk as root.

Running as a service

To have launchd start asterisk now and restart at login:

$ brew services start leedm777/asterisk/asterisk

To stop asterisk:

$ brew services stop leedm777/asterisk/asterisk

To reload asterisk after an upgrade:

$ brew services restart leedm777/asterisk/asterisk

To connect to Asterisk running as a service:

$ /usr/local/sbin/asterisk -r

Uninstall

To uninstall Asterisk, run brew rm asterisk. To get rid of all local state and configuration data:

$ rm -rf /usr/local/etc/asterisk /usr/local/var/lib/asterisk \
    /usr/local/var/log/asterisk /usr/local/var/run/asterisk \
    /usr/local/var/spool/asterisk

Upgrading from older versions

I used to have notes in the README for creating an asterisk user for running Asterisk. This is not very homebrew-y, so I dropped it.

I also had a custom plist that I recommended instead of homebrew's built-in plist feature. If you had followed those instructions, you may need to remove /Library/LaunchDaemons/org.asterisk.asterisk.plist before installing [the new plist above](#Running as a service).

Common problems

Compilation fails with error: /usr/lib/bundle1.o: No such file or directory

This happens when you try to build Asterisk without the XCode CLT installed. This also affects how GCC is built, so you will also want to reinstall GCC. The good news is that with the CLT installed, GCC should install via bottle, which is tons faster than building it from source.

xcode-select --install
brew rm gcc
brew install asterisk

Configure fails with The Asterisk menuselect tool requires the 'libxml2' development package.

This happens because of a bug with Xcode 8 on OSX 10.11 (El Capitan). Right now, the only solution is to upgrade to macOS 10.12 (Sierra), downgrade to Xcode 7.3, or do some pretty terrifying edits to your system libraries.

homebrew-asterisk's People

Contributors

leedm777 avatar sjors avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.