[Home]

Summary:ASTERISK-27174: res_calendar_icalendar: Recurring events not being loaded from Google calendar using ical
Reporter:Mark Thompson (aroundi)Labels:
Date Opened:2017-08-03 13:39:00Date Closed:2017-08-22 05:09:07
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_calendar_icalendar
Versions:13.15.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:IncrediblePBX 13-12.3 for Ubuntu 14, Linux 3.13.0-125-generic #174-Ubuntu SMP Mon Jul 10 18:51:24 UTC 2017 x86_64 x86_64 x86_64 GNU/LinuxAttachments:
Description:type = ical

Calendar functions okay with single events. All single events in the configured timeframe are listed in "calendar show calendar <calendar name>". For recurring events only the initial event is listed. All other events in the series are omitted. This problem has been reported at least twice in the Asterisk forums:

https://community.asterisk.org/t/google-calendar-integration-missing-periodic-events/48338

https://community.asterisk.org/t/google-calendar-integration-repeat-events-not-retrieved/69957

Note that I had a workaround of switching calendar type from "ical" to "caldav" (along with the appropriate url). However, caldav no longer works due to unknown certificate rejection errors.

Comments:By: Asterisk Team (asteriskteam) 2017-08-03 13:39:00.660-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Rusty Newton (rnewton) 2017-08-07 16:32:38.489-0500

I figured an issue may already exist on the tracker, but I couldn't find one.

Can you provide your exact configuration on the Asterisk and Google side of things for the sake of clarity and to make reproduction simple for whoever wants to eventually take this issue on?

Does the problem only occur with Google calendar? Have you tried with any other backends?

By: Mark Thompson (aroundi) 2017-08-07 18:18:29.820-0500

Hi Rusty,

Thanks for picking up on this. Is the information below enough for clarity? The problem, on this end, is continuously reproducible. Let me know what else would be helpful.
Hardware
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
{noformat}
root@pstarspbx:~#  uname -r
3.13.0-125-generic
{noformat}
{noformat}
root@pstarspbx:~# lshw
pstarspbx                
   description: Mini Tower Computer
   product: OptiPlex 760 ()
   vendor: Dell Inc.
   serial: 366S9K1
   width: 64 bits
   capabilities: smbios-2.5 dmi-2.5 vsyscall32
   configuration: administrator_password=disabled boot=normal chassis=mini-tower power-on_password=disabled uuid=44454C4C-3600-1036-8053-B3C04F394B31
 *-core
      description: Motherboard
      product: 0M858N
      vendor: Dell Inc.
      physical id: 0
      version: A00
      serial: ..CN1374094R0117.
    *-firmware
         description: BIOS
         vendor: Dell Inc.
         physical id: 0
         version: A05
         date: 08/17/2009
         size: 64KiB
         capacity: 4032KiB
         capabilities: pci pnp apm upgrade shadowing escd cdboot bootselect edd int13floppytoshiba int13floppy720 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification netboot
{noformat}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


Asterisk 13.15.0    Incredible GUI 12.0.30
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

/etc/asterisk/calendar.conf
{noformat}
[eventscal]
type = ical
url = https://calendar.google.com/calendar/ical/eventscal%40gmail.com/public/basic.ics
user = eventscal@gmail.com
secret = XXXXXXXXXXXXXXXXXXX
refresh = 15
timeframe = 11520
{noformat}

/etc/asterisk/extensions-custom.conf
{noformat}
[from-internal-custom]
;# // Events today - TTS appication
exten => 795,1,Answer
exten => 795,n,Wait(1)
exten => 795,n,Set(DayEnd=${STRFTIME(${EPOCH},,%Y-%m-%d 23:59:59)})
exten => 795,n,Set(EpochDayEnd=${STRPTIME(${DayEnd},,%Y-%m-%d %H:%M:%S)})
exten => 795,n,Set(id=${CALENDAR_QUERY(eventscal,${EPOCH},$[${EpochDayEnd}])})
exten => 795,n,Set(num=${CALENDAR_QUERY_RESULT(${id},getnum)})
exten => 795,n,Set(i=1)
exten => 795,n,agi(googletts.agi,"Today's events and music",en-US)
exten => 795,n,ExecIf($[${num}=0]?agi(googletts.agi,"No events are currently scheduled for today.")
exten => 795,n,While($[${i} <= ${num}])
exten => 795,n,SayUnixTime(${CALENDAR_QUERY_RESULT(${id},start,${i})},,q 'digits/at' IMp)
exten => 795,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},summary,${i})}",en-US,,1.1)
exten => 795,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},description,${i})}",en-US)
exten => 795,n,Set(i=$[${i} + 1])
exten => 795,n,EndWhile
exten => 795,n,Goto(790,1)
exten => 795,n,Hangup()

