aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-05-28merge revision 118702 from trunk to 1.4 -- Fixes a bug in chan_iax that uses ↵bbryant1-1/+5
send_command to poke a peer while a channel is unlocked in some cases, and because it can cause seemingly random failures could be related to some bugs in the tracker... git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118716 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-28Add an option to use the source IP address of RTP as the destination IP ↵file3-2/+22
address of UDPTL when a specific option is enabled. If the remote side is properly configured (ports forwarded) then UDPTL will flow. (closes issue #10417) Reported by: cstadlmann git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118646 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27Fix an issue where codec preferences were not set on dialogs that were not ↵file1-16/+13
authenticated via a user or peer and allow framing to work without rtpmap in the SDP. (closes issue #12501) Reported by: slimey git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118558 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27When showing an error message for a command, don't shorten the command output,tilghman1-1/+1
as it tends to confuse the user (it's fine for suggesting other commands, however). Reported by: seanbright (on #asterisk-dev) Fixed by: me git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118551 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27Russell noted to me that in the case that separate threads use theirmmichelson1-7/+6
own addressing system, the fix I made for issue 12376 does not guarantee uniqueness to the datastores' uids. Though I know of no system that works this way, I am going to change this right now to prevent trying to track down some future bug that may occur and cause untold hours of debugging time to track down. The change involves using a global counter which increases with each new chanspy_ds which is created. This guarantees uniqueness. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118509 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27NULL character should terminate only commands back to the core, not logtilghman1-7/+14
messages to the console. (closes issue #12731) Reported by: seanbright Patches: 20080527__bug12731.diff.txt uploaded by Corydon76 (license 14) Tested by: seanbright git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27small update to the g() option of app_voicemail tomvanbaak1-0/+1
note that gain changes only work on zap channels right now. issue #12578 shows it's not clear right now. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118416 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27Add a unique id to the datastore allocated in app_chanspy sincemmichelson1-2/+7
it is possible that multiple spies may be listening to the same channel. (closes issue #12376) Reported by: DougUDI Patches: 12376_chanspy_uid.diff uploaded by putnopvut (license 60) Tested by: destiny6628 (closes issue #12243) Reported by: atis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-27Add a note that pbx_config.so is needed for Local channels.tilghman1-1/+4
(Closes issue #12671) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118358 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-25Realtime flag affects construction in multiple ways, so consulting whethertilghman1-6/+16
rtcachefriends was set was done too soon (needed to be done inside build_peer, not just as a flag to build_peer). Also, fullcontact needed to be reconstructed, because realtime separates the embedded ';' into multiple fields. (closes issue #12722) Reported by: barthpbx Patches: 20080525__bug12722.diff.txt uploaded by Corydon76 (license 14) Tested by: barthpbx (Much of the discussion happened on #asterisk-dev for diagnosing this issue) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118251 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Fix a few things I missed to ensure zt_chan_conf structure is not modified ↵jpeeler1-3/+3
in mkintf git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118163 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Add format type checking for recently de-inlined functiontilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118055 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Add information on using the Asterisk console, including tab command linetilghman2-0/+34
completion. (Closes issue #12681) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118052 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-23Don't declare a function that takes variable arguments as inline, because it'srussell2-14/+15
not valid, and on some compilers, will emit a warning. http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline (closes issue #12289) Reported by: francesco_r Patches by Tilghman, final patch by me git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@118048 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22Also remove preamble from asynchronous events (reported by jsmith on ↵tilghman1-0/+9
#asterisk-dev) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117899 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22Take into account the length of delimiters when calculating result string ↵tilghman1-1/+1
length. (closes issue #12696) Reported by: adomjan Patches: func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117809 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Ensure that passed in zt_chan_conf structure is not modified in mkintf.jpeeler1-18/+30
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117582 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Apply the autoframing setting to dialogs that do not get matched against a ↵file1-0/+1
user or peer. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117574 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Revert accidental commit of the last changetilghman1-12/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117523 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Strip the preamble from the output also when -rx is not being usedtilghman2-3/+20
(Related to issue #12702) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117519 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Don't filter the magic character in the network verboser. It gets filteredrussell1-3/+0
once it reaches the client. (related to issue #12702, pointed out by tilghman) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117514 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-211) Don't print the verbose marker in front of every message from ast_verbose()russell2-0/+7
being sent to remote consoles. 2) Fix pbx_gtkconsole to filter out the verbose marker. (related to issue #12702) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117507 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Don't display the verbose marker for calls to ast_verbose() that do not includerussell1-1/+5
a VERBOSE_PREFIX in front of the message. (closes issue #12702) Reported by: johnlange Patched by me git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117479 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-21Pass a pointer for the conf parameter to the function mkintf rather than the ↵jpeeler1-126/+126
whole zt_chan_conf structure. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117462 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19Use the right pthread lock and condition when waiting.file1-1/+14
(closes issue #12664) Reported by: tomo1657 Patches: res_smdi.c.patch uploaded by tomo1657 (license 484) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117135 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19The addition of usleep(2) within ast_assert requires the inclusion of the ↵tilghman1-0/+1
unistd.h header git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117086 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19Make chan_h323 work with pwlib 1.12.0file1-0/+12
(closes issue #12682) Reported by: bamby Patches: pwlib_nopipe.diff uploaded by bamby (license 430) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117081 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-19Avoid access of uninitialized memory. This caused a bunch of crashes for merussell1-1/+1
while doing load testing of development branch where I'm working on some performance improvements. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116978 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-16Check to make sure an RTP structure exists before calling ast_rtp_new_source ↵file1-1/+3
on it. (closes issue #12669) Reported by: sbisker git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Avoid zombies when the channel exits before the AGI.tilghman1-1/+5
(closes issue #12648) Reported by: gkloepfer Patches: 20080514__bug12648.diff.txt uploaded by Corydon76 (license 14) Tested by: gkloepfer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116466 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Add ast_assert(), which can be used to handle fatal errors. It is only compiledrussell8-21/+36
in if dev-mode is enabled, and only aborts if DO_CRASH is defined. (inspired by issue #12650) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116463 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Document exitcontext in app_voicemail sample configqwell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116409 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Add linux-gnueabi in.file1-1/+1
(closes issue #12529) Reported by: tzafrir git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116352 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Detect another way for a connection to have gone away.tilghman1-1/+8
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116296 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-14Accept text messages even withoej1-1/+1
Content-Type: text/plain;charset=Södermanländska git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116230 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13A change to the way channel locks are handled when DEBUG_CHANNEL_LOCKS is ↵mmichelson2-8/+21
defined. After debugging a deadlock, it was noticed that when DEBUG_CHANNEL_LOCKS is enabled in menuselect, the actual origin of channel locks is obscured by the fact that all channel locks appear to happen in the function ast_channel_lock(). This code change redefines ast_channel_lock to be a macro which maps to __ast_channel_lock(), which then relays the proper file name, line number, and function name information to the core lock functions so that this information will be displayed in the case that there is some sort of locking error or core show locks is issued. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116088 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13Fix a deadlock involving channel autoservice and chan_local that was debuggedrussell1-11/+14
and fixed by mmichelson and me. We observed a system that had a bunch of threads stuck in ast_autoservice_stop(). The reason these threads were waiting around is because this function waits to ensure that the channel list in the autoservice thread gets rebuilt before the stop() function returns. However, the autoservice thread was also locked, so the autoservice channel list was never getting rebuilt. The autoservice thread was stuck waiting for the channel lock on a local channel. However, the local channel was locked by a thread that was stuck in the autoservice stop function. It turned out that the issue came down to the local_queue_frame() function in chan_local. This function assumed that one of the channels passed in as an argument was locked when called. However, that was not always the case. There were multiple cases in which this channel was not locked when the function was called. We fixed up chan_local to indicate to this function whether this channel was locked or not. The previous assumption had caused local_queue_frame() to improperly return with the channel locked, where it would then never get unlocked. (closes issue #12584) (related to issue #12603) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@116038 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13Fix an issue that I noticed in autoservice while mmichelson and I were debuggingrussell1-5/+9
a different problem. I noticed that it was theoretically possible for two threads to attempt to start the autoservice thread at the same time. This change makes the process of starting the autoservice thread, thread-safe. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115990 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13Use the right flag to open the audio in non-blocking.file1-2/+1
(closes issue #12616) Reported by: nicklewisdigiumuser git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115944 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-13If the socket dies (read returns 0=EOF), return immediately.tilghman1-1/+1
(Closes issue #12637) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115884 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-12If a thread holds no locks, do not print any information on the thread when ↵mmichelson1-38/+40
issuing a core show locks command. This will help to de-clutter output somewhat. Russell said it would be fine to place this improvement in the 1.4 branch, so that's why it's going here too. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115735 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-09Improve res_ninit and res_ndestroy autoconf logic on the Darwin platform.file3-9/+221
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115579 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Remove debug output.russell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115568 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Merged revisions 115564 via svnmerge from russell1-0/+18
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r115564 | russell | 2008-05-08 14:14:04 -0500 (Thu, 08 May 2008) | 25 lines Fix a race condition that bbryant just found while doing some IAX2 testing. He was running Asterisk trunk running IAX2 calls through a few Asterisk boxes, however, the audio was extremely choppy. We looked at a packet trace and saw a storm of INVAL and VNAK frames being sent from one box to another. It turned out that what had happened was that one box tried to send a CONTROL frame before the 3 way handshake had completed. So, that frame did not include the destination call number, because it didn't have it yet. Part of our recent work for security issues included an additional check to ensure that frames that are supposed to include the destination call number have the correct one. This caused the frame to be rejected with an INVAL. The frame would get retransmitted for forever, rejected every time ... This race condition exists in all versions that got the security changes, in theory. However, it is really only likely that this would cause a problem in Asterisk trunk. There was a control frame being sent (SRCUPDATE) at the _very_ beginning of the call, which does not exist in 1.2 or 1.4. However, I am fixing all versions that could potentially be affected by the introduced race condition. These changes are what bbryant and I came up with to fix the issue. Instead of simply dropping control frames that get sent before the handshake is complete, the code attempts to wait a little while, since in most cases, the handshake will complete very quickly. If it doesn't complete after yielding for a little while, then the frame gets dropped. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115565 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Don't give up on attempting an outbound registration if we receive a 408 ↵russell1-2/+0
Timeout. (closes issue #12323) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115561 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08remove postgres_cdr.sql, as the CDR schema is in realtime_pgsql.sql, as wellrussell1-33/+0
(closes issue #9676) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115557 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Don't exit the script if Asterisk is not running.russell1-1/+2
(closes issue #12611) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115554 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Don't use a channel before checking for channel allocation failure.russell1-6/+6
(closes issue #12609) Reported by: edantie git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115551 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-08Use the same method for executing Asterisk as the rest of the script.russell1-1/+1
(closes issue #12611) Reported by: b_plessis git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115545 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-07Track peer references when stored in the sip_pvt struct as the peer related torussell1-6/+11
a qualify ping or a subscription. This fixes some realtime related crashes. (closes issue #12588) (closes issue #12555) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@115517 f38db490-d61c-443f-a65b-d21fe96a405b