System information

On the left side of the Google calendar interface will be a link labeled Add. Clicking on
this will open a new window where you can create the calendar. Go ahead and do that
now. We’ve called ours “Phone Calls.”
Now we need to enable CalDAV calendar syncing for our calendar. Information about
how to do this is located at http://www.google.com/support/mobile/bin/answer.py?an
swer=151674. This page notes that only your primary calendar will be synced to the
device, but we want to make sure our calls are logged to a separate calendar so we can
easily hide them (and so our smartphone doesn’t synchronize the phone’s calls either,
which may cause confusion). There are two links near the bottom of the page: one for
regular Google calendar users, and the other for Google Apps users. Select the appro-
priate link and open it. You will then be presented with a page that contains your
calendars. Select the Phone Calls calendar and then select Save.
Next up is configuring our calendar.conf file for Asterisk. One of the parameters we
need is the link to the CalDAV calendar. There is a Calendar ID value that we need that
will identify our calendar specifically. To find the calendar ID, click the down arrow
beside the calendar name on the lefthand side of the calendar page and select Calendar
Settings. Near the bottom of the calendar settings will be two rows that contain the
icons for sharing the calendar (XML, ICAL, HTML). Beside the first set of icons inside
the Calendar Address box will be the calendar ID. It will look like this:
(Calendar ID: 2hfb6p5974gds924j61cmg4gfd@group.calendar.google.com)
If you’re setting this up via Google Apps, the calendar ID will be prefixed with your
domain name and an underscore (e.g., shifteight.org_). Make a note of this string, as
we’re going to use it next.
Open up the calendar.conf file and add a new calendar section. In our case we’ve called
it [phone_call_calendar]. You’ll recognize the formatting of the calendar from earlier,
so we won’t go through all the settings here. The key setting to note is the url parameter.
The format of this parameter is:
https://www.google.com/calendar/dav/<calendar_id>/events/
We need to replace the <calendar_id> with the calendar ID we recently made a note
of. The full configuration then ends up looking like so:
[phone_call_calendar]
type=caldav
; The URL must be on a single line
url=https://www.google.com/calendar/dav/
shifteight.org_2hfb6p5974gds924j61cmg4gfd@group.calendar.google.com/events/
user = leif@shifteight.org
secret = my_secret_password
refresh=15
timeframe=120
Calendar Integration | 409