Commit Graph

14065 Commits

Author SHA1 Message Date
Paul Belanger
ae3f99e0b7 Fixed typo in macro-page
Reported to #asterisk-dev by a student of jsmith.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270979 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 21:10:05 +00:00
David Vossel
3245bb4b86 fixes chan_iax2 race condition
There is code in chan_iax2.c that attempts to guarantee that only a single
active thread will handle a call number at a time.  This code works once
the thread is added to an active_list of threads, but we are not currently
guaranteed that a newly activated thread will enter the active_list immediately
because it is left up to the thread to add itself after frames have been
queued to it.  This means that if two frames come in for the same call number
at the same time, it is possible for them to grab two separate threads because
the first thread did not add itself to the active_list fast enough.  This
causes some pretty complex problems.

This patch resolves this race condition by immediately adding an activated
thread to the active_list within the network thread and only depending on
the thread to remove itself once it is done processing the frames queued to
it.  By doing this we are guaranteed that if another frame for the same call
number comes in at the same time, that this thread will immediately be found
in the active_list of threads.

Review: https://reviewboard.asterisk.org/r/720/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 17:35:29 +00:00
Terry Wilson
21bdb89a2b Merged revisions 270658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r270658 | twilson | 2010-06-15 15:18:04 -0500 (Tue, 15 Jun 2010) | 20 lines
  
  Make contactdeny apply to src ip when nat=yes
  
  chan_sip's "contactdeny" feature screens the "to be registered contact".
  In case of nat=yes it should not use the address information from the
  Contact header (which is not used at all for routing), but the source
  IP address of the request.
  
  Thus, if nat=yes and a client sends a request from a denied IP address
  (e.g. by spoofing the src-IP address) it can bypass the screening.
  
  This commit makes contactdeny apply to the src ip when nat=yes instead.
  
  (closes issue #17276)
  Reported by: klaus3000
  Patches: 
        patch-asterisk-trunk-contactdeny.txt uploaded by klaus3000 (license 65)
  Tested by: klaus3000
  
  Review: [full review board URL with trailing slash]
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 22:34:30 +00:00
Tilghman Lesher
0800ce3602 Variables have always been case-sensitive, so we should not be removing case-insensitive matches.
Bug reported via the -dev list.  See
http://lists.digium.com/pipermail/asterisk-dev/2010-June/044510.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 18:25:12 +00:00
Leif Madsen
489f8c063c Move information about zonemessages into the [zonemessages] section.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 12:47:03 +00:00
Alec L Davis
7d953183e6 fixes FXS port still ringing when answered, as reported by Tzafrir on dev-list.
(issue #17067)
Reported by: tzafrir
Tested by: alecdavis



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270404 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 00:16:03 +00:00
Paul Belanger
f86d4ad81e Properly play first file in sort list.
When using sort=alpha we would always skip the first file
in the list first time through.  We now check for that
properly. 

(closes issue #17470)
Reported by: pabelanger
Patches:
      sort.aplha.patch uploaded by pabelanger (license 224)
Tested by: lmadsen

Review: https://reviewboard.asterisk.org/r/703/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-14 21:31:59 +00:00
Paul Belanger
fef18d0409 Fix typo in example
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@270078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-12 18:54:20 +00:00
Tilghman Lesher
ba3f2b0d20 For SpeeX, 0 bits remaining is valid and does not need an emitted warning.
(closes issue #15762)
 Reported by: nblasgen
 Patches: 
       issue15672.patch uploaded by pabelanger (license 224)
 Tested by: nblasgen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269960 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-11 18:23:05 +00:00
Mark Michelson
7a7326f8e9 Fix potential crash when writing raw SLIN audio on a PLC-enabled channel.
The issue here was that the frame created when adjusting for PLC had no offset
to its audio data. If this frame were translated to another format prior to
being sent out an RTP socket, all went well because the translation code would
put an appropriate offset into the frame. However, if the SLIN audio were not
translated before being sent out the RTP socket, bad things would happen.
Specifically, the ast_rtp_raw_write makes the assumption that the frame has
at least enough of an offset that it can accommodate an RTP header. This was
not the case. As such, data was being written prior to the allocation, likely
corrupting the data the memory allocator had written. Thus when the time came
to free the data, all hell broke loose. ....Well, Asterisk crashed at least.

The fix was just what one would expect. Offset the data in the frame by a reasonable
amount. The method I used is a bit odd since the data in the frame is 16 bit integers
and not bytes. I left a big ol' comment about it. This can be improved on if someone
is interested. I was more interested in getting the crash resolved.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 19:30:12 +00:00
Mark Michelson
23fa12ccfa Add text version of PLC doc to 1.4
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269784 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 17:30:40 +00:00
Tilghman Lesher
458abdf68c Ensure restartable system calls can restart (BSD signal semantics)
This eliminates the annoying <beep> on the console.

(closes issue #17477)
 Reported by: jvandal
 Patches: 
       20100610__issue17477.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 07:52:34 +00:00
Russell Bryant
a8f624dc93 Don't stop Asterisk if chan_oss fails to register 'Console' (due to another channel driver already claiming it).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 22:18:37 +00:00
Jason Parker
c4eee1ee7e Let systems without a working fork() use res_musiconhold.
Files mode doesn't require anything special, so that can still be used just fine.

AST-357


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269426 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 21:19:17 +00:00
Paul Belanger
2b04df5697 Fix Debian init script to not use -c.
When using the init script as-is currently, it could cause issues on Debian
such as high CPU usage. This fix has worked for several people so I'm
implementing the change.  We now handle color displays properly.

(closes issue #16784)
Reported by: pabelanger
Patches:
      20100530__issue16784__2.diff.txt uploaded by tilghman (license 14)
Tested by: pabelanger, tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 17:24:53 +00:00
Sean Bright
9cd853fe60 Reduce startup time for cdr_tds with large CDR tables.
Since we are just checking for table existence, add a WHERE clause that will
return no rows but will raise an error if the table doesn't exist.

(closes issue #17380)
Reported by: kkwong
Patches:
      issue17380-01.patch uploaded by seanbright (license 71)
Tested by: kkwong


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@269006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 15:28:49 +00:00
Russell Bryant
0d37564b31 Fix summary for "core waitfullybooted" CLI command. Thanks, mnicholson.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-07 16:07:43 +00:00
Tilghman Lesher
9bf5e172f6 Rest In Peace
http://www.outandaboutnewspaper.com/article/4061


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-05 02:49:52 +00:00
Russell Bryant
9d65386480 Get rid of a warning that gets printed out when the console is configured without any logger levels
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 21:40:53 +00:00
Tilghman Lesher
ee7132528c AC_CONFIG_SUBDIRS has a bad side-effect on cross-compiles.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 20:41:24 +00:00
Russell Bryant
8427de3128 Comment out a rule that likes to break the chan_h323 build randomly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 19:47:41 +00:00
Tilghman Lesher
d20ae22c05 Build menuselect with the build environment's compiler, not the host (target)'s compiler.
(closes issue #17464)
 Reported by: pprindeville
 Tested by: tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@268050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 19:38:57 +00:00
Tilghman Lesher
2e5369c537 As-fixiate the build process
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@267971 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 16:27:02 +00:00
Tilghman Lesher
43cd1e6f6a Make the default install path appear to be /usr on Linux, instead of /usr/local.
Also, reorganize the options, so that they're more alphabetical.

(closes issue #17013)
 Reported by: klaus3000


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@267759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-04 01:16:26 +00:00
Mark Michelson
bc766d5b69 1.4 version of the dead PLC code fix.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@267539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-03 17:39:18 +00:00
Russell Bryant
d4af1fbc81 Add CLI command that blocks until Asterisk has fully booted.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@267183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 19:56:14 +00:00
Paul Belanger
6585975951 Cleanup error/warning messages in AEL2 parser
(closes issue #16684)
Reported by: Silmaril
Patches:
      patch_ael2_logmsg.diff uploaded by Silmaril (license 979)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@267009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 17:14:37 +00:00
Paul Belanger
3d8edccece Backport live_ast script from 1.6.2 branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266924 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-02 15:41:16 +00:00
Tilghman Lesher
f703a2d7fa Prevent CLI prompt from distorting output of lines shorter than the prompt.
Uses the VT100 method of clearing the line from the cursor position to the
end of the line:  Esc-0K

(closes issue #17160)
 Reported by: coolmig
 Patches: 
       20100531__issue17160.diff.txt uploaded by tilghman (license 14)
 Tested by: coolmig


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01 15:17:46 +00:00
Paul Belanger
b3076dd0f5 Fix formatting issue with previous patch.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01 14:57:49 +00:00
Paul Belanger
abc4bceec2 Missing fallback to audio fax feature when T.38 re-INVITE failed
When a T.38 re-INVITE failed with an 488 or 606 answer, we should
fallback to audio fax by send a re-re-INVITE without T.38. The
function is backported from 1.6 asterisk.

(closes issue #16795)
Reported by: vrban

(closes issue #16692)
Reported by: vrban
Patches:
      t38_fallback_to_audio_v3.patch uploaded by vrban (license 756)
Tested by: lmadsen, vrban, haggard

https://reviewboard.asterisk.org/r/514/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266579 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-01 14:54:05 +00:00
Tilghman Lesher
06914c13cf Reverting patch and reopening issue #16784, as patch breaks color display.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-30 04:43:28 +00:00
Tilghman Lesher
a9b91b8435 Use sigaction for signals which should persist past the initial trigger, not signal.
If you call signal() in a Solaris signal handler, instead of just resetting
the signal handler, it causes the signal to refire, because the signal is not
marked as handled prior to the signal handler being called.  This effectively
causes Solaris to immediately exceed the threadstack in recursive signal
handlers and crash.

(closes issue #17000)
 Reported by: rmcgilvr
 Patches: 
       20100526__issue17000.diff.txt uploaded by tilghman (license 14)
 Tested by: rmcgilvr


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 21:11:44 +00:00
David Vossel
9d466eed00 add dahdi_func_write to zap_tech structure
This was supposed to be committed with r263292, the back-port
of teh DAHDI buffer policy dial string option


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 20:33:00 +00:00
Mark Michelson
a69a5d0772 Make AgentComplete message more consistent.
At times, the "Member" field was not specified during the event.
It's there now.

(closes issue #15638)
Reported by: elbriga
Patches:
      patchAppQueueAgentComplete.diff uploaded by elbriga (license 482)




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@266004 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 18:21:10 +00:00
Tilghman Lesher
7f7ae0d3cf Not finding rows in the DB does not rise to the level of a warning.
(closes issue #17062)
 Reported by: drookie
 Patches: 
       20100525__issue17062.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265910 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-26 16:21:00 +00:00
David Vossel
ff8057a92a fixes build issue with zaptel
(closes issue #17394)
Reported by: aragon
Patches:
      half_buffer_fix.diff uploaded by dvossel (license 671)
Tested by: aragon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-25 17:11:40 +00:00
Matthew Nicholson
2fc3375a89 Don't mark the cdr records of unanswered queue calls with "NOANSWER". This restores the behavior prior to r258670.
(closes issue #17334)
Reported by: jvandal
Patches:
      queue-cdr-fixes1.diff uploaded by mnicholson (license 96)
Tested by: aragon, jvandal


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-25 16:48:19 +00:00
Terry Wilson
7e9a71f5d8 Merged revisions 265320,265467 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r265320 | twilson | 2010-05-24 14:06:40 -0500 (Mon, 24 May 2010) | 14 lines
  
  Add the FullyBooted AMI event
  
  It is possible to connect to the manager interface before all Asterisk modules
  are loaded. To ensure that an application does not send AMI actions that might
  require a module that has not yet loaded, the application can listen for the
  FullyBooted manager event. It will be sent upon connection if all modules have
  been loaded, or as soon as loading is complete. The event:
  
     Event: FullyBooted
     Privilege: system,all
     Status: Fully Booted
  
  Review: https://reviewboard.asterisk.org/r/639/
........
  r265467 | twilson | 2010-05-24 17:21:58 -0500 (Mon, 24 May 2010) | 1 line
  
  Merge the rest of the FullyBooted patch
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265570 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-25 13:33:21 +00:00
David Vossel
6105e07933 fixes segfault when using generic plc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-24 19:37:55 +00:00
Mark Michelson
ed585b5bb3 Don't hang up on a queue caller if the file we attempt to play does not exist.
This also fixes a documentation mistake in file.h that made my original attempt
to correct this problem not work correctly.

(closes issue #17061)
Reported by: RoadKill


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@265089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-21 20:59:14 +00:00
Mark Michelson
94238573fa Fix grammatical error in comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264999 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-21 16:53:53 +00:00
Mark Michelson
b91ff0498e Allow ast_safe_sleep to defer specific frames until after the sleep has concluded.
From reviewboard

Background:
A Digium customer discovered a somewhat odd bug. The setup is that parties A
and B are bridged, and party A places party B on hold. While party B is 
listening to hold music, he mashes a bunch of DTMF. Party A takes party
B off hold while this is happening, but party B continues to hear hold
music. I could reproduce this about 1 in 5 times.

The issue:
When DTMF features are enabled and a user presses keys, the channel that
the DTMF is streamed to is placed in an ast_safe_sleep for 100 ms, the
duration of the emulated tone. If an AST_CONTROL_UNHOLD frame is read
from the channel during the sleep, the frame is dropped. Thus the
unhold indication is never made to the channel that was originally placed
on hold.

The fix:
Originally, I discussed with Kevin possible ways of fixing the specific
problem reported. However, we determined that the same type of problem
could happen in other situations where ast_safe_sleep() is used. Using
autoservice as a model, I modified ast_safe_sleep_conditional() to
defer specific frame types so they can be re-queued once the sleep has
finished. I made a common function for determining if a frame should
be deferred so that there are not two identical switch blocks to
maintain.

Review: https://reviewboard.asterisk.org/r/674/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-21 16:28:34 +00:00
Richard Mudgett
20f140f1c7 ast_callerid_parse() had a path that left name uninitialized.
Several callers of ast_callerid_parse() do not initialize the name
parameter before calling thus there is the potential to use an
uninitialized pointer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-20 23:23:21 +00:00
Mark Michelson
610c1dc6bf 1.4 version of PLC fix.
Analogous to trunk revision 264452, but without the change
to chan_sip since it is not necessary in this branch.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-20 15:59:44 +00:00
Matthew Nicholson
f428d9bfdb Set quieted flag when receiving a dtmf tone during playback in speechbackground.
(closes issue #16966)
Reported by: asackheim


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264334 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 20:01:38 +00:00
Tilghman Lesher
136073265c Internal timing is now on by default, if you're using DAHDI 2.3 or above.
The reason for ensuring DAHDI 2.3 or above is that this version ensures that
a timer is always available, whereas in previous versions, it was possible
for DAHDI to be loaded, but have no drivers to actually generate timing.  If
internal_timing was turned on in this circumstance, a complete lack of audio
would result.  This is the reason why internal_timing was not on by default.
However, now that DAHDI ensures the availability of a timer, there is no
reason for this setting to be off (and in fact, it solves a great many initial
user problems).

(closes issue #15932)
 Reported by: dimas
 Patches: 
       20100519__issue15932.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264248 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 17:41:29 +00:00
Alec L Davis
201fb5663a fix incorrectly typed indications for [nz] stutter and dialrecall
(closes issue #17359)
Reported by: alecdavis
Patches: 
      bug17359.diff.txt uploaded by alecdavis (license 585)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@264056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 08:23:07 +00:00
Tilghman Lesher
e7ef5288c9 Because progress is called multiple times, across several frames, we must persist states when detecting multitone sequences.
(closes issue #16749)
 Reported by: dant
 Patches: 
       dsp.c-bug16749-1.patch uploaded by dant (license 670)
 Tested by: dant


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@263949 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-19 06:32:27 +00:00
Jeff Peeler
4a168f6578 Modify directory name reading to be interrupted with operator or pound escape.
In the case of accidentally entering the wrong first three letters for the
reading, users could be very frustrated if the name listing is very long. This
allows interrupting the reading by pressing 0 or #. 0 will attempt to execute
a configured operator (o) extension and # will exit and proceed in the
dialplan.

ABE-2200


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@263769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-18 18:54:58 +00:00