Commit Graph

13251 Commits

Author SHA1 Message Date
Mark Michelson
60c9cae6d6 Revert this cast to long. Using time_t here causes build failures on a
FreeBSD 32-bit build.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163084 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:46:22 +00:00
Mark Michelson
ef56f0dbd4 Fix a potential crash due to unsafe datastore handling.
This patch also contains a conversion from using long to time_t
for representing times for a queue, as well as some whitespace
fixes.

(closes issue #14060)
Reported by: nivek
Patches:
      datastore_fixup.patch.corrected uploaded by nivek (license 636)
	  with slight modification from me
Tested by: nivek



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@163080 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-11 16:24:43 +00:00
Jeff Peeler
dda2438b03 Oops, inverted logic for a strcasecmp check. Pointed out by mmichelson, thanks!
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 22:52:51 +00:00
Jeff Peeler
90efa9de78 (closes issue #13229)
Reported by: clegall_proformatique

Ensure that moh_generate does not return prematurely before local_ast_moh_stop is called. Also, the sleep in mp3_spawn now only occurs for http locations since it seems to have been added originally only for failing media streams.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162874 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 22:04:18 +00:00
Joshua Colp
f7521fb0db Fix subscription based MWI up a bit. We only want to put sip: at the beginning of the URI if it is not already there and revert code to ignore destination check if subscribing for MWI.
(closes issue #12560)
Reported by: vsauer
Patches:
      patch001.diff uploaded by ramonpeek (license 266)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 19:01:17 +00:00
Joshua Colp
ee47cfddbe When a SIP peer unregisters set the expiry time back to 0 so that the 200 OK contains an expires of 0.
(closes issue #13599)
Reported by: hjourdain
Patches:
      chan_sip.c.diff uploaded by hjourdain (license 583)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 17:50:43 +00:00
Steve Murphy
8f25d5a5c2 (closes issue #14022)
Reported by: wetwired
Tested by: murf

I checked, and I added a mod to the trunk version
of Asterisk that would make it 8-bit transparent
on 27 Nov 2007, but I made no such updates to
1.4. My best guess is that 1.4 was released, and
it was not appropriate to commit an enhancement.

But I'm going to add the same fixes to 1.4 now,
for the following reasons:
1. wetwired is correct; 1.4 is **mostly** 8-bit
   transparent now. This is because the lexical
   token forming rules use . in most 'word'
   state continuances.  It's just the beginning
   of a 'word' that is picky.
2. Accepting 8-bit chars in some places and
   not others leads to bug reports like this.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 16:45:01 +00:00
Mark Michelson
4cad4bff2c Update to stringfield handling so that side-effects on
parameters are not evaluated multiple times.

An example where this caused a problem was in chan_sip.c, with
the line

  ast_string_field_set(p, fromdomain, ++fromdomain);

This patch was originally uploaded to issue #13783 by
jamessan. While the issue was closed for other reasons, this
patch is valid and fixes a separate problem, and is thus
being committed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 16:44:37 +00:00
Mark Michelson
d18bb8dc44 Revert fix for issue 13570. It has caused more problems than
it helped to fix.

(closes issue #13783)
Reported by: navkumar


(closes issue #14025)
Reported by: ffs



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 16:24:56 +00:00
Mark Michelson
597b4d414a Add missing documentation to misdn.txt
(closes issue #14052)
Reported by: festr
Patches:
      misdn.txt.patch uploaded by festr (license 443)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 16:10:25 +00:00
Joshua Colp
a6edd8ba5f Increment the sequence number on the end packets for RFC2833. After reading the RFC some more and doing some testing I agree with this change.
(closes issue #12983)
Reported by: vt
Patches:
      dtmf_inc_seqnum_on_end_pkts.diff uploaded by vt (license 520)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162653 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-10 16:05:29 +00:00
Tilghman Lesher
8a7982c1ff Oops, should be "tz", not "zonetag".
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162463 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 23:08:53 +00:00
Russell Bryant
c2446000d9 Remove the test_for_thread_safety() function completely.
The test is not valid.  Besides, if we actually suspected that recursive
mutexes were not working, we would get a ton of LOG_ERROR messages when
DEBUG_THREADS is turned on.

(inspired by a discussion on the asterisk-dev list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 22:17:39 +00:00
Tilghman Lesher
5134bb74a9 We appear to have documented tz= in the [general] section of voicemail.conf,
without actually having implemented it.  Oops.
(Reported by Olivier on the -users list)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 21:53:25 +00:00
Joshua Colp
a7520ee4bf Add 'down' as a valid state for directed call pickup. This creeps up when we receive session progress when dialing a device and not ringing.
(closes issue #14005)
Reported by: ddl


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 21:14:29 +00:00
Russell Bryant
5d985ce022 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: https://origsvn.digium.com/svn/asterisk/branches/1.4@162286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:57:35 +00:00
Joshua Colp
7eeb7f7493 Fix double declaration of 'x' on the PPC platform.
(closes issue #14038)
Reported by: ffloimair


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:44:32 +00:00
Mark Michelson
b234c024a0 If we fail to start a thread for the pbx to run in, we need to
be sure to decrease the number of active calls on the system.

This fix may relate to ABE-1713, but it is not certain yet.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162265 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:28:44 +00:00
Steve Murphy
8582a3e924 In discussion with seanbright on #asterisk-dev, I have added a default rule, and an option to suppress the default rule from being generated in the flex output, for the sake of those OS's where they didn't tweak flex's ECHO macro, and the compiler doesn't like it. The regressions are OK with this.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 20:20:54 +00:00
Joshua Colp
114c659195 Make sure that the timestamp for DTMF is not the same as the previous voice frame and do not send audio when transmitting DTMF as this confuses some equipment.
(closes issue #13209)
Reported by: ip-rob
Patches:
      13209.diff uploaded by file (license 11)
Tested by: ip-rob, bujones


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162204 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 19:47:07 +00:00
Joshua Colp
7209e0e173 Take video into account when early bridging RTP.
(closes issue #13535)
Reported by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162188 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 19:06:14 +00:00
Steve Murphy
fd31201630 Previous fix used ast_malloc and ast_copy_string and messed up the standalone stuff. Fixed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 18:13:39 +00:00
Tilghman Lesher
cbbd837a34 For some reason, after a distclean, gcc started returning
'value computed is not used'.  Fixing (for --enable-dev-mode).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 17:07:50 +00:00
Russell Bryant
97bb6d4c65 Allow DISA to handle extensions that start with #.
(closes issue #13330)
Reported by: jcovert


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162014 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 16:46:53 +00:00
Steve Murphy
a36a0d7dbd (closes issue #14019)
Reported by: ckjohnsonme
Patches:
      14019.diff uploaded by murf (license 17)
Tested by: ckjohnsonme, murf

This crash was the result of a few small errors that
would combine in 64-bit land to result in a crash.

32-bit land might have seen these combine to mysteriously
drop the args to an application call, in certain
circumstances.

Also, in trying to find this bug, I spotted
a situation in the flex input, where, in passing
back a 'word' to the parser, it would allocate
a buffer larger than necessary. I changed the
usage in such situations, so that strdup was
not used, but rather, an ast_malloc, followed
by ast_copy_string.

I removed a field from the pval struct, in
u2, that was never getting used, and set in
one spot in the code. I believe it was an
artifact of a previous fix to make switch
cases work invisibly with extens.

And, for goto's I removed a '!' from
before a strcmp, that has been there
since the initial merging of AEL2, that
might prevent the proper target of a 
goto from being found. This was pretty
harmless on its own, as it would just
louse up a consistency check for users.

Many thanks to ckjohnsonme for providing
a simplified and complete set of information
about the bug, that helped considerably in
finding and fixing the problem.

Now, to get aelparse up and running again
in trunk, and out of its "horribly broken" state,
so I can run the regression suite!



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@162013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 16:31:55 +00:00
Russell Bryant
53c30bd359 Fix a problem with GROUP() settings on a masquerade.
The previous code carried over group settings from the old channel to the new
one.  However, it did nothing with the group settings that were already on the
new channel.  This patch removes all group settings that already existed on the
new channel.

I have a more complicated version of this patch which addresses only the most
blatant problem with this, which is that a channel can end up with multiple
group settings in the same category.  However, I could not think of a use case
for keeping any of the group settings from the old channel, so I went this route
for now.

(closes AST-152)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161948 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-09 14:52:25 +00:00
Joshua Colp
fbf46c34b0 Make the usereqphone option work again.
(closes issue #13474)
Reported by: mmaguire
Patches:
      20080912_bug13474.diff uploaded by mmaguire (license 571)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-08 17:52:10 +00:00
Sean Bright
ffc0c7e4ae Merged revisions 161421 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r161421 | seanbright | 2008-12-05 15:50:23 -0500 (Fri, 05 Dec 2008) | 8 lines
  
  Fix build errors on FreeBSD (uint -> unsigned int).
  
  (closes issue #14006)
  Reported by: alphaque
  Patches:
        astobj2.h-patch uploaded by alphaque (license 259)
        (Slightly modified by seanbright)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 21:02:20 +00:00
Dwayne M. Hubbard
ca75782a96 kill a warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161354 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 16:51:17 +00:00
Russell Bryant
d0f53b09cf Fix a NULL format string warning found by buildbot.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161287 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 14:12:14 +00:00
Jeff Peeler
ba3f49c71f (closes issue #13835)
Reported by: matt_b
Tested by: jpeeler

This mirrors a check that was present in ast_rtp_read to also be in ast_rtp_raw_write to not schedule sending the receiver report if the remote RTCP endpoint address isn't present in the RTCP structure.

Closes AST-142.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@161013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-04 18:30:41 +00:00
Mark Michelson
5397638a2f Fix a callerid parsing issue. If someone formatted callerid like the
following: "name <number>" (including the quotation marks), then the parts
would be parsed as 

name: "name
number: number

This is because the closing quotation mark was not discovered since the number
and everything after was parsed out of the string earlier. Now, there is a check
to see if the closing quote occurs after the number, so that we can know if we
should strip off the opening quote on the name.

Closes AST-158



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-04 16:44:18 +00:00
Tilghman Lesher
16f94acd53 Some compilers warn on null format strings; some don't (caught by buildbot)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 21:54:07 +00:00
Jason Parker
f978100475 Only show this warning when we want to show it.
(closes issue #13982)
Reported by: coolmig
Patches:
      chan_agent.c.patch uploaded by coolmig (license 621)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 21:38:07 +00:00
Steve Murphy
ba6d2c67ac (closes issue #13597)
Reported by: john8675309
Patches:
      patch.13597 uploaded by murf (license 17)
Tested by: murf, john8675309

This patch causes the setcid func to update the CDR
clid after setting the channel field.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 20:41:42 +00:00
Tilghman Lesher
e616d516e3 During bridge code, the channel bridge may return a retry code, if a transfer
was initiated but not yet completed.  If the bridge is immediately retried,
then we may send a storm of TXREQ packets, even though the first set is sent
reliably (retransmitted).  Fixes AST-137.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:55:12 +00:00
Tilghman Lesher
648d21d098 If an entry is added to the directory during a scan when another entry expires,
then that new entry will not be processed promptly, but must wait for either a
future entry to start or a current entry's retry to occur.  If no other entries
exist in the directory (other than the new entries) when a bunch expire, then
the new entries must wait until another new entry is added to be processed.
This was a rather weird race condition, really.  Fixes AST-147.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 17:34:34 +00:00
Tilghman Lesher
6326f47ce5 Don't start scanning the directory until all modules are loaded, because some
required modules (channels, apps, functions) may not yet be in memory yet.
Fixes AST-149.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 16:58:34 +00:00
Tilghman Lesher
cc3b3e68f0 Jon Bonilla (Manwe) pointed out on the -dev list:
"I guess that having only ip-phones in mind is not a good approach. Since it is
possible to have a sip proxy connected to asterisk we could receive a 407
(unauthorized) or 483 (too many hops) as response and dialog ending would not be
a good behavior."
So modified.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-03 14:09:35 +00:00
Terry Wilson
de2bff02a1 Channel is masqueraded, don't keep alive
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 23:58:08 +00:00
Terry Wilson
cedbee5b75 A situation like A calls B, A builtin_atxfers B to C, C parks B would lead to a crash. Thanks to file for telling me how to fix it!
(closes issue #13854)
Reported by: Adam Lee
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 23:04:23 +00:00
Tilghman Lesher
a8736b03e9 When the text does not match exactly (e.g. RTP/SAVP), then the %n conversion
fails, and the resulting integer is garbage.  Thus, we must initialize the
integer and check it afterwards for success.
(closes issue #14000)
 Reported by: folke
 Patches: 
       asterisk-sipbg-sscanf-1.4.22.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-1.6.0.1.diff uploaded by folke (license 626)
       asterisk-sipbg-sscanf-trunk-r159896.diff uploaded by folke (license 626)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 17:42:09 +00:00
Terry Wilson
a3724485b4 make compile with dev mode and malloc debug
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 01:16:30 +00:00
Tilghman Lesher
1653a9ef65 Ensure that Asterisk builds with --enable-dev-mode, even on the latest gcc
and glibc.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-02 00:25:16 +00:00
Russell Bryant
dfec3b69d6 Apply some logic used in iax2_indicate() to iax2_setoption(), as well, since they
both have the potential to send control frames in the middle of call setup.  We
have to wait until we have received a message back from the remote end before
we try to send any more frames.  Otherwise, the remote end will consider it
invalid, and we'll get stuck in an INVAL/VNAK storm.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@160003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 17:27:30 +00:00
Michiel van Baak
8f27432e76 Get rid of the useless format string and argument in the Bogus/ manager channelname.
Noted by kpfleming and name Bogus/manager suggested by eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 16:08:36 +00:00
Russell Bryant
380e2abf27 Force a "make clean" to avoid a bizarre build issue ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159900 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 14:52:56 +00:00
Michiel van Baak
1a6c64660d make manager compile on OpenBSD.
The last (10th) argument to ast_channel_alloc here should be a pointer
and NULL is not really a pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-01 14:05:41 +00:00
Kevin P. Fleming
50515ed372 update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors
since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29 16:58:29 +00:00
Kevin P. Fleming
a738a1f6e7 rename these files so as to avoid conflicts when users update their working copies and have unversioned files already in place
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 20:21:04 +00:00