dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

379 Commits

Author SHA1 Message Date
dvossel bc97760a80 app_meetme not setting filename and fileformat correctly for realtime
When app_meetme finds a realtime conference, it doesn't get the filename and fileformat correctly when 'r' is set.  Now app_meetme first checks to see if fileformat and filename are declared in the db, if they're not it checks the .conf file, if its not declared there either it then uses defaults. 

(closes issue #14545)
Reported by: dalbaech
Patches:
	app_meetme-realtime5.patch uploaded by dvossel (license 671)
	Realtime_Conference_Record_workaround.txt uploaded by dalbaech (license 705)
Tested by: dvossel, dalbaech
Review: http://reviewboard.digium.com/r/180/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179972 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-03 22:01:24 +00:00
russell c61c244a9d Merged revisions 179532 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r179532 | russell | 2009-03-02 17:34:13 -0600 (Mon, 02 Mar 2009) | 40 lines

Move ast_waitfor() down to avoid the results of the API call becoming stale.

This call to ast_waitfor() was being done way too soon in this section of code.
Specifically, there was code in between the call to waitfor and the code that
uses the result that puts the channel in autoservice.  By putting the channel
in autoservice, the previous results of ast_waitfor() become meaningless,
as the autoservice thread will do it's own ast_waitfor() and ast_read()
on the channel.

So, when we came back out of autoservice and eventually hit the block of code
that calls ast_read() on the channel, there may not actually be any input on
the channel available.  Even though the previous call to ast_waitfor() in
app_meetme said there was input, the autoservice thread has since serviced
the channel for some period of time.

This bug manifested itself while dvossel was doing some testing of MeetMe in
Asterisk trunk.  He was using the timerfd timing module.  When the code hit
ast_read() erroneously, it determined that it must have been called because of
input on the timer fd, as chan->fdno was set to AST_TIMING_FD, since that was 
the cause of the last legitimate call to ast_read() done by autoservice.  

In this test, an IAX2 channel was calling into the MeetMe conference.  It was
_much_ more likely to be seen with an IAX2 channel because of the way audio
is handled.  Every audio frame that comes in results in a call to
ast_queue_frame(), which then uses ast_timer_enable_continuous() to notify
the channel thread that a frame is waiting to be handled.  So, the chances
of ast_waitfor() indicating that a channel needs servicing due to a timer
event on an IAX2 event is very high.

Finally, it is interesting to note that if a different timing interface was
being used, this bug would probably not be noticed.  When ast_read() is called
and erroneously thinks that there is a timer event to handle, it calls the
ast_timer_ack() function.  The pthread and dahdi timing modules handle the
ack() function being called when there is no event by simply ignoring it.
In the case of the timerfd module, it results in a read() on the timer fd
that will block forever, as there is no data to read.  This caused Asterisk
to lock up very quickly.

Thanks to dvossel and mmichelson for the fun debugging session.  :-)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179533 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 23:36:38 +00:00
russell cf8ebc25c4 Re-add 'o' option to MeetMe, reverting rev 62297.
Enabling this option by default proved to be a bad idea, as the talker detection
is not very reliable.  So, make it optional again, and off by default.

