[Home]

Summary:ASTERISK-20557: res_calendar_caldav.c:157 SSL handshake failed: SSL error: GnuTLS internal error
Reporter:David Brillert (aragon)Labels:
Date Opened:2012-10-12 08:26:28Date Closed:2012-10-22 10:17:30
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_calendar
Versions:1.8.17.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:gnutls-1.4.1-7.el5_8.2 neon-0.29.6-1.el5 libgcrypt-1.4.4-5.el5_8.2 Attachments:
Description:This may not be a bug in code ical but we have followed all the documentation and cannot connect to Google.
Perhaps something is missing in the documentation... apologies in advance if this is not a bug.

Configuration is good according to this Asterisk documentation page:
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/ExternalServices-SECT-1.html

From documentation:
[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

Custom configuration:

[calendar_contextscrubbedsinternet_302]
type            =  caldav
url             =  https://www.google.com/calendar/dav/contextscrubbedsml@contextscrubbednt.net/events/
user            =  contextscrubbedsml@contextscrubbednt.net
secret          =  scrubbed
refresh         =  15
timeframe       =  60
channel         =  SIP/contextscrubbeds-302
context         =  contextscrubbedsinternet
extension       =  302

Also from Asterisk CLI, everythings seems fine:
test*CLI> calendar show calendars
Calendar             Type       Status
--------             ----       ------
calendar_contextscrubbedsinterne caldav     free

scopserv*CLI> calendar show calendar calendar_contextscrubbedsinternet_302
Name              : calendar_contextscrubbedsinterne
Notify channel    : SIP/contextscrubbeds-302
Notify context    : contextscrubbedsinternet
Notify extension  : 302
Notify applicatio :
Notify appdata    :
Refresh time      : 15
Timeframe         : 60
Autoreminder      : 0
Events

[2012-10-10 13:33:11] WARNING[1554]: res_calendar_caldav.c:157 caldav_request: Unknown response to CalDAV calendar calendar_contextscrubbedsinternet_302, request REPORT to /calendar/dav/contextscrubbedsml@contextscrubbednt.net/events/: SSL handshake failed: SSL error: GnuTLS internal error.

And

[2012-10-11 16:47:13] WARNING[12040]: res_calendar_icalendar.c:150 fetch_icalendar: Unable to retrieve iCalendar 'calendar_contextscrubbedsinternet_302' from 'https://mail.contextscrubbednt.net/ical/main.ics': Could not authenticate to server: missing realm in Basic challenge
[2012-10-11 16:47:13] WARNING[12040]: res_calendar_icalendar.c:472 ical_load_calendar: Unable to parse iCalendar 'calendar_contextscrubbedsinternet_302'


Comments:By: Rusty Newton (rnewton) 2012-10-17 17:21:45.627-0500

With those settings in place, turn on full logging with VERBOSE and DEBUG set to at least level 5 (logger.conf) and attach a log showing Asterisk start up so we can see what else may occur around those WARNING messages.



By: David Brillert (aragon) 2012-10-18 08:05:53.417-0500

Scrubbed everything else...

2012-10-18 06:56:01] VERBOSE[5696] loader.c: [2012-10-18 06:56:01]  res_calendar_exchange.so => (Asterisk MS Exchange Calendar Integration)
[2012-10-18 06:56:01] VERBOSE[5696] res_calendar.c: [2012-10-18 06:56:01]   == Registered calendar type 'caldav' (CalDAV calendars)
[2012-10-18 06:56:01] VERBOSE[5696] loader.c: [2012-10-18 06:56:01]  res_calendar_caldav.so => (Asterisk CalDAV Calendar Integration)
[2012-10-18 06:56:01] VERBOSE[5696] res_calendar.c: [2012-10-18 06:56:01]   == Registered calendar type 'ical' (iCalendar .ics calendars)
[2012-10-18 06:56:01] VERBOSE[5696] loader.c: [2012-10-18 06:56:01]  res_calendar_icalendar.so => (Asterisk iCalendar .ics file integration)
[2012-10-18 06:56:01] VERBOSE[5696] res_calendar.c: [2012-10-18 06:56:01]   == Registered calendar type 'ews' (MS Exchange Web Service calendars)
[2012-10-18 06:56:01] VERBOSE[5696] loader.c: [2012-10-18 06:56:01]  res_calendar_ews.so => (Asterisk MS Exchange Web Service Calendar Integration)

[2012-10-18 06:56:03] WARNING[5741] res_calendar_icalendar.c: Unable to retrieve iCalendar 'calendar_customer_302' from 'https://scrubbed/ical/main.ics': Could not authenticate to server: missing realm in Basic challenge
[2012-10-18 06:56:03] WARNING[5741] res_calendar_icalendar.c: Unable to parse iCalendar 'calendar_customer_302'
[2012-10-18 06:56:03] ERROR[5741] res_calendar_icalendar.c: The iCalendar has not been parsed!

By: David Brillert (aragon) 2012-10-22 10:17:30.059-0500

Not a bug; older .23 neon version was used when compiling
Asterisk.  Yum update updated neon to .29. Neon .29 minimum required.  Recompiled and fixed problem.