]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
17 years agoAgent's should not try to call a channel's indicate callback
Mark Michelson [Fri, 5 Sep 2008 21:10:32 +0000 (21:10 +0000)] 
Agent's should not try to call a channel's indicate callback
if the channel has been hung up. It will likely crash
otherwise

ABE-1159

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141366 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSince greetings are not stored in IMAP, we should
Mark Michelson [Fri, 5 Sep 2008 16:35:54 +0000 (16:35 +0000)] 
Since greetings are not stored in IMAP, we should
not be DISPOSE'ing of them the same way we do with
other messages.

(closes issue #13414)
Reported by: mthomasslo
Patches:
      13414v2.patch uploaded by putnopvut (license 60)
Tested by: mthomasslo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141267 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoCommit 140417 had a logic flaw in it which
Mark Michelson [Fri, 5 Sep 2008 16:00:24 +0000 (16:00 +0000)] 
Commit 140417 had a logic flaw in it which
caused port 5060 to always be used when dialing
a peer if no explicit port was specified. This
broke the behavior of implicitly using the port
from which the peer registered if no port is
specified. This commit fixes the logic flaw.

(closes issue #13424)
Reported by: mdu113
Patches:
      13424.patch uploaded by putnopvut (license 60)
Tested by: mdu113

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141217 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoA small change to prevent double-posting of CDR's; thanks to Daniel Ferrer for bringi...
Steve Murphy [Fri, 5 Sep 2008 14:15:43 +0000 (14:15 +0000)] 
A small change to prevent double-posting of CDR's; thanks to Daniel Ferrer for bringing it to our attention

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141156 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13357)
Steve Murphy [Thu, 4 Sep 2008 23:15:07 +0000 (23:15 +0000)] 
(closes issue #13357)
Reported by: pj
Tested by: murf

(closes issue #13416)
Reported by: yarns
Tested by: murf

If you find this message overly verbose, relax, it's probably
not meant for you. This message is meant for probably only
two people in the whole world: me, or the poor schnook that
has to maintain this code because I'm either dead or unavailable
at the moment.

This fix solves two reports, both having to do with embedding
a function call in a ${} construct. It was tricky because the
funccall syntax has parenthesis () in it. And up till now,
the 'word' token in the flex stuff didn't allow that, because
it would tend to steal the LP and RP tokens. To be truthful,
the "word" token was the trickiest, most unstable thing in
the whole lexer. I was lucky it made this long without complaints.
I had to choose every character in the pattern with extreme
care, and I knew that someday I'd have to revisit it. Well,
the day has come.

So, my brilliant idea (and I'm being modest), was to use the
surrounding ${} construct to make a state machine and capture
everything in it, no matter what it contains. But, I have to now
treat the word token like I did with comments, in that I turn
the whole thing into a state-machine sort of spec, with new
contexts "curlystate", "wordstate", and "brackstate".

Wait a minute, "brackstate"? Yes, well, it didn't take very many
regression tests to point out if I do this for ${} constructs,
I also have to do it with the $[] constructs, too.

I had to create a separate pcbstack2 and pcbstack3 because
these constructs can occur inside macro argument lists, and
when we have two state machines operating on the same structures
we'd get problems otherwise. I guess I could have stopped at
pcbstack2 and had the brackstate stuff share it, but it doesn't
hurt to be safe. So, the pcbpush and pcbpop routines also now
have versions for "2" and "3".

I had to add the {KEYWORD} construct to the initial pattern for
"word", because previously word would match stuff like "default7",
because it was a longer match than the keyword "default". But,
not any more, because the word pattern only matches only one or
two characters now, and it will always lose. So, I made it the
winner again by making an optional match on any of the keywords
before it's normal pattern.

I added another regression test to make sure we don't
lose this in future edits, and had to fix just one regression,
where it no longer reports a 'cascaded' error, which I guess
is a plus.

I've given some thought as to whether to apply these fixes to
1.4 and the 1.6.x releases, vs trunk; I decided to put it in
1.4 because one of the bug reports was against 1.4; and it
is unexpected that AEL cannot handle this situation. It actually
reduced the amount of useless "cascade" error messages that
appeared in the regressions (by one line, ehhem). There is
a possible side-effect in that it does now do more careful
checking of what's in those ${} constructs, as far as matching
parens, and brackets are concerned. Some users may find a an
insidious problem and correct it this way. This should be
exceedingly rare, I hope.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141094 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #11979)
Jeff Peeler [Thu, 4 Sep 2008 17:00:29 +0000 (17:00 +0000)] 
(closes issue #11979)
Fixes multiple parking problems:
Crash when executing a park on an extension dialed by AGI due to not returning the proper return code.
Crash when using a builtin feature that was a subset of a enabled dynamic feature.
Crash due to always hanging up the peer despite the fact that the peer was supposed to be parked.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@141028 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix voicemail forwarding when using ODBC storage.
Mark Michelson [Wed, 3 Sep 2008 14:29:15 +0000 (14:29 +0000)] 
Fix voicemail forwarding when using ODBC storage.

(closes issue #13387)
Reported by: moliveras
Patches:
      13387.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDon't freak out if the poll emulation receives NULL for the pollfds array
Russell Bryant [Wed, 3 Sep 2008 13:24:35 +0000 (13:24 +0000)] 
Don't freak out if the poll emulation receives NULL for the pollfds array
(closes issue #13307)
Reported by: jcovert

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140816 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter adding the context checking to app_voicemail
Mark Michelson [Tue, 2 Sep 2008 23:47:49 +0000 (23:47 +0000)] 
After adding the context checking to app_voicemail
for IMAP storage, I left out a crucial place to
copy the context to the vm_state structure. This
is the correction.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140751 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoI am turning the warnings generated in ast_cdr_free and post_cdr into verbose level...
Steve Murphy [Tue, 2 Sep 2008 23:36:56 +0000 (23:36 +0000)] 
I am turning the warnings generated in ast_cdr_free and post_cdr into verbose level 2 messages. Really, they matter little to end users. You either get the CDR's you wanted, or you don't, and it is a bug.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter reconsidering, with respect to 13409, ast_cdr_detach should be OK, better in...
Steve Murphy [Tue, 2 Sep 2008 22:40:13 +0000 (22:40 +0000)] 
After reconsidering, with respect to 13409, ast_cdr_detach should be OK, better in fact, than ast_cdr_free, which generates lots of useless warnings that will undoubtably generate complaints.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140690 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13409)
Steve Murphy [Tue, 2 Sep 2008 22:15:57 +0000 (22:15 +0000)] 
(closes issue #13409)
Reported by: tomaso
Patches:
      asterisk-1.6.0-rc2-cdrmemleak.patch uploaded by tomaso (license 564)

I basically spent the day, verifying that this patch
solves the problem, and doesn't hurt in non-problem
cases. Why valgrind did not plainly reveal this leak
absolutely mystifies and stuns me.

Many, many thanks to tomaso for finding and providing the fix.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140670 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake sure to use the correct length of the mohinterpret and mohsuggest
Sean Bright [Tue, 2 Sep 2008 18:14:57 +0000 (18:14 +0000)] 
Make sure to use the correct length of the mohinterpret and mohsuggest
buffers when copying configuration values.

(closes issue #13336)
Reported by: decryptus_proformatique
Patches:
      chan_iax2_mohinterpret_mohsuggest_general_settings.patch uploaded by decryptus (license 555)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140605 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAfter working on the ao2_containers branch, I noticed
Mark Michelson [Fri, 29 Aug 2008 17:34:17 +0000 (17:34 +0000)] 
After working on the ao2_containers branch, I noticed
something a bit strange. In all cases where we provide
a callback function to ao2_container_alloc, the callback
function would only return 0 or CMP_MATCH. After inspecting
the ao2_callback() code carefully, I found that if you're
only looking for one specific item, then you should return
CMP_MATCH | CMP_STOP. Otherwise, astobj2 will continue
traversing the current bucket until the end searching for
more matches.

In cases like chan_iax2 where in 1.4, all the peers are
shoved into a single bucket, this makes for potentially
terrible performance since the entire bucket will be
traversed even if the peer is one of the first ones come
across in the bucket.

All the changes I have made were for cases where the
callback function defined was passed to ao2_container_alloc
so that calls to ao2_find could find a unique instance
of whatever object was being stored in the container.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd context checking when retrieving a vm_state.
Mark Michelson [Fri, 29 Aug 2008 16:01:07 +0000 (16:01 +0000)] 
Add context checking when retrieving a vm_state.
This was causing a problem for people who had identically
named mailboxes in separate voicemail contexts.
This commit affects IMAP storage only.

(closes issue #13194)
Reported by: moliveras
Patches:
      13194.patch uploaded by putnopvut (license 60)
Tested by: putnopvut, moliveras

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140421 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix SIP's parsing so that if a port is specified
Mark Michelson [Fri, 29 Aug 2008 15:26:52 +0000 (15:26 +0000)] 
Fix SIP's parsing so that if a port is specified
in a string to Dial(), it is not ignored.

(closes issue #13355)
Reported by: acunningham
Patches:
      13355v2.patch uploaded by putnopvut (license 60)
Tested by: acunningham

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140417 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix tag checking in get_sip_pvt_byid_locked when
Mark Michelson [Wed, 27 Aug 2008 19:49:20 +0000 (19:49 +0000)] 
Fix tag checking in get_sip_pvt_byid_locked when
in pedantic mode. The problem was that the wrong
tags would be compared depending on the direction
of the call.

(closes issue #13353)
Reported by: flefoll
Patches:
      chan_sip.c.br14.139015.patch-refer-pedantic uploaded by flefoll (license 244)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140299 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd HAVE_PRI if define around dahdi_close_pri_fd
Jeff Peeler [Tue, 26 Aug 2008 16:49:57 +0000 (16:49 +0000)] 
add HAVE_PRI if define around dahdi_close_pri_fd

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix some bogus scheduler usage in chan_sip. This code used the return value
Russell Bryant [Tue, 26 Aug 2008 16:07:58 +0000 (16:07 +0000)] 
Fix some bogus scheduler usage in chan_sip.  This code used the return value
of a completely unrelated function to determine whether the scheduler should
be run or not.  This would have caused the scheduler to not run in cases where
it should have.  Also, leave a note about another scheduler issue that needs
to be addressed at some point.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140060 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12071)
Jeff Peeler [Tue, 26 Aug 2008 15:57:02 +0000 (15:57 +0000)] 
(closes issue #12071)
Reported by: tzafrir
Patches:
      dahdi_close.diff uploaded by tzafrir (license 46)
Tested by: tzafrir, jpeeler

This patch fixes closing open file descriptors in the case of an error.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140056 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix a race condition with the IAX scheduler thread. A lock and condition are
Russell Bryant [Tue, 26 Aug 2008 15:27:23 +0000 (15:27 +0000)] 
Fix a race condition with the IAX scheduler thread.  A lock and condition are
used here to allow newly scheduled tasks to wake up the scheduler just in case
the new task needs to run sooner than the current wakeup time when the thread
is sleeping.  However, there was a race condition such that a newly scheduled
task would not properly wake up the scheduler or affect the wake up period.
The order of execution would have been:

  1) Scheduler thread determines wake up time of N ms.
  2) Another thread schedules a task and signals the condition, with an
     execution time of < N ms.
  3) Scheduler thread locks and goes to sleep for N ms.

By moving the sleep time determination to inside the critical section, this
possibility is avoided.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140051 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosounds/Makefile installs sounds using the "new" language directory structure, but...
Terry Wilson [Tue, 26 Aug 2008 15:22:58 +0000 (15:22 +0000)] 
sounds/Makefile installs sounds using the "new" language directory structure, but languageprefix needs to be set = yes for sounds in subdirectories (digits/1, etc.) to play as the correct language.

Fix the generation of asterisk.conf to include languageprefix=yes

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140050 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agocorrect a file location in an error message
Kevin P. Fleming [Tue, 26 Aug 2008 14:09:22 +0000 (14:09 +0000)] 
correct a file location in an error message

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@140029 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix a typo I made. Lesson learned, apply the patch if one exists.
Jeff Peeler [Mon, 25 Aug 2008 21:47:33 +0000 (21:47 +0000)] 
Fix a typo I made. Lesson learned, apply the patch if one exists.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139927 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSome versions of awk (nawk, for example) don't like empty regular expressions
Sean Bright [Mon, 25 Aug 2008 21:31:03 +0000 (21:31 +0000)] 
Some versions of awk (nawk, for example) don't like empty regular expressions
so be slightly more verbose.

(closes issue #13374)
Reported by: dougm
Patches:
      13374.diff uploaded by seanbright (license 71)
Tested by: dougm

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139909 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMake SIPADDHEADER() propagate indefinitely
Terry Wilson [Mon, 25 Aug 2008 20:46:10 +0000 (20:46 +0000)] 
Make SIPADDHEADER() propagate indefinitely

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139869 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix the logic in config_text_file_save so that if an
Mark Michelson [Mon, 25 Aug 2008 15:52:59 +0000 (15:52 +0000)] 
Fix the logic in config_text_file_save so that if an
UpdateConfig manager action is issued and the
file specified in DstFileName does not yet exist,
an error is not returned.

(closes issue #13341)
Reported by: vadim
Patches:
      13341.patch uploaded by putnopvut (license 60)
  (with small modification from seanbright)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139769 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoThis patch reverts the changes made via 139347, and 139635, as users
Steve Murphy [Mon, 25 Aug 2008 15:33:14 +0000 (15:33 +0000)] 
This patch reverts the changes made via 139347, and 139635, as users
are seeing adverse difference.

I will un-close 13251.

Back to the drawing board/ concept/ beginning/ whatever!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139764 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoI found some problems with the code I committed earlier, when
Steve Murphy [Fri, 22 Aug 2008 22:24:02 +0000 (22:24 +0000)] 
I found some problems with the code I committed earlier, when
I merged them into trunk, so I'm coming back to clean up.
And, in the process, I found an error in the code I added
to trunk and 1.6.x, that I'll fix using this patch also.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139635 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13359)
Jeff Peeler [Fri, 22 Aug 2008 21:36:13 +0000 (21:36 +0000)] 
(closes issue #13359)
Reported by: Laureano
Patches:
      originate_channel_check.patch uploaded by Laureano (license 265)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139621 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix compilation when DEBUG_THREAD_LOCALS is selected
Mark Michelson [Fri, 22 Aug 2008 19:45:19 +0000 (19:45 +0000)] 
Fix compilation when DEBUG_THREAD_LOCALS is selected

(closes issue #13298)
Reported by: snuffy
Patches:
      bug13298_20080822.diff uploaded by snuffy (license 35)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139553 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRemove show_frame_stats_deprecated since it is not
Mark Michelson [Fri, 22 Aug 2008 19:23:02 +0000 (19:23 +0000)] 
Remove show_frame_stats_deprecated since it is not
used anywhere and causes build errors if building under
dev-mode with TRACE_FRAMES selected in menuselect.

(closes issue #13362)
Reported by: snuffy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139521 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix the build. Thanks, mvanbaak!
Mark Michelson [Fri, 22 Aug 2008 17:24:47 +0000 (17:24 +0000)] 
Fix the build. Thanks, mvanbaak!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139466 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoPrevent a deadlock in chan_iax2 resulting from
Mark Michelson [Fri, 22 Aug 2008 16:57:38 +0000 (16:57 +0000)] 
Prevent a deadlock in chan_iax2 resulting from
incorrect locking order between iax2_pvt and
ast_channel structures.

AST-13

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139456 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFixes loop that could possibly never exit in the event of a channel never being able...
Jeff Peeler [Thu, 21 Aug 2008 23:39:31 +0000 (23:39 +0000)] 
Fixes loop that could possibly never exit in the event of a channel never being able to be opened or specify after a restart.
(closes issue #11017)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139387 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13251)
Steve Murphy [Thu, 21 Aug 2008 23:03:50 +0000 (23:03 +0000)] 
(closes issue #13251)
Reported by: sergee
Tested by: murf

THis is a bold move for a static release fix, but I wouldn't have
made it if I didn't feel confident (at least a *bit* confident)
that it wouldn't mess everyone up.

The reasoning goes something like this:

1. We simply cannot do anything with CDR's at the current point
(in pbx.c, after the __ast_pbx_run loop). It's way too late to
have any affect on the CDRs. The CDR is already posted and gone,
and the remnants have been cleared.

2. I was very much afraid that moving the running of the 'h'
extension down into the bridge code (where it would be now
practical to do it), would result in a lot more calls to the
'h' exten, so I implemented it as another exten under another
name, but found, to my pleasant surprise, that there was a
1:1 correspondence to the running of the 'h' exten in the
pbx_run loop, and the new spot at the end of the bridge.
So, I ifdef'd out the current 'h' loop, and moved it into
the bridge code. The only difference I can see is the stuff
about the AST_PBX_KEEPALIVE, and hopefully, if this
is still an important decision point, I can replicate it
if there are complaints. To be perfectly honest,
the KEEPALIVE situation is not totally clear to me,
and how it relates to a post-bridge situation is less
clear. I suspect the users will point out everything
in total clarity if this steps on anyone's toes!

3. I temporarily swap the bridge_cdr into the channel
before running the 'h' exten, which makes it possible
for users to edit the cdr before it goes out the door.
And, of course, with the endbeforehexten config var set,
the users can also get at the billsec/duration vals.
After the h exten finishes, the cdr is swapped back
and processing continues as normal.

Please, all who deal with CDR's, please test this version
of Asterisk, and file bug reports as appropriate!

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139347 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoApply fix for issue #13310 to branch 1.4, too.
Philippe Sultan [Thu, 21 Aug 2008 10:11:00 +0000 (10:11 +0000)] 
Apply fix for issue #13310 to branch 1.4, too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139283 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix a crash in the ChanSpy application. The issue here is that if you call
Russell Bryant [Wed, 20 Aug 2008 22:14:35 +0000 (22:14 +0000)] 
Fix a crash in the ChanSpy application.  The issue here is that if you call
ChanSpy and specify a spy group, and sit in the application long enough looping
through the channel list, you will eventually run out of stack space and the
application with exit with a seg fault.  The backtrace was always inside of
a harmless snprintf() call, so it was tricky to track down.  However, it turned
out that the call to snprintf() was just the biggest stack consumer in this
code path, so it would always be the first one to hit the boundary.

(closes issue #13338)
Reported by: ruddy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139213 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix bug where the samples were not accurate when in G723 mode, which would
Shaun Ruffell [Wed, 20 Aug 2008 19:52:25 +0000 (19:52 +0000)] 
Fix bug where the samples were not accurate when in G723 mode, which would
cause the timestamp field of the RTP header to be invalid.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139151 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBackport support for Zaptel/DAHDI channel-level alarms from trunk/1.6, because not...
Kevin P. Fleming [Wed, 20 Aug 2008 19:35:59 +0000 (19:35 +0000)] 
Backport support for Zaptel/DAHDI channel-level alarms from trunk/1.6, because not doing so just makes it difficult for people with channels that are in alarm when Asterisk starts up to get them going once the alarm is cleared

(closes issue #12160)
Reported by: tzafrir
Patches:
      asterisk-chanalarms_14.patch uploaded by tzafrir (license 46)
Tested by: tzafrir

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139145 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13263)
Steve Murphy [Wed, 20 Aug 2008 17:14:55 +0000 (17:14 +0000)] 
(closes issue #13263)
Reported by: brainy
Tested by: murf

The specialized reset routine is tromping on the
flags field of the CDR. I made a change to not
reset the DISABLED bit. This should get rid of this
problem.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139074 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agosip_read should properly handle a NULL return from sip_rtp_read.
Mark Michelson [Wed, 20 Aug 2008 15:37:56 +0000 (15:37 +0000)] 
sip_read should properly handle a NULL return from sip_rtp_read.

(closes issue #13257)
Reported by: travishein

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@139015 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd DAHDI_POLICY_WHEN_FULL compatability define for Zaptel
Jeff Peeler [Tue, 19 Aug 2008 23:22:39 +0000 (23:22 +0000)] 
add DAHDI_POLICY_WHEN_FULL compatability define for Zaptel

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138949 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoReset agent_pvt variables back to the values in agents.conf
Mark Michelson [Tue, 19 Aug 2008 23:17:17 +0000 (23:17 +0000)] 
Reset agent_pvt variables back to the values in agents.conf
(from what the corresponding channel variables were set to)
when the agent logs out.

(closes issue #13098)
Reported by: davidw
Patches:
      20080731__issue13098_agent_ackcall_not_reset.diff uploaded by bbryant (license 36)
Tested by: davidw

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138942 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd configuration option to chan_dahdi.conf to allow buffering policy and number...
Jeff Peeler [Tue, 19 Aug 2008 22:56:07 +0000 (22:56 +0000)] 
Add configuration option to chan_dahdi.conf to allow buffering policy and number of buffers to be configured per channel. Syntax:

buffers=<num of buffers>,<policy>

Where the number of buffers is some non-negative integer and the policy is either "full", "half", or "immediate".

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138938 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd a lock and unlock prior to the destruction of the chanspy_ds
Mark Michelson [Tue, 19 Aug 2008 18:50:53 +0000 (18:50 +0000)] 
Add a lock and unlock prior to the destruction of the chanspy_ds
lock to ensure that no other threads still have it locked. While
this should not happen under normal circumstances, it appears that
if the spyer and spyee hang up at nearly the same time, the following
may occur.

1. ast_channel_free is called on the spyee's channel.
2. The chanspy datastore is removed from the spyee's channel in
   ast_channel_free.
3. In the spyer's thread, the spyer attempts to remove and destroy the datastore
   from the spyee channel, but the datastore has already been removed in step 2,
   so the spyer continues in the code.
4. The spyee's thread continues and calls the datastore's destroy callback,
   chanspy_ds_destroy. This involves locking the chanspy_ds.
5. Now the spyer attempts to destroy the chanspy_ds lock. The problem is that in step 4,
   the spyee has locked this lock, meaning that the spyer is attempting to destroy a lock
   which is currently locked by another thread.

The backtrace provided in issue #12969 supports the idea that this is possible
(and has even occurred). This commit does not close the issue, but should help
in preventing one type of crash associated with the use of app_chanspy.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138886 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoChange the inequalities used in app_queue with regards
Mark Michelson [Mon, 18 Aug 2008 20:01:14 +0000 (20:01 +0000)] 
Change the inequalities used in app_queue with regards
to timeouts from being strict to non-strict for more
accuracy.

(closes issue #13239)
Reported by: atis
Patches:
      app_queue_timeouts_v2.patch uploaded by atis (license 242)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138685 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agolook for transcoder in proper place based on build against Zaptel or DAHDI
Kevin P. Fleming [Mon, 18 Aug 2008 16:57:27 +0000 (16:57 +0000)] 
look for transcoder in proper place based on build against Zaptel or DAHDI

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138663 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoYou know what's awesome? Code that compiles... ;)
Sean Bright [Mon, 18 Aug 2008 11:57:24 +0000 (11:57 +0000)] 
You know what's awesome?  Code that compiles... ;)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138569 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix compilation warnings
Jeff Peeler [Mon, 18 Aug 2008 02:05:29 +0000 (02:05 +0000)] 
fix compilation warnings

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138516 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofixes use count to properly decrement if an active dahdi channel is destroyed allowin...
Jeff Peeler [Sat, 16 Aug 2008 01:12:18 +0000 (01:12 +0000)] 
fixes use count to properly decrement if an active dahdi channel is destroyed allowing module to be unloaded

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138360 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd forgotten locks around ss_thread_count in ss_thread for dahdi restart
Jeff Peeler [Fri, 15 Aug 2008 23:41:54 +0000 (23:41 +0000)] 
add forgotten locks around ss_thread_count in ss_thread for dahdi restart

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138309 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMore fixes for realtime peers.
Tilghman Lesher [Fri, 15 Aug 2008 22:33:42 +0000 (22:33 +0000)] 
More fixes for realtime peers.
(closes issue #12921)
 Reported by: Nuitari
 Patches:
       20080804__bug12921.diff.txt uploaded by Corydon76 (license 14)
       20080815__bug12921.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138258 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoinitialize condition variable ss_thread_complete using ast_cond_init
Jeff Peeler [Fri, 15 Aug 2008 21:28:26 +0000 (21:28 +0000)] 
initialize condition variable ss_thread_complete using ast_cond_init

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agodeclared static mutexes using AST_MUTEX_DEFINE_STATIC macro
Jeff Peeler [Fri, 15 Aug 2008 19:41:29 +0000 (19:41 +0000)] 
declared static mutexes using AST_MUTEX_DEFINE_STATIC macro

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138151 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFixes the dahdi restart functionality. Dahdi restart allows one to restart all DAHDI...
Jeff Peeler [Fri, 15 Aug 2008 19:21:51 +0000 (19:21 +0000)] 
Fixes the dahdi restart functionality. Dahdi restart allows one to restart all DAHDI channels, even if they are currently in use. This is different from unloading and then loading the module since unloading requires the use count to be zero. Reloading the module is different in that the signalling is not changed from what it was originally configured. Also, this fixes not closing all the file descriptors for D-channels upon module unload (which would prevent loading the module afterwards).

(closes issue #11017)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138119 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoEnsure that when a hangup occurs in autoservice, that a hangup frame gets
Russell Bryant [Fri, 15 Aug 2008 15:07:16 +0000 (15:07 +0000)] 
Ensure that when a hangup occurs in autoservice, that a hangup frame gets
properly deferred to be read from the channel owner when it gets taken out
of autoservice.

(closes issue #12874)
Reported by: dimas
Patches:
      v1-12874.patch uploaded by dimas (license 88)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138027 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdditional check for more string specifiers than arguments.
Tilghman Lesher [Fri, 15 Aug 2008 14:51:12 +0000 (14:51 +0000)] 
Additional check for more string specifiers than arguments.
(closes issue #13299)
 Reported by: adomjan
 Patches:
       20080813__bug13299.diff.txt uploaded by Corydon76 (license 14)
       func_strings.c-sprintf.patch uploaded by adomjan (license 487)
 Tested by: adomjan

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@138023 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoOops, wrong direction
Tilghman Lesher [Thu, 14 Aug 2008 16:55:20 +0000 (16:55 +0000)] 
Oops, wrong direction

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWhen creating the secondary subchannel name, it is necessary to compare to
Tilghman Lesher [Thu, 14 Aug 2008 16:47:30 +0000 (16:47 +0000)] 
When creating the secondary subchannel name, it is necessary to compare to
the existing channel name without the "Zap/" or "DAHDI/" prefix, since our
test string is also without that prefix.
(closes issue #13027)
 Reported by: dferrer
 Patches:
       chan_zap-1.4.21.1_fix2.patch uploaded by dferrer (license 525)
       (Slightly modified by me, to compensate for both names)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137847 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoComments in this config file were aligned only if your tab size was set to 8.
Russell Bryant [Thu, 14 Aug 2008 14:05:23 +0000 (14:05 +0000)] 
Comments in this config file were aligned only if your tab size was set to 8.
So, convert tabs to spaces so that things should be aligned regardless of what
tab size you use in your editor.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137731 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoforgot one module name that changed
Kevin P. Fleming [Thu, 14 Aug 2008 02:03:04 +0000 (02:03 +0000)] 
forgot one module name that changed

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137679 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd support for Zaptel versions that contain the new transcoder interface
Kevin P. Fleming [Thu, 14 Aug 2008 02:02:15 +0000 (02:02 +0000)] 
add support for Zaptel versions that contain the new transcoder interface

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137677 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRegister DAHDISendKeypadFacility application if dahdi_chan_mode is set to DAHDI ...
Jeff Peeler [Wed, 13 Aug 2008 21:35:37 +0000 (21:35 +0000)] 
Register DAHDISendKeypadFacility application if dahdi_chan_mode is set to DAHDI + Zap. Mark ZapSendKeypadFacility application as deprecated on usage.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137580 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd document describing what users will need to be aware of when upgrading to this...
Kevin P. Fleming [Wed, 13 Aug 2008 20:46:19 +0000 (20:46 +0000)] 
add document describing what users will need to be aware of when upgrading to this version and using DAHDI

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137530 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoremove some more chan_zap references
Kevin P. Fleming [Wed, 13 Aug 2008 20:42:33 +0000 (20:42 +0000)] 
remove some more chan_zap references

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agodocument dahdichanname option in doc/asterisk-conf.txt
Kevin P. Fleming [Wed, 13 Aug 2008 20:33:47 +0000 (20:33 +0000)] 
document dahdichanname option in doc/asterisk-conf.txt

make chan_dahdi read its configuration from zapata.conf if dahdichanname has been set to 'no'

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137527 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUpdate docs to reflect the change to cdr_tds
Sean Bright [Wed, 13 Aug 2008 14:33:49 +0000 (14:33 +0000)] 
Update docs to reflect the change to cdr_tds

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137405 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoBring cdr_tds in line with the other CDR backends and have it try to store
Sean Bright [Wed, 13 Aug 2008 00:10:35 +0000 (00:10 +0000)] 
Bring cdr_tds in line with the other CDR backends and have it try to store
CDR(userfield) if it is set.  The new behavior is to check for the userfield
column on module load, and if it exists, we will store CDR(userfield) when
CDRs are written.  A similar patch already went into trunk and 1.6.0.

(closes issue #13290)
Reported by: falves11

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoconvert this module to be able to handle DAHDI or Zaptel (reported on asterisk-users...
Kevin P. Fleming [Mon, 11 Aug 2008 13:33:35 +0000 (13:33 +0000)] 
convert this module to be able to handle DAHDI or Zaptel (reported on asterisk-users, don't know how this got missed before)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137188 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDeallocate database connection handle on disconnect, as we allocate another
Tilghman Lesher [Mon, 11 Aug 2008 00:20:38 +0000 (00:20 +0000)] 
Deallocate database connection handle on disconnect, as we allocate another
one on connect.
(closes issue #13271)
 Reported by: dveiga

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@137138 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoEnsure PBX_DAHDI_TRANSCODE will evaluate to 0 if not found instead of empty.
Russell Bryant [Sat, 9 Aug 2008 17:11:27 +0000 (17:11 +0000)] 
Ensure PBX_DAHDI_TRANSCODE will evaluate to 0 if not found instead of empty.
pointed out by tzafrir on #asterisk-dev

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136999 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerged revisions 136945 via svnmerge from
Tilghman Lesher [Sat, 9 Aug 2008 15:25:36 +0000 (15:25 +0000)] 
Merged revisions 136945 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r136945 | tilghman | 2008-08-09 10:24:36 -0500 (Sat, 09 Aug 2008) | 2 lines

Regression fixes for Solaris

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136946 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #13236)
Steve Murphy [Fri, 8 Aug 2008 00:15:34 +0000 (00:15 +0000)] 
(closes issue #13236)
Reported by: korihor

Wow, this one was a challenge!

I regrouped and ran a new strategy for
setting the ~~MACRO~~ value; I set it once
per extension, up near the top. It is only
set if there is a switch in the extension.

So, I had to put in a chunk of code to detect
a switch in the pval tree.

I moved the code to insert the set of ~~exten~~
up to the beginning of the gen_prios routine,
instead of down in the switch code.

I learned that I have to push the detection
of the switches down into the code, so everywhere
I create a new exten in gen_prios, I make sure
to pass onto it the values of the mother_exten
first, and the exten next.

I had to add a couple fields to the exten
struct to accomplish this, in the ael_structs.h
file. The checked field makes it so we don't
repeat the switch search if it's been done.

I also updated the regressions.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agochange the required dependency for codec_dahdi to only be satisfied by DAHDI and...
Kevin P. Fleming [Thu, 7 Aug 2008 18:25:31 +0000 (18:25 +0000)] 
change the required dependency for codec_dahdi to only be satisfied by DAHDI and not Zaptel, as the new transcoder interface is only in DAHDI

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUpdated codec_dahdi to use the new transcoder interface in the first DAHDI
Shaun Ruffell [Thu, 7 Aug 2008 18:14:17 +0000 (18:14 +0000)] 
Updated codec_dahdi to use the new transcoder interface in the first DAHDI
release.  Codec dahdi no longer functions with the transcoder interface in
zaptel at this time (which the last zaptel release was 1.4.11).

NOTE: Still needs an update to the configure script to make sure that
codec_dahdi is only built if the new transcoder interface is present in the
drivers.

(Issue: DAHDI-42)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136544 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUpdate persistent state on all exit conditions.
Tilghman Lesher [Thu, 7 Aug 2008 16:50:47 +0000 (16:50 +0000)] 
Update persistent state on all exit conditions.
(closes issue #12916)
 Reported by: sgenyuk
 Patches:
       app_queue.patch.txt uploaded by neutrino88 (license 297)
 Tested by: sgenyuk, aragon

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136488 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoadd a raw list of all libraries that any part of Asterisk links directly to
Kevin P. Fleming [Thu, 7 Aug 2008 16:30:55 +0000 (16:30 +0000)] 
add a raw list of all libraries that any part of Asterisk links directly to

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136484 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agowork around a bug in gcc-4.2.3 that incorrectly ignores the casting away of 'const...
Kevin P. Fleming [Thu, 7 Aug 2008 16:11:17 +0000 (16:11 +0000)] 
work around a bug in gcc-4.2.3 that incorrectly ignores the casting away of 'const' for pointers when the developer knows it is safe to do so

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136458 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoremove config.cache during distclean, in case the user is using autoconf caching
Kevin P. Fleming [Thu, 7 Aug 2008 15:07:12 +0000 (15:07 +0000)] 
remove config.cache during distclean, in case the user is using autoconf caching

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136404 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAlso, parse useincomingcalleridonzaptransfer (and add appropriate deprecation
Tilghman Lesher [Thu, 7 Aug 2008 01:31:27 +0000 (01:31 +0000)] 
Also, parse useincomingcalleridonzaptransfer (and add appropriate deprecation
warnings).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136348 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFor backwards compatibility with previous 1.4 versions which used "zapchan"
Tilghman Lesher [Thu, 7 Aug 2008 01:17:14 +0000 (01:17 +0000)] 
For backwards compatibility with previous 1.4 versions which used "zapchan"
in users.conf, ensure that we still support it.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136304 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago* The allowed_bearers setting in misdn.conf misspelled one
Richard Mudgett [Wed, 6 Aug 2008 21:18:53 +0000 (21:18 +0000)] 
*  The allowed_bearers setting in misdn.conf misspelled one
of its options: digital_restricted.
*  Fixed some other spelling errors and typos.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136241 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoWe only need to unregister the QueueStatus manager
Mark Michelson [Wed, 6 Aug 2008 20:42:15 +0000 (20:42 +0000)] 
We only need to unregister the QueueStatus manager
command once on an unload

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136238 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago-C option takes a filename, not a directory path.
Tilghman Lesher [Wed, 6 Aug 2008 20:14:54 +0000 (20:14 +0000)] 
-C option takes a filename, not a directory path.
(closes issue #13007)
 Reported by: klaus3000

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136190 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRemove the use of --no-print-directory when compiling subdirectories.
Russell Bryant [Wed, 6 Aug 2008 18:58:37 +0000 (18:58 +0000)] 
Remove the use of --no-print-directory when compiling subdirectories.
This allows vim :make functionality to work properly when errors have
occurred in the build.  Without printing the directories, vim did not
know how to find the file that the error occurred in.

If the extra bit of build noise annoys anyone, just let me know, and
I'll make this optional.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136168 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSince adding the AST_CONTROL_SRCUPDATE frame type,
Mark Michelson [Wed, 6 Aug 2008 15:58:40 +0000 (15:58 +0000)] 
Since adding the AST_CONTROL_SRCUPDATE frame type,
there are places where ast_rtp_new_source may be called
where the tech_pvt of a channel may not yet have an
rtp structure allocated. This caused a crash in chan_skinny,
which was fixed earlier, but now the same crash has been
reported against chan_h323 as well. It seems that the best
solution is to modify ast_rtp_new_source to not attempt to
set the marker bit if the rtp structure passed in is NULL.

This change to ast_rtp_new_source also allows the removal
of what is now a redundant pointer check from chan_skinny.

(closes issue #13247)
Reported by: pj

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@136062 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoFix a longstanding bug in channel walking logic, and fix the explanation to
Tilghman Lesher [Wed, 6 Aug 2008 03:53:36 +0000 (03:53 +0000)] 
Fix a longstanding bug in channel walking logic, and fix the explanation to
make sense.
(Closes issue #13124)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135949 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoSince powerof() can return an error condition, it's foolhardy not to detect and
Tilghman Lesher [Wed, 6 Aug 2008 03:24:56 +0000 (03:24 +0000)] 
Since powerof() can return an error condition, it's foolhardy not to detect and
deal with that condition.
(Related to issue #13240)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135915 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago1) Bugfix for debugging code
Tilghman Lesher [Wed, 6 Aug 2008 03:02:59 +0000 (03:02 +0000)] 
1) Bugfix for debugging code
2) Reduce compiler warnings for another section of debugging code
(Closes issue #13237)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135899 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRemove properties that should not be here
Mark Michelson [Wed, 6 Aug 2008 00:29:54 +0000 (00:29 +0000)] 
Remove properties that should not be here

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135850 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoRevert inadvertent changes to app_skel that occurred when
Mark Michelson [Wed, 6 Aug 2008 00:27:54 +0000 (00:27 +0000)] 
Revert inadvertent changes to app_skel that occurred when
I was testing for a memory leak

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135847 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMerging the issue11259 branch.
Mark Michelson [Wed, 6 Aug 2008 00:25:10 +0000 (00:25 +0000)] 
Merging the issue11259 branch.

The purpose of this branch was to take into account
"burps" which could cause jitterbuffers to misbehave.
One such example is if the L option to Dial() were used
to inject audio into a bridged conversation at regular
intervals. Since the audio here was not passed through
the jitterbuffer, it would cause a gap in the jitterbuffer's
timestamps which would cause a frames to be dropped for a
brief period.

Now ast_generic_bridge will empty and reset the jitterbuffer
each time it is called. This causes injected audio to be handled
properly.

ast_generic_bridge also will empty and reset the jitterbuffer
if it receives an AST_CONTROL_SRCUPDATE frame since the change
in audio source could negatively affect the jitterbuffer.

All of this was made possible by adding a new public API call
to the abstract_jb called ast_jb_empty_and_reset.

(closes issue #11259)
Reported by: plack
Tested by: putnopvut

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135841 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years ago(closes issue #12982)
Steve Murphy [Tue, 5 Aug 2008 23:13:20 +0000 (23:13 +0000)] 
(closes issue #12982)
Reported by: bcnit
Tested by: murf

I discovered that also, in the previous bug fixes and changes,
the cdr.conf 'unanswered' option is not being obeyed, so
I fixed this.

And, yes, there are two 'answer' times involved in this
scenario, and I would agree with you, that the first
answer time is the time that should appear in the CDR.
(the second 'answer' time is the time that the bridge
was begun).

I made the necessary adjustments, recording the first
answer time into the peer cdr, and then using that to
override the bridge cdr's value.

To get the 'unanswered' CDRs to appear, I purposely
output them, using the dial cmd to mark them as
DIALED (with a new flag), and outputting them if
they bear that flag, and you are in the right mode.

I also corrected one small mention of the Zap device
to equally consider the dahdi device.

I heavily tested 10-sec-wait macros in dial, and
without the macro call; I tested hangups while the
macro was running vs. letting the macro complete
and the bridge form. Looks OK. Removed all the
instrumentation and debug.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135799 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoIn a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERID
Tilghman Lesher [Tue, 5 Aug 2008 21:34:46 +0000 (21:34 +0000)] 
In a conversion to use ast_strlen_zero, the meaning of the flag IAX_HASCALLERID
was perverted.  This change reverts IAX2 to the original meaning, which was,
that the callerid set on the client should be overridden on the server, even if
that means the resulting callerid is blank.  In other words, if you set
"callerid=" in the IAX config, then the callerid should be overridden to blank,
even if set on the client.  Note that there's a distinction, even on realtime,
between the field not existing (NULL in databases) and the field existing, but
set to blank (override callerid to blank).

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135747 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoUse PATH_MAX for filenames
Sean Bright [Tue, 5 Aug 2008 13:25:00 +0000 (13:25 +0000)] 
Use PATH_MAX for filenames

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135597 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agofix a config sample typo
Russell Bryant [Mon, 4 Aug 2008 20:15:03 +0000 (20:15 +0000)] 
fix a config sample typo

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135536 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoDefine ASTSBINDIR for script
Tilghman Lesher [Mon, 4 Aug 2008 17:07:52 +0000 (17:07 +0000)] 
Define ASTSBINDIR for script

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135482 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoMemory leak on unload
Tilghman Lesher [Mon, 4 Aug 2008 16:56:19 +0000 (16:56 +0000)] 
Memory leak on unload
(closes issue #13231)
 Reported by: eliel
 Patches:
       app_voicemail.leak.patch uploaded by eliel (license 64)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135479 65c4cc65-6c06-0410-ace0-fbb531ad65f3

17 years agoAdd a minor clarification to the documentation of mohinterpret and mohsuggest
Russell Bryant [Mon, 4 Aug 2008 16:26:17 +0000 (16:26 +0000)] 
Add a minor clarification to the documentation of mohinterpret and mohsuggest

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@135473 65c4cc65-6c06-0410-ace0-fbb531ad65f3