[asterisk-bugs] [JIRA] (ASTERISK-27174) res_calendar_icalendar: Recurring events not being loaded from Google calendar using ical

Rusty Newton (JIRA) noreply at issues.asterisk.org
Tue Aug 15 09:52:07 CDT 2017


    [ https://issues.asterisk.org/jira/browse/ASTERISK-27174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=238007#comment-238007 ] 

Rusty Newton edited comment on ASTERISK-27174 at 8/15/17 9:51 AM:
------------------------------------------------------------------

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 at pstarspbx:~#  uname -r
3.13.0-125-generic
{noformat}
{noformat}
root at 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 at 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.







was (Author: aroundi):
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
root at pstarspbx:~#  uname -r
3.13.0-125-generic

root at 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

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


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

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


/etc/asterisk/extensions-custom.conf
[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()

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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.






> res_calendar_icalendar: Recurring events not being loaded from Google calendar using ical
> -----------------------------------------------------------------------------------------
>
>                 Key: ASTERISK-27174
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27174
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_calendar_icalendar
>    Affects Versions: 13.15.0
>         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/Linux
>            Reporter: Mark Thompson
>            Assignee: Mark Thompson
>            Severity: Minor
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list