;# // Events tomorrow
exten => 793,1,Answer
exten => 793,n,Wait(1)
exten => 793,n,Set(DayEnd=${STRFTIME(${EPOCH},,%Y-%m-%d 23:59:59)})
exten => 793,n,Set(EpochDayEnd=${STRPTIME(${DayEnd},,%Y-%m-%d %H:%M:%S)})
exten => 793,n,Set(id=${CALENDAR_QUERY(eventscal,$[${EpochDayEnd}],$[${EpochDayEnd}+24*60*60])})
exten => 793,n,Set(num=${CALENDAR_QUERY_RESULT(${id},getnum)})
exten => 793,n,Set(i=1)
exten => 793,n,agi(googletts.agi,"Tomorrow's events and music",en-US)
exten => 793,n,ExecIf($[${num}=0]?agi(googletts.agi,"No events are currently scheduled for tomorrow.")
exten => 793,n,While($[${i} <= ${num}])
exten => 793,n,SayUnixTime(${CALENDAR_QUERY_RESULT(${id},start,${i})},,q 'digits/at' IMp)
exten => 793,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},summary,${i})}",en-US,,1.1)
exten => 793,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},description,${i})}",en-US)
exten => 793,n,Set(i=$[${i} + 1])
exten => 793,n,EndWhile
exten => 793,n,Goto(790,1)
exten => 793,n,Hangup()

;# // Events upcoming week
exten => 791,1,Answer
exten => 791,n,Wait(1)
exten => 791,n,Set(DayEnd=${STRFTIME(${EPOCH},,%Y-%m-%d 23:59:59)})
exten => 791,n,Set(EpochDayEnd=${STRPTIME(${DayEnd},,%Y-%m-%d %H:%M:%S)})
exten => 791,n,Set(id=${CALENDAR_QUERY(eventscal,$[${EPOCH}],$[${EpochDayEnd}+8*24*60*60])})
exten => 791,n,Set(num=${CALENDAR_QUERY_RESULT(${id},getnum)})
exten => 791,n,Set(i=1)
exten => 791,n,agi(googletts.agi,"Events and music for the next 7 days",en-US)
exten => 791,n,ExecIf($[${num}=0]?Playback(from))
exten => 791,n,While($[${i} <= ${num}])
exten => 791,n,SayUnixTime(${CALENDAR_QUERY_RESULT(${id},start,${i})},,ABd 'digits/at' IMp)
exten => 791,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},summary,${i})}",en-US,,1.1)
exten => 791,n,agi(googletts.agi,"${CALENDAR_QUERY_RESULT(${id},description,${i})}",en-US)
exten => 791,n,Set(i=$[${i} + 1])
exten => 791,n,EndWhile
exten => 791,n,Goto(790,1)
exten => 791,n,Hangup()
{noformat}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Google calendar "Events" is public. Recurring events were successfully displayed in FullCalendar (while not showing up in Asterisk), however, I do not have that hosting environment currently set up.






By: Sean Bright (seanbright) 2017-08-17 12:18:53.344-0500

[A fix is up for review|https://gerrit.asterisk.org/#/c/6242/]

By: Friendly Automation (friendly-automation) 2017-08-22 05:09:09.963-0500

Change 6242 merged by Jenkins2:
res_calendar_icalendar: Properly handle recurring events

[https://gerrit.asterisk.org/6242|https://gerrit.asterisk.org/6242]

By: Friendly Automation (friendly-automation) 2017-08-22 05:13:20.693-0500

Change 6243 merged by Joshua Colp:
res_calendar_icalendar: Properly handle recurring events

[https://gerrit.asterisk.org/6243|https://gerrit.asterisk.org/6243]

By: Friendly Automation (friendly-automation) 2017-08-22 05:13:53.162-0500

Change 6245 merged by Joshua Colp:
res_calendar_icalendar: Properly handle recurring events

[https://gerrit.asterisk.org/6245|https://gerrit.asterisk.org/6245]

By: Friendly Automation (friendly-automation) 2017-08-22 05:17:38.504-0500

Change 6244 merged by Jenkins2:
res_calendar_icalendar: Properly handle recurring events

[https://gerrit.asterisk.org/6244|https://gerrit.asterisk.org/6244]