System information
up and running far quicker. Of course, once you’re comfortable with configuring cal-
endaring support in Asterisk, you can connect it to any calendaring server you desire.
The first step is to make sure you have a Gmail (http://www.gmail.com) account with
Google, which will get you access to a calendaring server. Once you’ve logged into your
Gmail account, there should be a link to your calendar in the upper-left corner. Click
on the Calendar link and insert a couple of items for the next hour or two. When we
configure our calendar.conf file we’ll be instructing Asterisk to check for new events
every 15 minutes, and pulling in 60 minutes’ worth of data.
Be sure to verify the time on your server. If the time is not in sync with
the rest of the world—e.g., if is not updated via the Network Time Pro-
tocol (NTP)—your events may not show, or may show at the wrong
times. This tip is the result of running into this very issue while testing
and documenting. : )
The next step is to configure our calendar.conf file for polling our calendar server.
The calendar.conf.sample file has several examples for calendaring serv-
ers, such as those supplied by Microsoft Exchange–, iCal-, and CalDAV-
based calendar servers.
The following configuration will connect to the Google calendaring server and poll for
new events every 15 minutes, retrieving 60 minutes’ worth of data. Feel free to change
these settings as necessary, but be aware that pulling more data (especially if you have
multiple calendars for people in your company) will utilize more memory:
$ cat >> calendar.conf
[myGoogleCal]
type=caldav
url=https://www.google.com/calendar/dav/<Gmail Email Address>/events/
user=<Gmail Email Address>
secret=<Gmail Password>
refresh=15
timeframe=60
Ctrl
+ D
With your calendar.conf file configured, let’s load the calendaring modules into
Asterisk. First we’ll load the res_calendar.so module into memory, then we’ll follow it
up by doing a module reload, which will load the sister modules (such as res_calen-
dar_caldav.so) correctly.
†
† As of this writing, there is a bug in the process of loading of the calendar modules after Asterisk has been
started. It was filed as issue 18067 at https://issues.asterisk.org and hopefully will have been resolved by the
time you read this. If not, be aware that you may need to restart Asterisk to get the modules loaded into
memory correctly.
400 | Chapter 18: External Services