Commit Graph

13185 Commits

Author SHA1 Message Date
Terry Wilson
0999576f0a Don't play audio to the channel if we've masqueraded
(closes issue #14066)
Reported by: bluefox
Tested by: otherwiseguy, bluefox


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169485 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-20 18:40:56 +00:00
Tilghman Lesher
f311539733 Truncate userevents at the end of a line, when the command exceeds the buffer.
(closes issue #14278)
 Reported by: fnordian


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 19:49:25 +00:00
Mark Michelson
ece7a8f9e9 Prevent a crash in chan_local due to a potential NULL pointer dereference
Move the check for if both channels on a local_pvt have generators to below
where p->chan is checked for NULLity (NULLness?). This prevents a crash from
occurring if p->chan is NULL.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@169210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19 15:52:15 +00:00
Mark Michelson
09b6f02459 Account for possible NULL pointer when we receive a 408 in response to a REGISTER
It may be that by the time we receive a reply to a REGISTER request, the attempt has
timed out and thus the registry structure pointed to by the corresponding sip_pvt has
gone away. This situation was handled properly for a 200 OK response, but the 408
case assumed that the sip_registry struct was non-NULL, thus potentially causing a crash

This commit fixes this assumption and prints out a message to the console if we should
receive a late 408 response to a REGISTER


(closes issue #14211)
Reported by: aborghi
Patches:
      14211.diff uploaded by putnopvut (license 60)
Tested by: aborghi



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 22:42:13 +00:00
Tilghman Lesher
d671bb1404 Fix the conjugation of Russian and Ukrainian languages.
(related to issue #12475)
 Reported by: chappell
 Patches: 
       vm_multilang.patch uploaded by chappell (license 8)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168828 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 18:41:35 +00:00
Steve Murphy
93e9f63794 This patch fixes a problem where a goto (or jump, in this case)
fails a consistency check because it can't find a matching 
extension. The problem was a missing instruction to end
the range notation in the code where it converts the pattern
into a regex and uses the regex code to determine the match.

I tested using the AEL code the user supplied, and now,
the consistency check passes.


(closes issue #14141)
Reported by: dimas



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 00:19:12 +00:00
Olle Johansson
464b4a8a84 Meetme actually has realtime but wasn't documented
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 18:43:43 +00:00
Terry Wilson
4b25111108 Convert call to park_call_full to masq_park_call_announce
Since we removed the AST_PBX_KEEPALIVE return value, we need to use masqueraded
parking, otherwise we will try to call ast_hangup() in __pbx_run() and in
do_parking_thread() and then promptly crash.
(closes issue #14215)
	Reported by: waverly360	
	Tested by: otherwiseguy
(closes issue #14228)
	Reported by: kobaz
	Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 18:22:49 +00:00
Tilghman Lesher
daf9a88f60 Blocked revision 168632 from /branches/1.2:
1.2 regression on security fix AST-2009-001
(Closes issue #14238)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 01:20:20 +00:00
Mark Michelson
26658ead16 Fix some crashes from bad datastore handling in app_queue.c
* The queue_transfer_fixup function was searching for and removing
  the datastore from the incorrect channel, so this was fixed.

* Most datastore operations regarding the queue_transfer datastore
  were being done without the channel locked, so proper channel locking
  was added, too.

(closes issue #14086)
Reported by: ZX81
Patches:
      14086v2.patch uploaded by putnopvut (license 60)
Tested by: ZX81, festr



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 00:11:01 +00:00
Richard Mudgett
1a80fbd577 * Fixed create_process() allocation of process ID values.
The allocated process IDs could overflow their respective
NT and TE fields.  Affects outgoing calls.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 21:48:22 +00:00
Sean Bright
f94caa935b Update autosupport script to supply info for both Zaptel and DAHDI in 1.4 and
be sure to run dahdi_test in 1.6.x and trunk instead of zttest.

(closes issue #14132)
Reported by: dsedivec
Patches:
      asterisk-1.4-autosupport.patch uploaded by dsedivec (license 638)
      asterisk-trunk-autosupport.patch uploaded by dsedivec (license 638)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 20:52:00 +00:00
Steve Murphy
7c1d2de899 app_page was failing to compile in dev-mode on my gcc-4.2.4 system. This change gets rid of the warning.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168608 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:34:35 +00:00
Tilghman Lesher
99313c7b92 Don't read into a buffer without first checking if a value is beyond the end.
(closes issue #13600)
 Reported by: atis
 Patches: 
       20090106__bug13600.diff.txt uploaded by Corydon76 (license 14)
 Tested by: atis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 19:02:55 +00:00
Mark Michelson
3af85c8b97 Fix a logic error I found while searching through chan_agent.c
I found that the allow_multiple_logins function would never return
0 due to an incorrect comparison being used when traversing the
list of agents. While I was modifying this function, I also did
a little bit of coding guidelines cleanup, too.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 16:19:26 +00:00
Terry Wilson
b3ea953313 Don't overflow when paging more than 128 extensions
The number of available slots for calls in app_page was hardcoded to 128.
Proper bounds checking was not in place to enforce this limit, so if more than
128 extensions were passed to the Page() app, Asterisk would crash.  This patch
instead dynamically allocates memory for the ast_dial structures and removes
the (non-functional) arbitrary limit.

This issue would have special importance to anyone who is dynamically creating
the argument passed to the Page application and allowing more than 128
extensions to be added by an outside user via some external interface.

The patch posted by a_villacis was slightly modified for some coding guidelines
and other cleanups.  Thanks, a_villacis!
(closes issue #14217)
Reported by: a_villacis
Patches: 
      20080912-asterisk-app_page-fix-buffer-overflow.patch uploaded by a (license 660)
Tested by: otherwiseguy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-14 01:27:18 +00:00
Russell Bryant
9161b7fc87 Revert unnecessary indications API change from rev 122314
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:13:05 +00:00
Terry Wilson
1dc0a2d811 Don't pass a value with a side effect to a macro
(closes issue #14176)
Reported by: paraeco
Patches: 
      chan_sip.c.diff uploaded by paraeco (license 658)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 18:34:14 +00:00
Tilghman Lesher
ebe9c9c5db If either conditional is NULL, don't try copying it.
(closes issue #14226)
 Reported by: caspy
 Patches: 
       20090113__bug14226.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 17:48:00 +00:00
Jeff Peeler
b01ec2512d (closes issue #13881)
Reported by: hoowa

Update the app CDR field for AGI commands that are not executing an application via "exec".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168516 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 21:42:34 +00:00
Jeff Peeler
f1c216e940 (closes issue #12269)
Reported by: IgorG
Tested by: denisgalvao

This gits rid of the notion of an owning_app allowing the request and hangup to be initiated by different threads. Originating from an active agent channel requires this. The implementation primarily changes __login_exec to wait on a condition variable rather than a lock.

Review: http://reviewboard.digium.com/r/35/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 20:26:22 +00:00
Mark Michelson
2d10fef93e I am reverting the fix made in revision 168128 (and its upward merges)
after being contacted by Olle Johansson and being shown how this fix is
incorrect. Thanks to Olle for clearing this up for me.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168482 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 14:58:25 +00:00
Russell Bryant
5dca47a8bf s/ringdance/ringcadence/ for Bulgaria
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-12 14:57:27 +00:00
Kevin P. Fleming
a8af968c1d small commit to test new server
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168382 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-10 20:47:31 +00:00
Kevin P. Fleming
066f4cac24 small commit to test new server
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168379 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-10 20:38:38 +00:00
Kevin P. Fleming
e87d91c541 update to use new sound file packages that include license files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 23:12:29 +00:00
Russell Bryant
b28fcc36f2 Make this compile for mvanbaak
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168198 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 22:14:38 +00:00
Richard Mudgett
c992d555e3 * Fix for JIRA AST-175/ABE-1757
*  Miscellaneous doxygen comments added.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 21:28:42 +00:00
Mark Michelson
2fe132ca35 Add check_via calls to more request handlers
INFO, NOTIFY, OPTIONS, REFER, and MESSAGE requests
were not checking the topmost Via to determine where
to send the response. Adding check_via calls to those
request handlers solves this.

(closes issue #13071)
Reported by: baron
Patches:
      check_via.patch uploaded by baron (license 531)
Tested by: baron


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168128 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-09 20:08:04 +00:00
Tilghman Lesher
8c0191f0dc Don't truncate database results at 255 chars.
(closes issue #14069)
 Reported by: evandro
 Patches: 
       20081214__bug14069.diff.txt uploaded by Corydon76 (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 22:08:56 +00:00
Kevin P. Fleming
ead4ba5cd8 remove an unnecessary argument to queue_request()
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-08 17:24:21 +00:00
Kevin P. Fleming
975a706909 When a SIP request or response arrives for a dialog with an associated Asterisk channel, and the lock on that channel cannot be obtained because it is held by another thread, instead of dropping the request/response, queue it for later processing when the channel lock becomes available.
http://reviewboard.digium.com/r/117/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 23:32:21 +00:00
Russell Bryant
5fe8bde41a Fix the last couple of places where free() was improperly used directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:35:36 +00:00
Russell Bryant
2839e074ef Don't fclose() the file early, the filestream destructor will handle it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:26:42 +00:00
Russell Bryant
301945890d Only try to close the file if one was actually opened
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:19:47 +00:00
Russell Bryant
c67d152525 Don't use free() directly. This caused a crash since ast_filestream is now an ao2 object.
Reported by JunK-Y on IRC, #asterisk-dev


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 22:03:59 +00:00
Russell Bryant
24ccfad6dc Treat an empty string the same way as a NULL country argument.
In passing, simplify the handling of returning a default tone zone.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-07 17:29:53 +00:00
Mark Michelson
5eca294b65 Use the correct variable when creating the format string
(closes issue #14177)
Reported by: nic_bellamy
Patches:
      asterisk-trunk-svn-r167242-ast_db_gettree.patch uploaded by nic (license 299)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 21:35:57 +00:00
Tilghman Lesher
8476207008 Merged revisions 167259 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
  r167259 | tilghman | 2009-01-06 14:44:03 -0600 (Tue, 06 Jan 2009) | 2 lines
  
  Security fix AST-2009-001.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-06 20:48:05 +00:00
Mark Michelson
543dfee83c A couple of changes to T.38 SDP attribute handling
There are some boolean attributes for T.38 such
as T38FaxFillBitRemoval, T38FaxTranscodingMMR, and
T38FaxTranscodingJBIG. By simply being present, we
should treat these as a "true" value. The current
code, however, was requiring a 1 or 0 as the value
of the attribute in order to parse it. This is due
to the fact that there are some T.38 endpoints and
gateways that also transmit this information
incorrectly. This patch follows the "be liberal in
what you accept and strict in what you send"
philosophy by accepting both the correctly- and 
incorrectly-formatted attributes, but only sending
information as it is supposed to be sent.

It was also discovered that a particular type of 
T.38 gateway sends some non-standard T.38 SDP
attributes. Instead of using T38FaxMaxDatagram
and T38MaxBitRate, it used T38MaxDatagram and
T38FaxMaxRate respectively. We now will properly
accept these attributes as well.

Note that there are a lot of patches cited in
the below commit message template. This is
because the person who submitted these patches is
an awesome person and wrote 1.4, 1.6.0, and 1.6.1
variants.

(closes issue #13976)
Reported by: linulin
Patches:
     chan_sip.c.1.4-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.4-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.0-relaxedT38_update1.diff uploaded by arcivanov (license 648)
	 chan_sip.c.1.6.1-relaxedT38_update1.diff uploaded by arcivanov (license 648)
Tested by: arcivanov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-05 16:51:59 +00:00
Tilghman Lesher
30fe8c619d Repeat attempts to write when we receive -EAGAIN from the driver, as detailed
in the ALSA sample code (see http://www.alsa-project.org/alsa-doc/alsa-lib/_2test_2pcm_8c-example.html#a32)
Reported by: Jerry Geis (via the -users list)
Fixed by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@167095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-01 00:01:22 +00:00
Tilghman Lesher
f3f0f40223 Also inherit the musiconhold class.
(Closes #14153)
Reported by: Jerry Geis, via the users list.
Patch by: me (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-31 19:20:35 +00:00
Russell Bryant
d4ac0f7651 Use strncat() instead of an sprintf() in which source and target buffers overlap
http://lists.digium.com/pipermail/asterisk-dev/2008-December/035919.html


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166772 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-28 15:13:48 +00:00
Tilghman Lesher
5dd486be22 Compile, even if both DAHDI and Zaptel are not installed.
(Closes issue #14120)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:35:38 +00:00
Mark Michelson
62c8625f2e Fix a crash resulting from a datastore with inheritance but no duplicate callback
The fix for this is to simply set the newly created datastore's data pointer
to NULL if it is inherited but has no duplicate callback.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 15:16:26 +00:00
Tilghman Lesher
45bc54db0a Use the integer form of condition for integer comparisons.
(closes issue #14127)
 Reported by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-23 04:05:25 +00:00
Mark Michelson
4133fa7cfc Fix a deadlock relating to channel locks and autoservice
It has been discovered that if a channel is locked prior
to a call to ast_autoservice_stop, then it is likely that
a deadlock will occur. The reason is that the call to 
ast_autoservice_stop has a check built into it to be sure
that the thread running autoservice is not currently trying
to manipulate the channel we are about to pull out of 
autoservice.

The autoservice thread, however, cannot advance beyond where
it currently is, though, because it is trying to acquire
the lock of the channel for which autoservice is attempting
to be stopped.

The gist of all this is that a channel MUST NOT be locked
when attempting to stop autoservice on the channel.

In this particular case, the channel was locked by a call
to ast_read. A call to ast_exists_extension led to autoservice
being started and stopped due to the existence of dialplan
switches.

It may be that there are future commits which handle the same
symptoms but in a different location, but based on my looks through
the code, it is very rare to see a construct such as this one.

(closes issue #14057)
Reported by: rtrauntvein
Patches:
      14057v3.patch uploaded by putnopvut (license 60)
Tested by: rtrauntvein

Review: http://reviewboard.digium.com/r/107/



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 20:56:29 +00:00
Russell Bryant
8b68bd17e5 Fix up timeout handling in ast_carefulwrite().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 17:22:56 +00:00
Russell Bryant
acd0af78ea Re-work ref count handling of MoH classes using astobj2 to resolve crashes.
(closes issue #13566)
Reported by: igorcarneiro
Tested by: russell
Review: http://reviewboard.digium.com/r/106/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-22 14:45:27 +00:00
Mark Michelson
7fdf99803e Backport of AUDIOHOOK_INHERIT for Asterisk 1.4
(closes issue #13538)
Reported by: mbit
Patches:
      13538.patch uploaded by putnopvut (license 60)
Tested by: putnopvut



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@166157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-19 23:34:57 +00:00