Commit Graph

13086 Commits

Author SHA1 Message Date
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
Kevin P. Fleming
7459a56dbb simplify (and slightly bug-fix) the recent developer-oriented COMPILE_DOUBLE mode
add channels/busy.h and channels/ringtone.h to the repository instead of generating them repeatedtly; most users do not change the settings to build them, but the Makefile rules are still there if they wish to do so

ensure that 'make clean' removes dependency files for .i files that are created in COMPILE_DOUBLE mode



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-26 18:36:24 +00:00
Steve Murphy
141ab56b86 (closes issue #12694)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 22:41:10 +00:00
Tilghman Lesher
10e70eaecf Don't try to send a response on a NULL pvt.
(closes issue #13919)
 Reported by: barthpbx
 Patches: 
       chan_iax2.c.patch uploaded by eliel (license 64)
 Tested by: barthpbx


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 21:56:48 +00:00
Tilghman Lesher
dd5a228991 Merged revisions 159245 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r159245 | tilghman | 2008-11-25 15:37:06 -0600 (Tue, 25 Nov 2008) | 7 lines
  
  Regression fix for last security fix.  Set the iseqno correctly.
  (closes issue #13918)
   Reported by: ffloimair
   Patches: 
         20081119__bug13918.diff.txt uploaded by Corydon76 (license 14)
   Tested by: ffloimair
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 21:40:28 +00:00
Russell Bryant
07741a3261 Add ao2_trylock() to go along with ao2_lock() and ao2_unlock()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 17:34:50 +00:00
Terry Wilson
e8f9274ca7 Add missing variable declaration in the PPC code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 16:23:38 +00:00
Tilghman Lesher
929c14e432 System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159025 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 04:50:00 +00:00
Jeff Peeler
c7dcb086dd (closes issue #13786)
Reported by: tzafrir

When compiling against Zaptel dahdi_compat will now only define all the DAHDI defines if the Zaptel define is present. Also, there is no such thing as DAHDI_PRI.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158629 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-22 00:04:36 +00:00
Steve Murphy
890386410a In reference to the fix made for 13871, I was
merging the fix into 1.6.0 and realized I missed
the code in the h-exten block, and didn't catch it
because my test case had the h-exten commented out.

So, this corrects the code I missed, as a 
preventative against another crash report.
Tested with the h-exten defined, all is well.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 23:14:50 +00:00
Tilghman Lesher
cd4b144fb0 The passed extension may not be the same in the list as the current entry,
because we strip spaces when copying the extension into the structure.
Therefore, use the copied item to place the item into the list.
(found by lmadsen on -dev, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 23:07:46 +00:00
Russell Bryant
a0bf88537a When compiling with DEBUG_THREADS, report the real file/func/line for ao2_lock/ao2_unlock
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 22:05:55 +00:00
Steve Murphy
596f31a1a1 (closes issue #13871)
Reported by: mdu113

This one is totally my fault. The code doesn't even
create a bridge if the channel CDR has POST_DISABLED.
I didn't check for that at the end of the bridge.
Fixed with a few small insertions. Tested. Looks
good. No cdr generated, no crash, no unnecc. data
objects created either.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 21:19:47 +00:00
Mark Michelson
72a8661580 This change had somehow gotten reverted due to a
completely unrelated commit. Thanks to Theo Belder
on the Asterisk-dev list for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 15:24:19 +00:00
Mark Michelson
6a632a5a2b There was an issue when attempting to reference an embedded
frame in a freed ast_filestream. This patch makes use of the
ao2 functions to make sure that we do not free an ast_filestream
structure until the embedded ast_frame has been "freed" as well.

(closes issue #13496)
Reported by: fst-onge
Patches:
      filestream_frame_1_4.diff uploaded by putnopvut (license 60)
Tested by: putnopvut

Closes AST-89



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 18:06:48 +00:00
Mark Michelson
3668ba67ab We don't handle 4XX responses to BYE well. According to
section 15 of RFC 3261, we should terminate a dialog if we
receive a 481 or 408 in response to our BYE. Since I am aware
of at least one phone manufacturer who may sometimes send a 
404 as well, I am being liberal and saying that any 4XX response
to a BYE should result in a terminated dialog.


(closes issue #12994)
Reported by: pabelanger
Patches:
      12994.patch uploaded by putnopvut (license 60)

Closes AST-129



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@158071 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:48:42 +00:00