Commit Graph

16640 Commits

Author SHA1 Message Date
Russell Bryant 1fef0f63bb Ensure that the sip_pvt properly has its refcount incremented when the scheduler holds
a reference to it for session timer processing.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 20:41:38 +00:00
Sean Bright 0327f37d34 The default in chan_sip for notifyringing is yes, so update the sample
conf to reflect that.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 01:55:04 +00:00
Mark Michelson d521ad9696 * Fixed timeout logic in the dialing API as setting timeouts
had no effect
* Updated dialing API documentation to indicate that timeouts
  are specified in milliseconds
* Added a new timeout argument to the Page application. If time
  expires, any endpoints which have not answered will be hung up.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 20:05:46 +00:00
Terry Wilson 5fe37e47c6 Recent CDR fixes moved execution of the 'h' exten into the bridging code, so variables that were set after ast_bridge_call was called would not show up in the 'h' exten. Added a callback function to handle setting variables, etc. from w/in the bridging code. Calls back into a nested function within the function calling ast_bridge_call
(closes issue #13793)
Reported by: greenfieldtech


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 18:55:33 +00:00
Tilghman Lesher 46abb39ca2 Failover for func_odbc, allowing an INSERT query to be performed when the UPDATE query initially
affects 0 rows.
(closes issue #13083)
 Reported by: Corydon76
 Patches: 
       20081031__bug13083.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 17:18:49 +00:00
Tilghman Lesher 44b484195e Merged revisions 153114 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r153114 | tilghman | 2008-10-31 11:30:32 -0500 (Fri, 31 Oct 2008) | 3 lines
  
  Turn off qualify on uncached realtime peers.
  (Closes issue #13383)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 16:35:21 +00:00
Russell Bryant 511ce6b2bf Use the ast_str API call to reset the string instead of manually editing its internals
(closes issue #13816)
Reported by: eliel
Patches: 
      channel.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-31 09:31:10 +00:00
Sean Bright b018f80119 Merged revisions 152992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152992 | seanbright | 2008-10-30 16:58:24 -0400 (Thu, 30 Oct 2008) | 2 lines

The -I argument to aclocal needs a space before the include directory name.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 20:59:17 +00:00
Russell Bryant d61cc3e1f6 Add a todo for a new timing API implementation that would work for Linux systems
as of kernel 2.6.25 and glibc 2.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 20:46:17 +00:00
Tilghman Lesher 1132628748 Merged revisions 152958 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152958 | tilghman | 2008-10-30 15:33:28 -0500 (Thu, 30 Oct 2008) | 3 lines
  
  Cannot join detached threads.  See http://www.opengroup.org/onlinepubs/000095399/functions/pthread_join.html
  (Closes issue #13400)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 20:35:46 +00:00
Tilghman Lesher 33f0058029 Merged revisions 152922 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152922 | tilghman | 2008-10-30 14:43:38 -0500 (Thu, 30 Oct 2008) | 6 lines
  
  Unlock before returning, when extension doesn't exist.
  (closes issue #13807)
   Reported by: eliel
   Patches: 
         chan_local.c.patch uploaded by eliel (license 64)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:45:52 +00:00
Russell Bryant 19f1e7e578 Fix the sip_peer reference count with respect to scheduler entries for
scheduling peer pokes, and scheduling peer poke expirations.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152920 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:40:15 +00:00
Russell Bryant 46a8b1deed Fix the sip_peer reference count with respect to scheduler entries for
registration expirations.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152915 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:35:36 +00:00
Russell Bryant 694dd34413 Fix a bug in AST_SCHED_REPLACE_UNREF(). The reference count of the object
_must_ be increased before creating the scheduler entry.  Otherwise, you
create a race condition where the reference count may hit zero and the
object can disappear out from under you.  This could also would have
incorrectly decreased the reference count in the case that the scheduler
add failed.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152887 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:28:06 +00:00
Mark Michelson c0b9b259ca I just noticed this construct and thought it was
silly to have a bunch of case statements with duplicated
code in each case. Instead, just use the built-in fallthrough
capability of case statements and reduce the code to
a single instance



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:23:16 +00:00
Russell Bryant 3d5b3249a8 Modify the documentation of the sip_registry struct
- Remove a comment that says that the monitor thread is the only one that
   ever touches these objects.  This is no longer the case with TCP.  Also,
   I would eventually like to get the scheduler in its own thread, so this
   is just a poor assumption to make.
 - Note that reference counting of these objects with respect to scheduler
   entries is not complete.  There are some leaked references when deleting
   scheduler entries.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:21:53 +00:00
Russell Bryant be467d0cea - spaces to tabs
- add some braces
 - remove unnecessary cast


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 19:18:16 +00:00
Kevin P. Fleming 85f78531ce Merged revisions 152811 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152811 | kpfleming | 2008-10-30 11:53:48 -0500 (Thu, 30 Oct 2008) | 3 lines
  
  instead of comparing the string pointer to 0, let's compare the value that was actually parsed out of the string (found by sparse)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:54:29 +00:00
Kevin P. Fleming 4c83309c54 try to get this committed before the buildbot complains about a broken tree
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:53:11 +00:00
Kevin P. Fleming 10d36d9f34 fix a few small things found by using sparse
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:49:02 +00:00
Mark Michelson de90c84b1a After seeing another problem in #asterisk stemming from
the low default value of featuredigittimeout, I decided it
was high time to change it. I have changed the default to
2000 ms based on a suggestion from Leif Madsen.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 16:38:19 +00:00
Tilghman Lesher 48d17a76d0 Set up an example stdexten that preserves the original context and extension in
the CDR.
(Related to issue #13799)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 04:26:34 +00:00
Tilghman Lesher 77060afdac Pay attention to the searchcontexts entry in voicemail.conf (related to AST-125)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 02:08:02 +00:00
Tilghman Lesher fa06ce2e6c Track down and fix annoying lock errors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 00:45:47 +00:00
Mark Michelson 5652a7b81e If there was no named defined in a voicemail.conf mailbox
entry, then app_directory would crash when attempting to
read that entry from the file. We now check for the NULL
or empty string properly so that there will be no crash.

(closes issue #13804)
Reported by: bluecrow76



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 20:53:53 +00:00
Steve Murphy d736ac2b19 Merged revisions 152538 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152538 | murf | 2008-10-28 23:19:04 -0600 (Tue, 28 Oct 2008) | 14 lines

A little documentation cross-ref between features and
dial and queue... I wasted some time (stupidly) trying
to get the one-touch parking stuff working, because it
didn't occur to me that I had to also have the corresponding
options in the dial command! Duh! (In all this time, I never
set this up before!)
So, to keep some poor fool from suffering the same fate,
I made the features.conf.sample file mention the corresponding
opts in dial/queue; and the docs for dial/app specifically
mention the corresponding decls in the feature.conf file.

I hope this doesn't spoil some vast, eternal plan...


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:47:13 +00:00
Russell Bryant 0dbd863733 Merged revisions 152539 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152539 | russell | 2008-10-29 00:23:51 -0500 (Wed, 29 Oct 2008) | 7 lines

Fix an incorrect usage of sizeof()

(closes issue #13795)
Reported by: andrew53
Patches:
	chan_sip_sizeof.patch uploaded by andrew53 (license 519)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:34:26 +00:00
Steve Murphy 6fad66dfb3 Merged revisions 152535 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines

The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:01:00 +00:00
Tilghman Lesher c7367e26be Merged revisions 152463 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152463 | tilghman | 2008-10-28 17:32:34 -0500 (Tue, 28 Oct 2008) | 3 lines
  
  Quoting in the wrong direction
  (Fixes AST-107)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 22:33:40 +00:00
Doug Bailey d6d43d1061 Add more polycom firmware files to static mapping
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 22:26:35 +00:00
Tilghman Lesher e9d96775ad Only re-add the io port if it was closed, otherwise reload causes a memory
leak.
(closes issue #13785)
 Reported by: eliel
 Patches: 
       chan_mgcp.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 21:38:26 +00:00
Tilghman Lesher dd049d429d Merged revisions 152368 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152368 | tilghman | 2008-10-28 12:04:56 -0500 (Tue, 28 Oct 2008) | 8 lines
  
  Reset all DIAL variables back to blank, in case Dial is called multiple times
  per call (which could otherwise lead to inconsistent status reports).
  (closes issue #13216)
   Reported by: ruddy
   Patches: 
         20081014__bug13216.diff.txt uploaded by Corydon76 (license 14)
   Tested by: ruddy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-28 17:07:39 +00:00
Jeff Peeler 33f576f1a1 Merged revisions 152286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152286 | jpeeler | 2008-10-27 18:28:49 -0500 (Mon, 27 Oct 2008) | 2 lines

Buffer policy setting for half is not needed.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 23:31:39 +00:00
Tilghman Lesher ae991d086e Merged revisions 152215 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r152215 | tilghman | 2008-10-27 16:32:00 -0500 (Mon, 27 Oct 2008) | 6 lines
  
  Inherit ALL elements of CallerID across a local channel.
  (closes issue #13368)
   Reported by: Peter Schlaile
   Patches: 
         20080826__bug13368.diff.txt uploaded by Corydon76 (license 14)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 21:34:04 +00:00
Tilghman Lesher 45b7b39c22 Set ARGC in subroutines with the number of arguments passed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 16:44:55 +00:00
Tilghman Lesher 4ee45f5309 Oops, only delete the ARG variables once upon release. The following section
would have removed them again (removing variables from 2 stack frames, instead
of just one).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 16:24:11 +00:00
Jason Parker b40220784f Remove options argument parsing/syntax (it isn't used any longer)
(closes issue #13789)
Reported by: IgorG
Patches:
      app_transfer.c.diff uploaded by IgorG (license 20)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-27 16:03:12 +00:00
Sean Bright eaf647bac2 Merged revisions 152059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152059 | seanbright | 2008-10-26 16:23:36 -0400 (Sun, 26 Oct 2008) | 7 lines

Since passing \0 as the second argument to strchr is valid (and will
match the trailing \0 of a string) we need to check that first, otherwise
we end up with incorrect results.  Fix suggested by reporter.

(closes issue #13787)
Reported by: meitinger

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 20:25:08 +00:00
Olle Johansson 0fdde26109 Trying to fix the user/peer matching correctly. This will need some testing before
getting merged into 1.6.1


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 10:23:01 +00:00
Olle Johansson 9137733e11 Moving more variables to the sip_cfg structure, as I have some future ideas for the usage of that structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 09:45:17 +00:00
Olle Johansson 31a9f1e6f0 Doxygen changes and some formatting.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-26 09:19:19 +00:00
Russell Bryant 316f3897a8 Merged revisions 151905 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r151905 | russell | 2008-10-25 05:59:02 -0500 (Sat, 25 Oct 2008) | 8 lines

Move AMI initialization to occur after loading modules.  This prevents a
deadlock when someone tries to initiate a module reload from the AMI just
as Asterisk is starting.

(closes issue #13778)
Reported by: hotsblanc
Fix suggested by hotsblanc

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-25 11:02:11 +00:00
Terry Wilson c74e85a23a allow to compile under --enable-dev-mode (gcc didn't actually complain when I was using ccache...)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 21:27:35 +00:00
Terry Wilson cee9678d82 Blocked revisions 151763 via svnmerge
........
  r151763 | twilson | 2008-10-23 11:04:42 -0500 (Thu, 23 Oct 2008) | 9 lines
  
  Backport fix from 1.6.0 that allows you to set parkedcalltransfers=no|caller|callee|both, but default to both which would be the equivalent of the existing behaviour.
  
  The problem was that if someone parked a call, the callee and caller would both get assigned the builtin transfer feature, which would not only be potentially giving someone the ability to transfer themselves when they shouldn't have it, but would also dissallow reinviting the media off of the call.
  (closes issue #12854)
  	Reported by: davidw
  	Patches: 
  	      parkingfix4.diff.txt uploaded by otherwiseguy
  		  Tested by: davidw, otherwiseguy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 16:09:25 +00:00
Tilghman Lesher 154f9deed2 Clarify documentation, following merge of realtime_update2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 15:54:19 +00:00
Olle Johansson 31e2625a81 Thanks russellb for reminding an old man....
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 15:38:26 +00:00
Olle Johansson 5aa23add8c Adding a small new feature.
Setting _SIPFROMDOMAIN in a channel will set the domain we use for the URI in the outbound call leg.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151739 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 15:30:16 +00:00
Tilghman Lesher a45c3a8729 Simplify some nested functions, as suggested by Russell on -dev
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 15:28:43 +00:00
Doug Bailey 9fe75b494a Add patch to handle how IE7 issues POST requests using Window path spec including backslash delimiters
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-23 15:09:20 +00:00
Tilghman Lesher 107d4284ae Added debugging CLI functions
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@151682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-22 22:11:31 +00:00