(issue #13801)
Reported by: justdave


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177101 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-18 19:12:49 +00:00
mmichelson c2643d5a84 Merged revisions 176249,176252 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r176249 | mmichelson | 2009-02-16 15:34:27 -0600 (Mon, 16 Feb 2009) | 14 lines
  
  Open the DAHDI pseudo device and set it to be nonblocking atomically
  
  Apparently on FreeBSD, attempting to set the O_NONBLOCKING flag separately
  from opening the file was causing an "inappropriate ioctl for device" error.
  While I cannot fathom why this would be happening, I certainly am not opposed
  to making the code a bit more compact/efficient if it also fixes a bug.
  
  (closes issue #14482)
  Reported by: ys
  Patches:
        meetme.patch uploaded by ys (license 281)
  Tested by: ys
........
  r176252 | mmichelson | 2009-02-16 15:39:21 -0600 (Mon, 16 Feb 2009) | 3 lines
  
  Remove unused variable and make dev-mode compilation happy
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176253 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-16 21:40:40 +00:00
file 76e8d040f9 Merged revisions 170147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r170147 | file | 2009-01-22 12:50:54 -0400 (Thu, 22 Jan 2009) | 4 lines
  
  If we are unable to request a DAHDI pseudo channel and we are using the user introduction without review option make sure it gets unset so other code does not blindly assume a DAHDI pseudo channel exists.
  (closes issue #14282)
  Reported by: cheesegrits
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@170148 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-22 16:52:21 +00:00
seanbright e9b322f930 Add a missing unlock and properly handle the 'maxusers' setting on MeetMe
conferences.  We were using the 'user number' field to compare against the
maximum allowed users, which works assuming users with lower user numbers
didn't leave the conference.

(closes issue #14117)
Reported by: sergedevorop
Patches:
      20090114__bug14117-2.diff.txt uploaded by seanbright (license 71)
Tested by: sergedevorop


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168705 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15 15:33:18 +00:00
mmichelson dc62f16683 Fix the build
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165326 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17 21:29:30 +00:00
mmichelson 59ba2416ac Merged revisions 165255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines

Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@165318 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17 21:17:20 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
russell 19e617c2d7 Merged revisions 162286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r162286 | russell | 2008-12-09 14:57:35 -0600 (Tue, 09 Dec 2008) | 9 lines

Fix an issue where callers on an incoming call on an SLA trunk would not hear ringback.

We need to make sure that we don't start writing audio to the trunk channel until we're
actually ready to answer it.  Otherwise, the channel driver will treat it as inband
progress, even though all they are getting is silence.

(closes issue #12471)
Reported by: mthomasslo

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@162291 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09 20:59:54 +00:00
jpeeler da605bfc3c Merged revisions 157365 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r157365 | jpeeler | 2008-11-18 13:13:33 -0600 (Tue, 18 Nov 2008) | 6 lines

(closes issue #13899)
Reported by: akkornel

This fix is the result of a bug fix in ast_app_separate_args r124395. If an argument does not exist it should always be set to a null string rather than a null pointer.


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157366 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-18 19:16:00 +00:00
eliel 20313cb12e Introduce XML documentation for:
- MeetMe()
  - MeetMeCount()
  - MeetMeChannelAdmin()
  - MeetMeAdmin()
  - SLAStation()
  - SLATrunk()

- Add an attribute to optionlist 'hasparams' with the same functionality as the one
we have in <parameter> and <argument> (the DTD was updated)
- Fix a leak when getting an attribute while parsing an <optionlist>.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156575 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-13 15:46:06 +00:00
tilghman e7bb3059ca Merged revisions 156294 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r156294 | tilghman | 2008-11-12 13:26:45 -0600 (Wed, 12 Nov 2008) | 6 lines
  
  If the SLA thread is not started, then reload causes a memory leak.
  (closes issue #13889)
   Reported by: eliel
   Patches: 
         app_meetme.c.patch uploaded by eliel (license 64)
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156295 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 19:28:22 +00:00
jpeeler b22f3e95b1 Merged revisions 156289 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r156289 | jpeeler | 2008-11-12 13:10:12 -0600 (Wed, 12 Nov 2008) | 3 lines

For whatever reason, gcc only warned me about the possible use of an uninitialized variable when compiling 1.6.1. 


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156290 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 19:11:15 +00:00
jpeeler 185eb10047 Merged revisions 156178 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r156178 | jpeeler | 2008-11-12 11:53:44 -0600 (Wed, 12 Nov 2008) | 8 lines

(closes issue #13173)
Reported by: pep

This change adds an announce_thread responsible for playing announcements to an existing conference. This allows all announcing to be immediately stopped if necessary but more importantly allows other threads that need to play something to not block. There are multiple benefits to this, but the actual bug is for solving the scenario for a channel to be unusable after hang up for the entire duration of the parting announcement. The parting announcement can be extremely long depending on what the user recorded upon joining the conference.

Reviewed by Russell on Review Board:
http://reviewboard.digium.com/r/25/

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@156228 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-12 18:32:46 +00:00
tilghman ee7ab2be0d Fix option handling code.
(closes issue #11040)
 Reported by: DEA
 Patches: 
       rt-meetme-flag-fixes-v2.txt uploaded by DEA (license 3)
       with additional fixes by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150384 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 04:28:13 +00:00
jpeeler 7600519c4d Initialize character arrays as they are not guaranteed to be set.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@150309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-17 00:14:19 +00:00
mmichelson a8b24b1449 Some small tweaks regarding realtime conference announcements.
(closes issue #13522)
Reported by: DEA
Patches:
      meetme-rt-fixes.txt uploaded by DEA (license 3)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147714 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08 22:32:37 +00:00
seanbright fffaf0b978 Keep up with shadow warnings. One day I'll actually enable this in the Makefile.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147457 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08 12:15:06 +00:00
mvanbaak fc91a9303f fix the 'meetme list', 'meetme list concise', 'meetme list $confno' and 'meetme list $confno concise' CLI commands
(closes issue #13586)
Reported by: john8675309
Help and feedback from eliel, thanks!


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-02 18:02:26 +00:00
mvanbaak 3b61ce65e4 make this compile under devmode again
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145842 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-02 16:42:30 +00:00
tilghman 0c8cf106ef Add schedule extensions to app_meetme. In addition, the reporter found a
problem within strptime(3), which we are correcting here with ast_strptime().
(closes issue #11040)
 Reported by: DEA
 Patches: 
       20080910__bug11040.diff.txt uploaded by Corydon76 (license 14)
 Tested by: DEA


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-01 23:02:25 +00:00
mvanbaak b6fa2c3b98 Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28 23:32:14 +00:00
tilghman 95bae85759 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
when a file is invalid from when a file is missing.  This is most important when
we have two configuration files.  Consider the following example:

Old system:
sip.conf     users.conf     Old result               New result
========     ==========     ==========               ==========
Missing      Missing        SIP doesn't load         SIP doesn't load
Missing      OK             SIP doesn't load         SIP doesn't load
Missing      Invalid        SIP doesn't load         SIP doesn't load
OK           Missing        SIP loads                SIP loads
OK           OK             SIP loads                SIP loads
OK           Invalid        SIP loads incompletely   SIP doesn't load
Invalid      Missing        SIP doesn't load         SIP doesn't load
Invalid      OK             SIP doesn't load         SIP doesn't load
Invalid      Invalid        SIP doesn't load         SIP doesn't load

So in the case when users.conf doesn't load because there's a typo that
disrupts the syntax, we may only partially load users, instead of failing with
an error, which may cause some calls not to get processed.  Worse yet, the old
system would do this with no indication that anything was even wrong.

(closes issue #10690)
 Reported by: dtyoo
 Patches: 
       20080716__bug10690.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12 23:30:03 +00:00
seanbright 842faddb76 More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10 14:45:25 +00:00
tilghman b81d546b7b Janitor ast_str project
(closes issue #13058)
 Reported by: pputman
 Patches: 
       app_meetme_aststr2.patch uploaded by pputman (license 81)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136141 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06 17:33:48 +00:00
kpfleming c5d4094208 build against the now-typedef-free dahdi/user.h, and remove some #ifdefs for features that will always be present in DAHDI
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134260 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-29 22:22:13 +00:00
mmichelson f76a823f67 merging the zap_and_dahdi_trunk branch up to trunk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134050 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-28 16:00:19 +00:00
bbryant 0110f8c87a Janitor project to convert sizeof to ARRAY_LEN macro.
(closes issue #13002)
Reported by: caio1982
Patches:
      janitor_arraylen5.diff uploaded by caio1982 (license 22)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129045 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-08 16:40:28 +00:00
kpfleming ae1eb91abe Merged revisions 125132 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@125138 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-25 23:05:28 +00:00
jpeeler 490730a6b3 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122234 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 17:27:55 +00:00
tilghman 1a1d9a6c13 Merged revisions 122137 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r122137 | tilghman | 2008-06-12 10:18:39 -0500 (Thu, 12 Jun 2008) | 8 lines

Flipflop the sections for two options, since the section for 'X' (exit context)
may otherwise absorb keypresses meant for 's' (admin/user menu).
(closes issue #12836)
 Reported by: blitzrage
 Patches: 
       20080611__bug12836.diff.txt uploaded by Corydon76 (license 14)
 Tested by: blitzrage

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122174 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 15:26:07 +00:00
tilghman e8556a10e2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121367 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09 22:51:59 +00:00
tilghman 13366a3a41 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120789 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05 19:07:27 +00:00
mvanbaak c1210321e7 - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause
- make data member of the ast_frame struct a named union instead of a void

Recently the ast_queue_hangup function got a new parameter, the hangupcause
Feedback came in that this is no good and that instead a new function should be created.
This I did.

The hangupcause was stored in the seqno member of the ast_frame struct. This is not very
elegant, and since there's already a data member that one should be used.
Problem is, this member was a void *.
Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone
wants to store another type in there in the future.

This commit is so massive, because all ast_frame.data uses have to be
altered to ast_frame.data.data

Thanks russellb and kpfleming for the feedback.

(closes issue #12674)
Reported by: mvanbaak


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@117802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22 16:29:54 +00:00
tilghman 712c72b0df Lock around variables retrieved, and copy the values, if they stay persistent,
since another thread could remove them.
(closes issue #12541)
 Reported by: snuffy
 Patches: 
       bug_12156_apps.diff uploaded by snuffy (license 35)
       Several additional changes by me


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114904 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-30 19:21:04 +00:00
tilghman 0d0ec49ca5 Fix DST calculation, and fix bug in calculation of whether conf has started yet or not
(Closes issue #12292)
 Reported by: DEA
 Patches: 
       app_meetme-rt-dst-sched-fix.txt uploaded by DEA (license 3)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114617 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-24 19:24:31 +00:00
file 4fabc3fc02 Add MEETME_INFO dialplan function that allows querying various properties of a Meetme conference.
(closes issue #11691)
Reported by: junky
Patches:
      meetme_info.patch uploaded by jpeeler (license 325)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114261 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-18 18:15:11 +00:00
tilghman 43728f9a34 Use ast_mkdir instead of mkdir
(Closes issue #12430)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114096 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-13 14:35:43 +00:00
file 20457e162e Merged revisions 114029 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114029 | file | 2008-04-10 12:09:04 -0300 (Thu, 10 Apr 2008) | 6 lines

Create the directory where name recordings will go if it does not exist.
(closes issue #12311)
Reported by: rkeene
Patches:
      12311-mkdir.diff uploaded by qwell (license 4)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114030 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-10 15:10:47 +00:00
russell 10764cd3db Remove astobj.h from some places where it wasn't needed
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110270 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-20 17:45:29 +00:00
russell 051ad7a0ea Merged revisions 110163 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110163 | russell | 2008-03-19 17:57:59 -0500 (Wed, 19 Mar 2008) | 5 lines

Fix a bug where when calls on the trunk side hang up while on hold, the state
is not properly reflected.

(closes issue #11990, reported by anakaoka, patched by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110164 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-19 22:58:33 +00:00
twilson 9e8ebe6a94 Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not
actual problems, per se.  I also added format attributes to any printf wrapper functions I found that didn't have them.  -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18 15:43:34 +00:00
file 82da51173a Merged revisions 107637 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107637 | file | 2008-03-11 15:47:33 -0300 (Tue, 11 Mar 2008) | 4 lines

Add an additional check for setting conference parameter when using the marked user options. It was possible for it to return to a no listen/no talk state if a masquerade happened.
(closes issue #12136)
Reported by: aragon

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107638 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 18:48:59 +00:00
russell c3dc79c9e3 Merged revisions 106895 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r106895 | russell | 2008-03-07 16:51:23 -0600 (Fri, 07 Mar 2008) | 2 lines

Only start the SLA thread if SLA has actually been configured.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106896 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 22:52:46 +00:00
murf 2be361fbb9 (closes issue #6002)
Reported by: rizzo
Tested by: murf

Proposal of the changes to be made, and then an announcement of how they were accomplished:

http://lists.digium.com/pipermail/asterisk-dev/2008-February/032065.html

and:

http://lists.digium.com/pipermail/asterisk-dev/2008-March/032124.html

Here is a recap, file by file, of what I have done:

pbx/pbx_config.c
pbx/pbx_ael.c

All funcs that were passed a ptr to the context list, now will ALSO be passed a hashtab ptr to the same set.
Why? because (for the time being), the dialplan is stored in both, to facilitate a quick, low-cost move to
hash-tables to speed up dialplan processing. If it was deemed necessary to pass the context LIST, well, it
is just as necessary to have the TABLE available. This is because the list/table in question might not be
the global one, but temporary ones we would use to stage the dialplan on, and then swap into the global
position when things are ready.

We now have one external function for apps to use, "ast_context_find_or_create()" instead of the pre-existing
"find" and "create", as all existing usages used both in tandem anyway.

pbx_config, and pbx_ael, will stage the reloaded dialplan into local lists and tables, and 
then call merge_contexts_and_delete, which will merge (now) existing contexts and 
priorities from other registrars into this local set by copying them. Then, merge_contexts_and_delete will
lock down the contexts, swap the lists and tables, and unlock (real quick), and then 
destroy the old dialplan.



chan_sip.c
chan_iax.c
chan_skinny.c

All the channel drivers that would add regcontexts now use the ast_context_find_or_create now.

chan_sip also includes a small fix to get rid of warnings about removing priorities that never got entered.


apps/app_meetme.c
apps/app_dial.c
apps/app_queue.c

All the apps that added a context/exten/priority were also modified to use ast_context_find_or_create instead.


include/asterisk/pbx.h

ast_context_create() is removed. Find_or_create_ is the new method.
ast_context_find_or_create()  interface gets the hashtab added.
ast_merge_contexts_and_delete() gets the local hashtab arg added.
ast_wrlock_contexts_version() is added so you can detect if someone else got a writelock between your readlocking and writelocking.
ast_hashtab_compare_contexts was made public for use in pbx_config/pbx_ael
ast_hashtab_hash_contexts was in like fashion make public.


include/asterisk/pval.h

ast_compile_ael2() interface changed to include the local hashtab table ptr.


main/features.c

For the sake of the parking context, we use ast_context_find_or_create().



main/pbx.c

I changed all the "tree" names to "table" instead. That's because the original
implementation was based on binary trees. (had a free library). Then I moved
to hashtabs. Now, the names move forward too.

refcount field added to contexts, so you can keep track of how many modules
wanted this context to exist.

Some log messages that are warnings were inflated from LOG_NOTICE to LOG_WARNING.

Added some calls to ast_verb(3,...) for debug messages

Lots of little mods to ast_context_remove_extension2, which is now excersized in ways
it was not previously; one definite bug fixed.

find_or_create was upgraded to handle both local lists/tables as well as the globals.

context_merge() was added to do the per-context merging of the old/present contexts/extens/prios into the new/proposed local list/tables

ast_merge_contexts_and_delete() was heavily modified.

ast_add_extension2() was also upgraded to handle changes. 

the context_destroy() code was re-engineered to handle the new way of doing things,
by exten/prio instead of by context.



res/ael/pval.c
res/ael/ael.tab.c
res/ael/ael.tab.h
res/ael/ael.y
res/ael/ael_lex.c
res/ael/ael.flex
utils/ael_main.c
utils/extconf.c
utils/conf2ael.c
utils/Makefile

Had to change the interface to ast_compile_ael2(), to include the hashtab ptr.
This ended up involving several external apps.  The main gotcha was I had to 
include lock.h and hashtab.h in several places.


As a side note, I tested this stuff pretty thoroughly, I replicated the problems
originally reported by Luigi, and made triply sure that reloads worked, and everything
worked thru "stop gracefully". I found a and fixed a few bugs as I was merging into
trunk, that did not appear in my tests of bug6002.

How's this for verbose commit messages?




git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106757 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07 18:57:57 +00:00
tilghman 198829f2db Create a centralized configuration option for silencethreshold
(closes issue #11236)
 Reported by: philipps
 Patches: 
       20080218__bug11236.diff.txt uploaded by Corydon76 (license 14)
 Tested by: philipps


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106072 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-05 16:23:44 +00:00
file 509fcae480 Merged revisions 103324 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r103324 | file | 2008-02-11 18:09:07 -0400 (Mon, 11 Feb 2008) | 4 lines

If entering a conference with the 'w' option ensure that we can't listen or speak until the marked user appears.
(closes issue #11835)
Reported by: alanmcmillan

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103325 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-11 22:10:55 +00:00
file b43ac58b68 Update documentation.
(closes issue #11763)
Reported by: IgorG
Patches:
      docupd.v1.diff uploaded by IgorG (license 20)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98695 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-14 14:33:17 +00:00
file 3af5eebefc Merged revisions 97450 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97450 | file | 2008-01-09 12:11:17 -0400 (Wed, 09 Jan 2008) | 6 lines

Don't do conferencing totally in Zaptel if Monitor is running on the channel.
(closes issue #11709)
Reported by: BigJimmy
Patches:
      patch-meetmerec uploaded by BigJimmy (license 371)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97451 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09 16:13:24 +00:00