Commit Graph

730 Commits

Author SHA1 Message Date
Jason Parker
ede010d0d0 Fix some odd formatting I missed..
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-02 19:01:59 +00:00
Jason Parker
01480eb1fb Finish up on transferee channel before return on failure.
Issue 10821, patch by Ivan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-02 18:52:55 +00:00
Russell Bryant
63217678cb Add another sanity check in the AGI read loop. We really don't care about
EAGAIN unless we didn't read an entire line.  If there is a newline at the
end if the read buffer, break, because we got the whole thing.
(reported and patched by bmd)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 19:56:28 +00:00
Joshua Colp
27a869e423 Fix randomness. save_pos was being set to 0 initially instead of -1, causing it to jump to position 0 when moh started.
(closes issue #10859)
Reported by: jamesgolovich
Patches:
      asterisk-mohpos2.diff.txt uploaded by jamesgolovich (license 176)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 13:57:42 +00:00
Russell Bryant
d6b8fb4dc0 gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774, patch from qwell)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:37:20 +00:00
Russell Bryant
0f23b76a39 Add a new patch to handle interrupting the fgets() call when using FastAGI.
This version of the patch maintains the original behavior of the code when
not using FastAGI.
(closes issue #10553)
Reported by: juggie
Patches:
      res_agi_fgets-4.patch uploaded by juggie (license 24)
      res_agi_fgets_1.4svn.patch uploaded by juggie (license 24)
	  Slight mods by me
Tested by: juggie, festr


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 22:42:27 +00:00
Russell Bryant
db99815a6a Handle the case where there are multiple dynamic features with the same digit
mapping, but won't always match the activated on/by access controls.  In that
case, the code needs to keep trying features for a match.
(reported by Atis on the asterisk-dev list, patched by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 16:46:59 +00:00
Russell Bryant
4b6653a436 Fix a check of the wrong pointer, as pointed out by an XXX comment left in
the code.  The problem was harmless, however.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 21:56:32 +00:00
Russell Bryant
347dce5c71 revert patch from issue #10553, as someone not using fastagi reported that this
broke their system.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82278 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-12 15:11:11 +00:00
Russell Bryant
faad24c675 (closes issue #10553)
Reported by: juggie
Patches:
      res_agi_fgets-2.patch uploaded by juggie (license 24)
Tested by: juggie

When using fastagi, fgets() can return before a full line is read.  Add explicit
handling for the case where it gets interrupted.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82245 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 15:26:51 +00:00
Mark Michelson
2a3b64bf70 Fixes a memory leak
(closes issue #10658, reported and patched by Ivan)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06 15:20:36 +00:00
Philippe Sultan
022b5c1696 According to both RFC 3920 - section 9.1.2 - and Google's XMPP server
complaint, if set, the 'from' attribute must be set to the user's full
JID.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-06 14:20:54 +00:00
Russell Bryant
aa3b7e22f5 Fix an issue that can occur when you do an attended transfer to parking. If
you complete the transfer before the announcement of the parking spot finishes,
then the channel being parked will hear the remainder of the announcement.
These changes make it so that will not happen anymore.

Basically, res_features sets a flag on the channel is playing the announcement
to so that the file streaming core knows that it needs to watch out for a
channel masquerade, and if it occurs, to abort the announcement.

(closes BE-182)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-05 20:53:41 +00:00
Joshua Colp
a026dc5f43 Make it the engine's responsible to check for the presence of results.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-31 15:53:16 +00:00
Joshua Colp
85bf0ee987 (closes issue #10618)
Reported by: dimas
Don't pass through the stopped sounds frame.... just drop it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-31 14:38:59 +00:00
Joshua Colp
279d96a974 (closes issue #10009)
Reported by: dimas
Don't output a bridge failed warning message if it failed because one of the channels was part of the masquerade process. That is perfectly normal.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 23:53:41 +00:00
Joshua Colp
a47dcc167c (issue #10599)
Reported by: dimas
Handle the -1 control subclass during feature dialing (it indicates to stop sounds).


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-30 14:23:40 +00:00
Russell Bryant
6e01a4ddaf (closes issue #10419)
Reported by: mustardman
Patches:
      asterisk-mohposition.diff.txt uploaded by jamesgolovich (license 176)

This patch fixes a few problems with music on hold.
 * Fix issues with starting at the beginning of a file when it shouldn't.
 * Fix the inuse counter to be decremented even if the class had not been
   set to be deleted when not in use anymore
 * Don't arbitrarily limit the number of MOH files to 255


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 16:16:25 +00:00
Russell Bryant
ed6d4ec72c When executing a dynamic feature, don't look it up a second time by digit pattern
after we already looked it up by name.  This causes broken behavior if there is
more than one feature defined with the same digit pattern.
(closes issue #10539, reported by bungalow, patch by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 20:16:41 +00:00
Russell Bryant
fa1bc2a13b Revert res_agi fix that didn't quite work until we get it right ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80469 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-23 15:49:28 +00:00
Russell Bryant
99adc3f020 Juggie in #asterisk-dev was reporting problems where fgets would return
without reading  the whole line when using fastagi.  When this happens,
errno was set to EINTR or EAGAIN.  This patch accounts for the possibility
and lets fgets continue in that case.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-22 19:53:30 +00:00
Russell Bryant
e24788d06f Fix a little race condition that could cause a crash if two channels had MOH
stopped at the same time that were using a class that had been marked for
deletion when its use count hits zero.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79792 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 22:32:33 +00:00
Russell Bryant
3301d70848 This patch fixes a bug where reloading the module with "module reload" did not
delete classes from memory that were no longer in the config.  This patch fixes
that problem as well as another one.  Previously, if you reloaded MOH using the
"moh reload" CLI command, which behaved differently than "module reload ...",
MOH had to be stopped on every channel and started again immediately.  However,
there was no way to tell what class was being used, so they would all fall back
to the default class.

(closes issue #10139)
Reported by: blitzrage
Patches: 
      asterisk-10139-advanced.diff.txt uploaded by jamesgolovich (license 176)
Tested by: jamesgolovich


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 22:24:25 +00:00
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
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
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
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
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
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
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
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
Joshua Colp
35ceaca691 Add a flag to the speech API that allows an engine to set whether it received results or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 16:17:09 +00:00
Russell Bryant
0bc611f555 (closes issue #10279)
Reported by: seanbright
Patches:
      res_agi.carefulwrite.1.4.07252007.patch uploaded by seanbright (license 71)
      res_agi.carefulwrite.trunk.07252007.patch uploaded by seanbright (license 71)

Allow the "agi_network: yes" line to be printed out in the AGI debug output.
Also, allow partial writes to be handled when writing out this line just like
it is for all of the others.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77788 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 19:13:31 +00:00
Tilghman Lesher
834260a648 Merged revisions 77782 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r77782 | tilghman | 2007-07-30 13:40:54 -0500 (Mon, 30 Jul 2007) | 2 lines

Revert change in revision 71656, even though it fixed a bug, because many people were depending upon the (broken) behavior.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 18:43:55 +00:00
Joshua Colp
cd53ad9161 (closes issue #10327)
Reported by: kkiely
Instead of directly mucking with the extension/context/priority of the channel we are transferring when it has a PBX simply call ast_async_goto on it. This will ensure that the channel gets handled properly and sent to the right place.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 17:11:02 +00:00
Tilghman Lesher
548f3e339e Missing newline
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@77571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 18:15:58 +00:00
Joshua Colp
95be40cb27 (closes issue #10246)
Reported by: fkasumovic
Patches:
      res_conver.patch uploaded by fkasumovic (license #101)
Use the last occurance of . to find the extension, not the first occurance.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@76067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-20 17:10:17 +00:00
Russell Bryant
bdf09824c6 (issue #10210)
Reported by: juggie
Patches:
      10210-1.4-grr.patch uploaded by juggie (license #24)
Tested by: juggie, blitzrage

Log a warning if someone uses DeadAGI on a live channel.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 20:33:06 +00:00
Russell Bryant
6f40b0d2b4 Remove a duplicated newline character in AGI debug output.
(closes issue #10207, patch by seanbright)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75401 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-17 19:45:07 +00:00
Russell Bryant
aa44ffb5c3 Merged revisions 75107 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75107 | russell | 2007-07-13 15:35:22 -0500 (Fri, 13 Jul 2007) | 3 lines

Fix a couple potential minor memory leaks.  load_moh_classes() could return
without destroying the loaded configuration.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75108 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:36:16 +00:00
Russell Bryant
e7afb1e237 Merged revisions 75059 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r75059 | russell | 2007-07-13 15:07:21 -0500 (Fri, 13 Jul 2007) | 6 lines

Ensure that adding a user to the list of users of a specific music on hold
class is not done at the same time as any of the other operations on this list
to prevent list corruption.  Using the global moh_data lock for this is not
ideal, but it is what is used to protect these lists everywhere else in the
module, and I am only changing what is necessary to fix the bug.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75067 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-13 20:10:40 +00:00
Joshua Colp
54b08bfe83 Merged revisions 74814 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74814 | file | 2007-07-12 12:51:24 -0300 (Thu, 12 Jul 2007) | 2 lines

Only print out a warning for situations where it is actually helpful. (issue #10187 reported by denke)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-12 15:53:55 +00:00
Russell Bryant
8b7295be2d Merged revisions 74656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74656 | russell | 2007-07-11 13:33:23 -0500 (Wed, 11 Jul 2007) | 4 lines

Make sure that the ESCAPE immediately follows the condition that uses LIKE.
This fixes realtime extensions with ODBC.
(closes issue #10175, reported by stuarth, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 18:34:51 +00:00
Russell Bryant
3ddbe8e0b6 fix an uninitialized variable
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 16:00:11 +00:00
Russell Bryant
b4865e6eea Merged revisions 74313 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74313 | russell | 2007-07-10 10:30:20 -0500 (Tue, 10 Jul 2007) | 3 lines

Only use ESCAPE when LIKE is used.  
(issue #10075, this part reported by jmls on IRC, patch by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:31:41 +00:00
Russell Bryant
b4960ab566 (closes issue #10123)
Reported by: blitzrage
Patches submitted by: juggie, qwell, me
Tested by: blitzrage

When trying to find a music on hold class to use, try all of the options,
instead of only the first one that is set.  Also, change the MusicOnHold
applications to not hang up on the channel when a class can not be found.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 20:53:46 +00:00
Russell Bryant
cfc227a879 Merged revisions 73684 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r73684 | russell | 2007-07-06 11:06:27 -0500 (Fri, 06 Jul 2007) | 8 lines

(closes issue #10075)
Reported by: apsaras
Patches submitted by: Corydon76
Tested by: apsaras

Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as
an escape character.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73696 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 16:12:51 +00:00
Russell Bryant
6a2ab6b475 Pass HOLD and UNHOLD frames to the other channel when they are returned from a
native bridge function.  This fixes a problem where when two zap channels are
natively bridged and one does a flash hook, the other channel did not receive
music on hold.  (Reported to me directly by Doug Bailey at Digium)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-05 20:50:08 +00:00
Tilghman Lesher
34ee6b0df8 Fix 1.4 breakage
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@72554 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-29 04:43:15 +00:00
Tilghman Lesher
ad5ad13662 Merged revisions 71656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r71656 | tilghman | 2007-06-25 13:12:37 -0500 (Mon, 25 Jun 2007) | 2 lines

Issue 10035 - handle_exec returns a result inconsistent with all of the other AGI commands

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@71657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-25 18:14:59 +00:00