Commit Graph

12580 Commits

Author SHA1 Message Date
Russell Bryant
35ea2643d4 Even of the first PING or LAGRQ doesn't get sent because it comes up too soon,
make sure to reschedule so it gets sent later.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 12:30:17 +00:00
Christian Richter
b145e2f8da fixed compile issue when dev-mode is enabled
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119636 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 09:29:21 +00:00
Christian Richter
a3fe7673a9 Added counter for unhandled_bmsg Print, this prevents the logs to be flooded to fast and save CPU in this error scenario. Added 'last_used' element to bc structure, when a bchannel changes from used to free this exact time will be marked in last_used. When a new channel is requested the find_free_chan function will check if the new empty channel was used within the last second, if yes it will search for the next channel, if no it will return this channel. This simple mechanism has prooven to prevent race conditions where the NT and TE tried to allocate the exact same channel at the same time (RELEASE cause: 44).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 08:35:28 +00:00
Russell Bryant
69213c8eb6 Change a debug message to an actual debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 01:06:09 +00:00
Russell Bryant
c6c26f7c34 Fix another typo in documentation
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-02 01:03:22 +00:00
Michiel van Baak
383a1ece6b small typo fix 'retires' => 'retries'
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-01 20:47:55 +00:00
Tilghman Lesher
c9ddda2b1f When joinempty=strict, it only failed on join if there were busy members. If
all members were logged out OR paused, then it (incorrectly) let callers join
the queue.
(closes issue #12451)
 Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 21:17:45 +00:00
Joshua Colp
9f123152fa Fix a bug I found while testing for another issue.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 19:46:37 +00:00
Michiel van Baak
1540ba27c1 dont use a bashism way to check the $VERSION variable.
The rc/init.d scripts, and safe_asterisk work on normal sh now again.
Tested on:
OpenBSD 4.2 (me)
Debian etch (me)
Ubuntu Hardy (me and loloski)
FC9 (loloski)

(closes issue #12687)
Reported by: loloski
Patches:
      20080529-12687-safe_asterisk-fixversion.diff.txt uploaded by mvanbaak (license 7)
	  Tested by: loloski, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 16:44:39 +00:00
Russell Bryant
31d518c8e6 Merged revisions 119237 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r119237 | russell | 2008-05-30 07:49:39 -0500 (Fri, 30 May 2008) | 7 lines

- Instead of only enforcing destination call number checking on an ACK, check
  all full frames except for PING and LAGRQ, which may be sent by older versions
  too quickly to contain the destination call number.
  (As suggested by Tim Panton on the asterisk-dev list)
- Merge changes from team/russell/iax2-frame-race, which prevents PING and LAGRQ
  from being sent before the destination call number is known.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-30 12:55:36 +00:00
Russell Bryant
9a01bdae26 Fix a race condition in channel autoservice. There was still a small window of opportunity
for a DTMF frame, or some other deferred frame type, to come in and get dropped.

(closes issue #12656)
(closes issue #12656)
Reported by: dimas
Patches:
      v3-12656.patch uploaded by dimas (license 88)
	  -- with some modifications by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 22:24:29 +00:00
Russell Bryant
3d461c7cb6 Oddly enough, all of the contents of audiohook.h were in there twice. I have
removed the second copy.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 20:48:33 +00:00
Tilghman Lesher
b2f0add41c Call waiting tone occurs too often, because it's getting serviced by both
subchannels.
(closes issue #11354)
 Reported by: cahen
 Patches: 
       20080512__bug11354.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 20:24:11 +00:00
Russell Bryant
e4f25aab4b - Fix a typo in the argument to Playtones
- use ast_safe_sleep() instead of calling the wait application
(thanks to tilghman for pointing these out!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 19:04:52 +00:00
Russell Bryant
e0c741c5e3 Merged revisions 119008 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r119008 | russell | 2008-05-29 13:45:21 -0500 (Thu, 29 May 2008) | 7 lines

Merge changes from team/russell/iax2-another-fix-to-the-fix

As described in the following post to the asterisk-dev mailing list, only
enforce destination call numbers when processing an ACK.

http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html

(closes issue #12631)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@119009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 18:49:12 +00:00
Russell Bryant
ecc4690b4b - Mark app_milliwatt dependent on res_indications (thanks to jsmith)
- fix a typo in a log message (thanks to qwell)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118961 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:51:29 +00:00
Russell Bryant
e5b9da59e2 Change milliwatt to use the proper tone by default (1004 Hz) instead of 1000 Hz.
An option is there to use 1000 Hz for anyone that might want it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:38:38 +00:00
Tilghman Lesher
ba9f012573 Define also when not DEBUG_THREADS
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:33:01 +00:00
Tilghman Lesher
65808210e9 Add some debugging code that ensures that when we do deadlock avoidance, we
don't lose the information about how a lock was originally acquired.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 17:20:16 +00:00
Steve Murphy
e58b5c63c6 (closes issue #10668)
(closes issue #11721)
(closes issue #12726)
Reported by: arkadia
Tested by: murf

These changes:

1. revert the changes made via bug 10668; 
   I should have known that such changes,
   even tho they made sense at the time,
   seemed like an omission, etc, were actually
   integral to the CDR system via forkCDR.
   It makes sense to me now that forkCDR didn't
   natively end any CDR's, but rather depended
   on natively closing them all at hangup time
   via traversing and closing them all, whether
   locked or not. I still don't completely 
   understand the benefits of setvar and answer
   operating on locked cdrs, but I've seen 
   enough to revert those changes also, and
   stop messing up users who depended on that
   behavior. bug 12726 found reverting the changes
   fixed his changes, and after a long review
   and working on forkCDR, I can see why.
2. Apply the suggested enhancements proposed
   in 10668, but in a completely compatible
   way. ForkCDR will behave exactly as before,
   but now has new options that will allow some
   actions to be taken that will slightly 
   modify the outcome and side-effects of
   forkCDR. Based on conversations I've had 
   with various people, these small tweaks
   will allow some users to get the behavior
   they need. For instance, users executing
   forkCDR in an AGI script will find the
   answer time set, and DISPOSITION set, 
   a situation not covered when the routines
  were first written.
3. A small problem in the cdr serializer
   would output answer and end times even
   when they were not set. This is now 
   fixed.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-29 00:25:28 +00:00
Brett Bryant
3ab48f9299 merge revision 118702 from trunk to 1.4 -- Fixes a bug in chan_iax that uses send_command to poke a peer while a channel is unlocked in some cases, and because it can cause seemingly random failures could be related to some bugs in the tracker...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28 16:10:48 +00:00
Joshua Colp
405dfcb54a Add an option to use the source IP address of RTP as the destination IP address of UDPTL when a specific option is enabled. If the remote side is properly configured (ports forwarded) then UDPTL will flow.
(closes issue #10417)
Reported by: cstadlmann


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-28 14:23:34 +00:00
Joshua Colp
a403fd8ea1 Fix an issue where codec preferences were not set on dialogs that were not authenticated via a user or peer and allow framing to work without rtpmap in the SDP.
(closes issue #12501)
Reported by: slimey


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 19:32:38 +00:00
Tilghman Lesher
1a73396c9d When showing an error message for a command, don't shorten the command output,
as it tends to confuse the user (it's fine for suggesting other commands,
however).
 Reported by: seanbright (on #asterisk-dev)
 Fixed by: me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 19:15:27 +00:00
Mark Michelson
a7f2c5dbf9 Russell noted to me that in the case that separate threads use their
own addressing system, the fix I made for issue 12376 does not guarantee
uniqueness to the datastores' uids. Though I know of no system that works
this way, I am going to change this right now to prevent trying to track
down some future bug that may occur and cause untold hours of debugging
time to track down.

The change involves using a global counter which increases with each new
chanspy_ds which is created. This guarantees uniqueness.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 19:07:26 +00:00
Tilghman Lesher
7ca3880d4e NULL character should terminate only commands back to the core, not log
messages to the console.
(closes issue #12731)
 Reported by: seanbright
 Patches: 
       20080527__bug12731.diff.txt uploaded by Corydon76 (license 14)
 Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118465 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 18:58:09 +00:00
Michiel van Baak
68589940b4 small update to the g() option of app_voicemail to
note that gain changes only work on zap channels right now.

issue #12578 shows it's not clear right now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 17:17:20 +00:00
Mark Michelson
9460de70ef Add a unique id to the datastore allocated in app_chanspy since
it is possible that multiple spies may be listening to the same
channel.

(closes issue #12376)
Reported by: DougUDI
Patches:
      12376_chanspy_uid.diff uploaded by putnopvut (license 60)
Tested by: destiny6628

(closes issue #12243)
Reported by: atis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 16:38:38 +00:00
Tilghman Lesher
0ed598406b Add a note that pbx_config.so is needed for Local channels.
(Closes issue #12671)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-27 15:45:37 +00:00
Tilghman Lesher
0dab692af5 Realtime flag affects construction in multiple ways, so consulting whether
rtcachefriends was set was done too soon (needed to be done inside build_peer,
not just as a flag to build_peer).
Also, fullcontact needed to be reconstructed, because realtime separates the
embedded ';' into multiple fields.
(closes issue #12722)
 Reported by: barthpbx
 Patches: 
       20080525__bug12722.diff.txt uploaded by Corydon76 (license 14)
 Tested by: barthpbx
 (Much of the discussion happened on #asterisk-dev for diagnosing this issue)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-25 16:02:04 +00:00
Jeff Peeler
ac177d4459 Fix a few things I missed to ensure zt_chan_conf structure is not modified in mkintf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 21:21:35 +00:00
Tilghman Lesher
3fcdfbf20f Add format type checking for recently de-inlined function
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 13:18:44 +00:00
Tilghman Lesher
c8e3c498d0 Add information on using the Asterisk console, including tab command line
completion.  (Closes issue #12681)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 12:59:16 +00:00
Russell Bryant
a3d59980ea Don't declare a function that takes variable arguments as inline, because it's
not valid, and on some compilers, will emit a warning.

http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline

(closes issue #12289)
Reported by: francesco_r
Patches by Tilghman, final patch by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@118048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23 12:30:53 +00:00
Tilghman Lesher
2454daba41 Also remove preamble from asynchronous events (reported by jsmith on #asterisk-dev)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117899 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 18:53:53 +00:00
Tilghman Lesher
2691e0d5b0 Take into account the length of delimiters when calculating result string length.
(closes issue #12696)
 Reported by: adomjan
 Patches: 
       func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117809 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22 16:47:03 +00:00
Jeff Peeler
b77e30e6f5 Ensure that passed in zt_chan_conf structure is not modified in mkintf.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 20:11:14 +00:00
Joshua Colp
6627976f63 Apply the autoframing setting to dialogs that do not get matched against a user or peer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 19:38:28 +00:00
Tilghman Lesher
7cf2eecaf6 Revert accidental commit of the last change
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:44:53 +00:00
Tilghman Lesher
0b0f6a1a58 Strip the preamble from the output also when -rx is not being used
(Related to issue #12702)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:40:14 +00:00
Russell Bryant
67634386e9 Don't filter the magic character in the network verboser. It gets filtered
once it reaches the client.
(related to issue #12702, pointed out by tilghman)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:28:46 +00:00
Russell Bryant
2c4b2d92dd 1) Don't print the verbose marker in front of every message from ast_verbose()
being sent to remote consoles.

2) Fix pbx_gtkconsole to filter out the verbose marker.

(related to issue #12702)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:19:34 +00:00
Russell Bryant
8183ebfbcc Don't display the verbose marker for calls to ast_verbose() that do not include
a VERBOSE_PREFIX in front of the message.
(closes issue #12702)
Reported by: johnlange
Patched by me


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 18:11:51 +00:00
Jeff Peeler
e9e2df2283 Pass a pointer for the conf parameter to the function mkintf rather than the whole zt_chan_conf structure.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-21 16:58:40 +00:00
Joshua Colp
b5ac40e980 Use the right pthread lock and condition when waiting.
(closes issue #12664)
Reported by: tomo1657
Patches:
      res_smdi.c.patch uploaded by tomo1657 (license 484)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 16:50:52 +00:00
Tilghman Lesher
c10b6550ea The addition of usleep(2) within ast_assert requires the inclusion of the unistd.h header
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117086 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 16:05:05 +00:00
Joshua Colp
48f4538a8d Make chan_h323 work with pwlib 1.12.0
(closes issue #12682)
Reported by: bamby
Patches:
      pwlib_nopipe.diff uploaded by bamby (license 430)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@117081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 15:22:10 +00:00
Russell Bryant
915e1b570f Avoid access of uninitialized memory. This caused a bunch of crashes for me
while doing load testing of development branch where I'm working on some
performance improvements.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116978 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19 03:44:04 +00:00
Joshua Colp
53061c109f Check to make sure an RTP structure exists before calling ast_rtp_new_source on it.
(closes issue #12669)
Reported by: sbisker


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-16 20:28:11 +00:00
Tilghman Lesher
01f5aee7ac Avoid zombies when the channel exits before the AGI.
(closes issue #12648)
 Reported by: gkloepfer
 Patches: 
       20080514__bug12648.diff.txt uploaded by Corydon76 (license 14)
 Tested by: gkloepfer


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@116466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-14 21:38:09 +00:00