Commit Graph

11849 Commits

Author SHA1 Message Date
Tilghman Lesher
1af09c5f9d When a recording ends with '#', we are improperly trimming an extra 200ms from the recording.
Reported by: sim
Patch by: tilghman
Closes issue #11247


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 23:23:58 +00:00
Joshua Colp
f3f12761ba Return the proper value when the srv_callback function executes properly.
(closes issue #11240)
Reported by: jtodd


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 01:15:12 +00:00
Jason Parker
fb0bb38fc4 Fix building on newer systems which require a third arg to open() when using O_CREAT.
Issue 11238, reported by puzzled.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89254 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 21:07:08 +00:00
Jason Parker
b0e9d400ff Revert change from revision 67064.
It is documented behavior that if a parking extension already exists while using PARKINGEXTEN,
 dialplan execution will continue.  If blind transferring to a Park with PARKINGEXTEN, you
 must keep this in mind, and handle the failure yourself.

Issue 11237, reported by jon.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 19:47:45 +00:00
Tilghman Lesher
4332b72082 If we set a value for qualify, we should actually pay attention to it, instead of overriding the value
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 17:34:11 +00:00
Mark Michelson
dc6e3e9d5d Reverting commit made in revision 89205 since it is unnecessary.
Thanks to Kevin for pointing this out



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 16:02:02 +00:00
Tilghman Lesher
feed493993 Debugging is running into the 16-lock limit. Increase to avoid.
(This define is only effective when debugging is turned on, so there's
no effect for most installations.)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 13:51:53 +00:00
Mark Michelson
4155b5f984 Some sanity checking for MixMonitor. If only 1 argument is given, then the args.options
and args.post_process strings are uninitialized and could contain garbage. This change
handles this situation properly by only using arguments that we have parsed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89205 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-13 00:56:46 +00:00
Jason Parker
05df1092da Fix a typo pointed out by De_Mon on #asterisk-dev
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 20:46:52 +00:00
Tilghman Lesher
472eb33648 If two config writes collide, file corruption could result. Use a mkstemp() file, instead.
Reported by: paravoid
Patch by: tilghman
Closes issue #10781


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 20:16:18 +00:00
Tilghman Lesher
1a052e0498 Fix two cases of memory corruption caused by background threads.
Reported by: atis
Patch by: tilghman
Fixes issue #10923


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 17:29:17 +00:00
Christian Richter
c2c1e68238 if we're NT and no number was dialed and overlapdial is set, we wait for the ISDN timeout instead of starting our own timer. added a comment for the misdn.conf.sample for the overlapdial config option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:26:48 +00:00
Christian Richter
4e52dc67dc added restart all interfaces Restart_Indicator, to automatically send a RESTART after the L2 of a PTP Port comes up. Also fixed some places where we have send a RELEASE without need for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:23:57 +00:00
Christian Richter
472f7a471c fixed a state/event issue with overlapdial=yes when no extension matched. removed the general sending of a RELEASE_COMPLETE when we receive a RELEASE, this is done by mISDNuser/mISDN. This makes it possible to use asterisk-1.4 with mISDN trunk, but requires users of mISDN/mISDNuser-1.1.X to upgrade to at least mISDNuser-1.1.6 (when using the NT mode at all)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 11:13:13 +00:00
Christian Richter
ad50f139c4 fixed the support for CW and therefore for the reject_cause option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89170 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 09:57:23 +00:00
Christian Richter
57ccb76df1 aded ntkeepcalls option, to avoid droÃpping calls when the L2 goes down on a PTP link. There are some pbx which do turn off the L1 for a very short while and restart it immediately. normally T310 should be started and after 10 seconds or so the calls should be dropped, this is a simple fix wihtout this timer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 09:45:36 +00:00
Jason Parker
76aa7c3767 Properly say the seconds here..
Issue 11203, fix described by vma.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89125 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 23:52:35 +00:00
Mark Michelson
3b75ff9010 Rework of the commit I made yesterday to use the already built-in
ast_uri_decode function as opposed to my home-rolled one. Also added
comments.

Thanks to oej for pointing me in the right direction



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 21:00:08 +00:00
Jason Parker
c170f694e7 Avoid warnings on load when using sample configuration files.
Issue 11195, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 18:45:15 +00:00
Mark Michelson
9f5cf47a6f I made this same adjustment in trunk to fix a bug, and it makes sense to do it in 1.4 as
well. If an imapfolder is specified in voicemail.conf, don't ever explicitly connect to 
INBOX since it may not exist.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89111 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 16:47:23 +00:00
Kevin P. Fleming
30cb593fd2 fix a glaring bug in the new SRV record handling that would cause incorrect weight sorting
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89105 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 05:26:47 +00:00
Tilghman Lesher
7e81a39a81 Typo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89103 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 04:55:19 +00:00
Joshua Colp
3aea241b63 Do not add a sip: to the beginning of the To URI unless needed.
(closes issue #10756)
Reported by: goestelecom


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 02:26:48 +00:00
Joshua Colp
0f1ef85f9a Improve the devicestate logic for multiple devices. If any are available then the extension is considered available.
(closes issue #10164)
Reported by: nic_bellamy
Patches:
      sip-hinting-svn-branch-1.4.patch uploaded by nic (license 299)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:28:56 +00:00
Joshua Colp
53fd91490e Add support for allowing one outgoing transaction. This means if a response comes back out of order chan_sip will still handle it. I dream of a chan_sip with real transaction support.
(closes issue #10946)
Reported by: flefoll
(closes issue #10915)
Reported by: ramonpeek
(closes issue #9567)
Reported by: atca_pres


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08 01:11:25 +00:00
Joshua Colp
f1309f2c3f If callerid is configured in sip.conf use that for checking the presence of an extension in the dialplan.
(closes issue #11185)
Reported by: spditner


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:53:25 +00:00
Tilghman Lesher
45c16cc29b The member refcount must be incremented, to avoid using it after deallocation.
A huge thanks go to lvl- for patiently providing the necessary valgrind output
that was necessary to finding this problem of memory corruption.
Reported by: lvl-
Patch by: tilghman
Closes issue #11174


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89093 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 23:39:37 +00:00
Mark Michelson
0d76379f54 This patch makes it possible for SIP phones to dial extensions defined with '#' characters
in extensions.conf AND maintain their escaped characters when forming URI's

(closes issue #10681, reported by cahen, patched by me, code review by file)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 22:40:35 +00:00
Steve Murphy
164d8a5e61 In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 21:40:28 +00:00
Mark Michelson
63f6e6b023 Fixing a segfault in the manager "core show channels concise" command.
(closes issue #11183, reported by arnd and patched by ys)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 15:56:49 +00:00
Tilghman Lesher
645af85225 Suppress AEL warnings on load.
Reported by: eliel
Patch by: eliel
Closes issue #11178


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89079 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 04:07:49 +00:00
Russell Bryant
6e74f69b51 Fix init_classes() so that classes that actually do have files loaded aren't
treated as empty, and immediately destroyed ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 20:18:49 +00:00
Jason Parker
a0edd3f3f3 Correctly set the total number of channels from a zaptel transcoder board.
SPD-49, patch by Matthew Nicholson.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89046 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 19:09:30 +00:00
Tilghman Lesher
f75916e7be We went to the trouble of creating a method of tracking failed trylocks, then never turned it on (oops).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 19:09:06 +00:00
Olle Johansson
044aa79799 Bug fixes to tdd support in zaptel.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 18:53:37 +00:00
Russell Bryant
3946288786 If someone were to delete the files used by an existing MOH class, and then
issue a reload, further use of that class could result in a crash due to
dividing by zero.  This set of changes fixes up some places to prevent this
from happening.

(closes issue #10948)
Reported by: jcomellas
Patches:
      res_musiconhold_division_by_zero.patch uploaded by jcomellas (license 282)
	  Additional changes added by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 18:20:07 +00:00
Steve Murphy
712b337863 closes issue #8786 - where the [catname](!) and [catname](othercat1,othercat2,...) notation gets dropped across a ConfigUpdate (or any other thing that would cause a config file to be written). While I was at it, I also cleaned up some of the destroy routines to free up comments, which was not being done. Made sure the new struct I introduced is also cleaned up properly at destruction time. My code handles multiple template inclusions. Many thanks to ssokol for his patch, which, while not literally used in the final merge, served as a foundation for the fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89036 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 17:52:50 +00:00
Joshua Colp
cac21aa19b Make it so that if a peer is determined to be unreachable using qualify their devicestate will report back unavailable.
(closes issue #11006)
Reported by: pj


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 17:08:05 +00:00
Joshua Colp
8b309c7bb9 Fix improbable but possible memory leaks in chan_zap.
(closes issue #11166)
Reported by: eliel
Patches:
      chan_zap.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 16:24:56 +00:00
Russell Bryant
c60344fd8e Remove some checks to see if locks are initialized from the non-DEBUG_THREADS
versions of the lock routines.  These are incorrect for a number of reasons:
 - It breaks the build on mac.
 - If there is a problem with locks not getting initialized, then the proper
   fix is to find that place and fix the code so that it does get initialized.
 - If additional debug code is needed to help find the problem areas, then this
   type of things should _only_ be put in the DEBUG_THREADS wrappers.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88931 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 13:50:15 +00:00
Kevin P. Fleming
2c76da2828 update comment to match the state of the code
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88862 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-06 02:52:05 +00:00
Mark Michelson
7b59a194a5 Reworked deadlock avoidance in __ast_read. Restored audio to
callback agents.

(closes issue #11071, reported by callguy, patched by me, tested by callguy and Ted Brown)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 23:29:29 +00:00
Russell Bryant
34002d567b After seeing crashes related to channel variables, I went looking around at the
ways that channel variables are handled.  In general, they were not handled in
a thread-safe way.  The channel _must_ be locked when reading or writing from/to
the channel variable list.

What I have done to improve this situation is to make pbx_builtin_setvar_helper()
and friends lock the channel when doing their thing.  Asterisk API calls almost 
all lock the channel for you as necessary, but this family of functions did not.

(closes issue #10923, reported by atis)
(closes issue #11159, reported by 850t)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 22:07:54 +00:00
Russell Bryant
ea00780d49 When traversing the list of channel variables here in transmit_invite(), the
asterisk channel must be locked, as this data may change at any time.

(I have seen numerous reports of crashes related to the handling of channel
variables.  There are a couple of issues on the bug tracker related to it,
but it has also been noted on IRC and mailing lists.  So, I am finding and
fixing some places where channel variables are handled improperly.) 


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 21:33:56 +00:00
Russell Bryant
69e42e6096 Fix up some indentation.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88765 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 21:21:39 +00:00
Russell Bryant
5d140cb9c2 Merge changes from asterisk/team/kpfleming/SRV-priority-handling
Previously, the SRV record support in Asterisk was broken.  There was no
guarantee on what record Asterisk would choose to actually use.  This set of
changes improves the situation by ensuring that Asterisk will choose the
highest priority record.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 20:40:01 +00:00
Russell Bryant
9cb94c7cde Merge the last bit of changes from asterisk/team/russell/readq-1.4
The issue here is that the channel frame readq handling got broken when the
code was converted to use the linked list macros.  It caused corruption of the
list head and tail pointers.  So, I fixed up the usage of the linked list
macros and in passing, simplified the code.  I also documented what the code
is doing, as it was a bit difficult to figure out at first.

This bug showed itself with crashes showing messed up head/tail pointers for
the readq.  However, there are a couple of crashes that aren't quite as obvious,
but I think may be related.  So, if your bug gets closed by this commit, but
you still have a problem, please reopen or create a new bug report.

(closes issue #10936)
(closes issue #10595)
(closes issue #10368)
(closes issue #11084)
(closes issue #10040)
(closes issue #10840)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 20:11:04 +00:00
Joshua Colp
10c172eb00 If a SIP channel is put on hold multiple times do not keep incrementing the onHold value.
(closes issue #11085)
Reported by: francesco_r
Tested by: blitzrage
(closes issue #10474)
Reported by: acennami


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 18:47:13 +00:00
Russell Bryant
a3af50b67d Fix up datastore handling in ast_do_masquerade(). The code is intended to move
any channel datastores from the old channel to the new one.  However, it did
not use the linked list macros properly to accomplish the task.  The existing
code would only work if there was only a single datastore on the old channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 17:46:02 +00:00
Jason Parker
7fa3a53ec2 Make sure we destroy the config structure on configuration failure.
Issue 11163, patch by eliel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@88585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05 17:19:41 +00:00