Commit Graph

11437 Commits

Author SHA1 Message Date
Philippe Sultan
c6365f5138 A fix for two critical problems detected while working with Daniel
McKeehan in issue #10184. 

Upon priority change, the resource list is not NULL terminated when
moving an item to the end of the list. This makes Asterisk endlessy
loop whenever it needs to read the list. Jids with different resource and
priority values, like in Gmail's and GoogleTalk's jabber clients put
that problem in evidence.

Upon reception of a 'from' attribute with an empty resource string,
Asterisk crashes when trying to access the found->cap pointer if the
resource list for the given buddy is not empty. This situation is
perfectly valid and must be handled. The Gizmoproject's jabber client
put that problem in evidence.

Also added a few comments in the code as well as a handle for the
capabilities from Gmail's jabber client, which are stored in a caps:c tag
rather than the usual c tag.

Closes issue #10184.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 09:37:10 +00:00
Christian Richter
6d6a045cc0 0x80 + protocol is wrong for USERUSER when we want to send IA5 Chars.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 08:21:21 +00:00
Joshua Colp
6dbbfcdc25 (closes issue #10440)
Reported by: irroot
(closes issue #10454)
Reported by: flo_turc
Increase maximum timestamp skew to 120. 20 was apparently far too low.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:40:23 +00:00
Mark Michelson
176f95680b Fixed an error in the Russian language voicemail intro.
(issue #10458, reported and patched by Oleh)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:26:40 +00:00
Joshua Colp
e856a6fb34 (closes issue #10456)
Reported by: irroot
Patches:
      sip_timeout.patch uploaded by irroot (license 52)
Change hardcoded timer value to defined value. I'm doing this in 1.4 as well so if it needs to be changed in the future this place would not have been forgotten.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79523 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-15 14:18:44 +00:00
Russell Bryant
e3ecc74dc1 Fix another spot where an iax2_peer would be leaked if realtime was in use.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79470 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 18:49:10 +00:00
Russell Bryant
a713275c1b Fix some memory leaks throughout chan_iax2 related to the use of realtime.
I found these while working on iax2_peer object reference tracking.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 17:31:39 +00:00
Joshua Colp
784d5f32c0 (closes issue #10415)
Reported by: atis
Revert fix for #10327 as it causes more issues then it solves.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-14 15:27:13 +00:00
Steve Murphy
7d83255ef8 memset really, really needs to be used here.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 22:40:06 +00:00
Joshua Colp
924c88d3d0 Instead of accepting a single DTMF character accept a full string.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 21:57:20 +00:00
Russell Bryant
f2de04d1d1 Don't call find_peer in registry_authrequest with the pvt lock held to avoid a
deadlock.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:37:50 +00:00
Russell Bryant
68faf63811 Release the pvt lock before calling find_peer in register_verify to avoid a
deadlock.  Also, remove some unnecessary locking in auth_fail that was only done
recursively.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79276 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:18:30 +00:00
Russell Bryant
c06aba4c8a Don't call find_peer within update_registry with a pvt lock held. This can
cause a deadlock as the code will eventually call find_callno.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 20:02:57 +00:00
Russell Bryant
60bcd4e03c I am fighting deadlocks in chan_iax2. I have tracked them down to a single
core issue.  You can not call find_callno() while holding a pvt lock as this
function has to lock another (every) other pvt lock.  Doing so can lead to a
classic deadlock.  So, I am tracking down all of the code paths where this
can happen and fixing them.

The fix I committed earlier today was along the same theme.  This patch fixes
some code down the path of authenticate_reply.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 19:27:39 +00:00
Steve Murphy
9020699e0a This patch fixes bug 10411. I added a new regression test, some regression test cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 17:49:54 +00:00
Russell Bryant
4f785d7d28 Fix a potential deadlock in socket_process. check_provisioning can eventually
call find_callno.  You can't hold a pvt lock while calling find_callno because
it goes through and locks every single one looking for a match.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79214 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 15:28:13 +00:00
Joshua Colp
4f8857d608 Add an API call to allow the engine to know that DTMF was received.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:51:09 +00:00
Joshua Colp
9a35428295 (closes issue #10437)
Reported by: haklin
Don't set the callerid name and number a second time on a newly created channel. ast_channel_alloc itself already sets it and setting it twice would cause a memory leak.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79174 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 14:18:04 +00:00
Tilghman Lesher
d0489c9f50 Ensure the connection gets marked as used at allocation time (closes issue #10429, report and fix by mnicholson)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-11 05:23:04 +00:00
Steve Murphy
241769b53c From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 20:53:43 +00:00
Steve Murphy
0c21db3e79 Re bug behavior mentioned in #asterisk, made this tweak to code, to prevent hundreds of log messages from being generated
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79049 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 18:25:51 +00:00
Steve Murphy
2544c0be73 This will help debug; from a question asked on #asterisk
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 17:43:49 +00:00
Russell Bryant
d21e1596f8 The last set of changes that I made to "core show locks" made it not able to
track mutexes unless they were declared using AST_MUTEX_DEFINE_STATIC.  Locks
initialized with ast_mutex_init() were not tracked.  It should work now.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 15:20:09 +00:00
Joshua Colp
c3ba2c8fc6 Don't bother having the core pass through or emulate begin DTMF frames when in an ast_waitstream. It only cares about the end of DTMF.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78955 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 14:15:53 +00:00
Joshua Colp
8d0941cdfd (closes issue #10422)
Reported by: bhowell
Add note to sample configuration about module load order and how it can cause perfectly good queue members to be marked as invalid.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 13:49:19 +00:00
Christian Richter
1f62b98d45 fixed a bug with the useruser information element. We send them now also in the disconnect message.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 13:24:03 +00:00
Mark Michelson
7133eb1368 Improved a bit of logic regarding comma-separated mailboxes in has_voicemail. Also added some braces to some compound if statements
since unbraced if statements scare me in general.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78907 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 23:47:00 +00:00
Steve Murphy
1e085b5dfb This fixes bug 10416; thanks to mvanbaak for the pretty output
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 23:10:46 +00:00
Mark Michelson
48d9158cdd Removing some extra debug code I left in my last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 22:03:48 +00:00
Mark Michelson
fd5f948092 Quite a few changes regarding IMAP storage.
1. instead of using inboxcount as the core message counting function, we use messagecount instead. This makes it possible to count messages in folders besides just INBOX and Old.
2. inboxcount and hasvoicemail now use messagecount as their means of determining return values.
3. Added a copy_message function for IMAP storage. Unfortunately I don't have the means to test it, but it seems like a pretty straightforward function.
4. Removed a #ifndef IMAP_STORAGE and matching #endif from leave_voicemail for a couple of reasons. One, we want to support copying mail to multiple IMAP boxes, and two, IMAP was
   broken because a STORE macro had been moved into this section of code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 21:51:17 +00:00
Mark Michelson
6c3d28a231 I broke canreinvite...Now I'm fixing it. I put some new code in the wrong place and so I've reverted the canreinvite section to how it was and put my new code where it should be.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 19:52:43 +00:00
Russell Bryant
f2bf48ce42 add a comment to indicate that inboxcount for ODBC_STORAGE needs to be fixed to support multiple mailboxes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 17:58:31 +00:00
Russell Bryant
e019aff438 Fix subscriptions to multiple mailboxes for ODBC_STORAGE. Also, leave a
comment for this to be fixed for IMAP_STORAGE, as well.  I left IMAP alone
since I know MarkM was working on this code right now for another reason.

This is broken even worse in trunk, but for a different reason.  The fact
that the mailbox option supported multiple mailboxes is completely not obvious
from the code in the channel drivers.  Anyway, I will fix that in another
commit ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 17:24:40 +00:00
Russell Bryant
1996c3a71d Fix a problem with the combination of the 'F' option to pass DTMF through a
conference and options that use DTMF to activate various features.  The problem
was that the BEGIN frame would be passed through, but the END frame would get
intercepted to activate a feature.  Then, the other conference members would hear
DTMF for forever, which they didn't seem to like very much.
(closes issue #10400, reported by stevefeinstein, fixed by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-09 16:12:57 +00:00
Jason Parker
9b95a12570 Fix mogs email address.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 19:29:42 +00:00
Mark Michelson
c97cdff67d Fixed some compiler warnings so that compiling with dev-mode and IMAP storage would not have any errors.
This section of code may get changed again shortly since my change uncovers a rather silly bit of logic.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 18:16:49 +00:00
Mark Michelson
f8c70a5799 Changing a bit of logic so that someone will NEVER exit the queue on timeout unless they have enabled the 'n' option.
This commit relates to issue #10320. Thanks to jfitzgibbon for detailing the idea behind this code change.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 14:26:36 +00:00
Joshua Colp
c98e199fb2 (closes issue #10335)
Reported by: adamgundy
Update sip.conf to include another scenario where directrtpsetup will fail.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-08 13:51:01 +00:00
Russell Bryant
0db2a076e1 Fix the build of this module on 64-bit platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 20:57:54 +00:00
Mark Michelson
dcfb651931 The logic behind inboxcount's return value was reversed in has_voicemail and message_count.
(closes issue #10401, reported by st1710, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 19:43:57 +00:00
Tilghman Lesher
75a3499df0 Don't free the environment handle when the connection fails, because other connections might be depending upon it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 19:34:25 +00:00
Jason Parker
cb0701052c Allow chan_sip to build in devmode
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 19:11:50 +00:00
Tilghman Lesher
57996e930e Reconnection doesn't happen automatically when a DB goes down (fixes issue #9389)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 19:09:38 +00:00
Jason Parker
1b58e7a828 Properly check the capabilities count to avoid a segfault.
(ASA-2007-019)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78375 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 18:25:15 +00:00
Russell Bryant
c40325aecc Merged revisions 78370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r78370 | russell | 2007-08-07 12:44:04 -0500 (Tue, 07 Aug 2007) | 4 lines

Revert patch committed for issue #9660.  It broke E&M trunks.
(closes issue #10360)
(closes issue #10364)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78371 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 17:45:30 +00:00
Joshua Colp
d76d2c5214 Add additional DTMF log messages to help when debugging issues.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78275 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 21:41:13 +00:00
Russell Bryant
2e8439052f Fix an issue where dynamic threads can get free'd, but still exist in the
dynamic thread list.
(closes issue #10392, patch from Mihai, with credit to his colleague, Pete)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78242 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 20:44:09 +00:00
Russell Bryant
ad13307328 Fix the return value of AST_LIST_REMOVE(). This shouldn't be causing any
problems, though, because the only code that uses the return value only checks
to see if it is NULL.
(closes issue #10390, pointed out by mihai)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:50:54 +00:00
Joshua Colp
03bcbd11c1 It is possible for a transfer to occur before the remote device has our tag in which case they send none in the transfer. In this case we need to not fail the transfer dialog lookup.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:32:44 +00:00
Jason Parker
e4f15628bb Fix an issue with using UpdateConfig (manager action) where escaped semicolons
in a config would be converted to just semicolons (\; to ;)

Issue 9938


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-06 16:30:51 +00:00