Commit Graph

29 Commits

Author SHA1 Message Date
Terry Wilson 5861bab06d Allow res_calendar to be unloaded
The calendaring tech modules depend on res_calendar and initially
res_calendar just bumped the use count so that it couldn't be unloaded.
res_calendar can potentially create many threads and I've seen issues
where the Asterisk shutdown has failed where it looked like these
threads could be the culprit.

This patch adds unload support for res_calendar. Unloading res_calendar
will also unload the dependant tech modules as well.

(closes issue ASTERISK-16744)
Review: https://reviewboard.asterisk.org/r/1657/
........

Merged revisions 353502 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 353503 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@353504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-01 00:08:27 +00:00
Terry Wilson 5bfea5fdbf Add aresult variable for CALENDAR_WRITE
This patch adds a CALENDAR_SUCCESS=1/0 variable that is set to show whether or
not CALENDAR_WRITE has passed. This patch also adds some debugging for caldav
PUT responses and no longer treats responses with no body as an error (as a PUT
gets a 201 Created with no body).

(closes issue ASTERISK-16903)
Reported by: Clod Patry
Tested by: Terry Wilson
Patches:
  	calendarstatus.diff uploaded by Clod Patry (License #5138), slightly modified by Terry Wilson

Review: https://reviewboard.asterisk.org/r/1692/
- This line, and those below, will be ignored--

M    res/res_calendar.c
M    res/res_calendar_exchange.c
M    res/res_calendar_caldav.c


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27 15:57:40 +00:00
Terry Wilson 04da92c379 Replace direct access to channel name with accessor functions
There are many benefits to making the ast_channel an opaque handle, from
increasing maintainability to presenting ways to kill masquerades. This patch
kicks things off by taking things a field at a time, renaming the field to
'__do_not_use_${fieldname}' and then writing setters/getters and converting the
existing code to using them. When all fields are done, we can move ast_channel
to a C file from channel.h and lop off the '__do_not_use_'.

This patch sets up main/channel_interal_api.c to be the only file that actually
accesses the ast_channel's fields directly. The intent would be for any API
functions in channel.c to use the accessor functions. No more monkeying around
with channel internals. We should use our own APIs.

The interesting changes in this patch are the addition of
channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
use accessor functions when ast_channel is really opaque), and some re-working
of the way channel iterators/callbacks are handled so as to avoid creating fake
ast_channels on the stack to pass in matching data by directly accessing fields
(since "name" is a stringfield and the fake channel doesn't init the
stringfields, you can't use the ast_channel_name_set() function). I went with
ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
setter.

The majority of the grunt-work for this change was done by writing a semantic
patch using Coccinelle ( http://coccinelle.lip6.fr/ ).

Review: https://reviewboard.asterisk.org/r/1655/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09 22:15:50 +00:00
Terry Wilson 4b826c46b3 Don't crash on empty notify channel
........

Merged revisions 342715 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-30 02:31:02 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Russell Bryant 695bc7df94 Add "calendar show types" CLI command.
(closes issue #18246)
Reported by: junky
Patches:
      calendar_types.diff uploaded by junky (license 177)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@317483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-05 23:10:27 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Terry Wilson 3a02c029b4 Merged revisions 310039 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r310039 | twilson | 2011-03-08 10:10:50 -0800 (Tue, 08 Mar 2011) | 11 lines
  
  Spelling fix in "calendar show calendar"
  
  s/Cartegories/Catagories/
  
  (closes issue #18931)
  Reported by: pdugas
  Patches: 
        res_calendar.c.patch uploaded by pdugas (license 1222)
  
  Review: [full review board URL with trailing slash]
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@310045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-08 18:19:46 +00:00
Terry Wilson 01a453351d Add setvar option to calendaring
Adding the setvar option with variable substitution on the value allows things
like setting the outbound caller id name to the summary of a calendar event,
etc. Values could be chained together as they are appended in order to do some
scripting if necessary.

Review: https://reviewboard.asterisk.org/r/1134/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@309640 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-04 23:22:39 +00:00
David Vossel c26c190711 Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal.  For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal

The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs.  Functionally
no change in behavior should be present in this patch.  Thanks to twilson
and russell for all the time they spent reviewing these changes.

Review: https://reviewboard.asterisk.org/r/1083/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03 16:22:10 +00:00
Andrew Latham f9c3b26241 Add Function and Application Relationships to documentation
Add and extend the see-also sections to the documentation for applications
and functions in an effort to expand the online documentation of the wiki.
Also check for and update any links to moved documentation in the doc folder.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@304913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-30 00:22:59 +00:00
Russell Bryant cc0b7e7df5 Some scheduler API cleanup and improvements.
Previously, I had added the ast_sched_thread stuff that was a generic scheduler
thread implementation.  However, if you used it, it required using different
functions for modifying scheduler contents.  This patch reworks how this is
done and just allows you to optionally start a thread on the original scheduler
context structure that has always been there.  This makes it trivial to switch
to the generic scheduler thread implementation without having to touch any of
the other code that adds or removes scheduler entries.

In passing, I made some naming tweaks to add ast_ prefixes where they were not
there before.

Review: https://reviewboard.asterisk.org/r/1007/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@299091 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-12-20 17:15:54 +00:00
Terry Wilson aa0f407b8b Merged revisions 294207 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r294207 | twilson | 2010-11-08 13:56:10 -0600 (Mon, 08 Nov 2010) | 2 lines
  
  Set a default waittime, and make sure to convert it to milliseconds
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@294208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-11-08 19:59:39 +00:00
Jan Kalab a7505c0b91 Support for calendar events priorities and categories (with ISO C90 fix)
See RFC 5545 ch. 3.8.1.2 and 9.

(closes issue #17837)
Review: https://reviewboard.asterisk.org/r/880/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-03 12:58:52 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Terry Wilson 880cde12ac Calendaring support for Exchange Server 2007+ via EWS
This commit adds support for calendaring with Exchange Server 2007+ via
Exchange Web Services. Full write support and for querying attendees. Many
thanks to Jan Kaláb for the feature.

(closes issue #17022)
Reported by: pitel
Patches: 
      res_calendar_ews.c uploaded by pitel (license 1008)
Tested by: pitel, twilson

Review: https://reviewboard.asterisk.org/r/557/
Review: https://reviewboard.asterisk.org/r/668/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@265317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-24 18:21:20 +00:00
Terry Wilson fb65a6860a Fix INTERNAL_OBJ error on stop when calendars.conf missing
Initialize the calendars container before calling load_config and return FAILURE
on allocation failure. Also, use the AST_MODULE_LOAD_* values for return values.
Thanks to rmudgett for pointing out the error and the need to use the defined
values for return


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@242812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-25 18:01:08 +00:00
Terry Wilson cb74681b6d Add missing 'getnum' field
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@224074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-14 21:16:57 +00:00
Terry Wilson 5ea7d4a291 use Calendar: instead of Calendar/ for devstate
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 22:14:22 +00:00
Richard Mudgett 76831d0c78 Fix compiler warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 17:11:05 +00:00
Terry Wilson a8034cd770 Fix handling of notification calls w/ the dialing api
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-13 01:51:46 +00:00
Terry Wilson d81a8e34dd Don't add Attendees during copy, replace them
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 15:00:49 +00:00
Terry Wilson a75ba8d1a9 Remove global variable that makes dlopen unhappy
This isn't the best way to do this, but it is the easiest. There are some
limitations that are going to need to be addressed at some point with reloads
and when I (or someone else) work on that, then the API can be updated to
handle passing the private config data that the calendar tech modules need in
a better way as well.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-08 23:11:23 +00:00
Kevin P. Fleming 1c9fe00920 Recorded merge of revisions 222152 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines
  
  Fix ao2_iterator API to hold references to containers being iterated.
  
  See Mantis issue for details of what prompted this change.
  
  Additional notes:
  
  This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK
  has become an enum instead of a macro, with a name that fits our
  naming policy; also, it is now necessary to call
  ao2_iterator_destroy() on any iterator that has been
  created. Currently this only releases the reference to the container
  being iterated, but in the future this could also release other
  resources used by the iterator, if the iterator implementation changes
  to use additional resources.
  
  (closes issue #15987)
  Reported by: kpfleming
  
  Review: https://reviewboard.asterisk.org/r/383/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06 01:24:24 +00:00
Michiel van Baak 6f63f3eb8d cast time_t type variables to long where needed.
This makes res_calendar.c compile on OpenBSD and the same
cast is used in a lot of other places where time_t type vars are used.

(closes issue #15656)
Reported by: mvanbaak
Patches:
      2009081100-rescalendarcompilefix.diff.txt uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@212343 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-15 11:36:19 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

Review: https://reviewboard.asterisk.org/r/239/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Kevin P. Fleming 82fb56886e More 'static' qualifiers on module global variables.
The 'pglobal' tool is quite handy indeed :-)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-15 17:34:30 +00:00
Terry Wilson c317d8f444 Add a couple of TODO items so I don't forget
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@198182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 22:21:42 +00:00
Terry Wilson 71a3a2ebf6 Add Calendaring support for Asterisk
This commit add Calendaring support to Asterisk for iCalendar, CalDAV, and MS
Exchange calendars. Exchange support has only been tested on Exchange Server 2k3
and does not support forms-based authentication at this time (patches *very*
welcome). Exchange support is also currently missing the ability to return a
list of a meting's attendees (again, patches are very, very welcome).

Features include:
  Querying a calendar for events over a specific time range
  Checking a calendar's busy status via the dialplan
  Writing calendar events via the dialplan (CalDAV and Exchange only)
  Handling calendar event notifications through the dialplan

(closes issue #14771)
Tested by: lmadsen, twilson, Shivaprakash

Review: https://reviewboard.asterisk.org/r/58


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@197738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 19:57:18 +00:00