Commit Graph

11899 Commits

Author SHA1 Message Date
Russell Bryant
a5c9a71b4e Instead of depending on the return value of ast_true(), explicitly set the
eventwhencalled variable to 1.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89844 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:21:13 +00:00
Russell Bryant
3df74ed9ac Don't start/stop autoservice in pbx_extension_helper() unless a channel exists
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:16:00 +00:00
Mark Michelson
a5db0a6103 Two changes with regards to the 'eventwhencalled' option of queues.conf
1) Due to some signed vs. unsigned silliness, setting 'eventwhencalled' to 
   'vars' or 'yes' did exactly the same thing. Thus the sign change of the
   ast_true call.

2) The vars2manager function overwrote a \n for every channel variable it parsed, resulting
   in bizarre output for the channel variables. This patch remedies this.

(related to issue #11385, however I'm not sure if this will actually be enough to close it)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89837 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 23:10:05 +00:00
Russell Bryant
80c81b8e8c Merge changes from team/russell/autoservice_1.4
This set of changes fixes an issue that was reported to me on IRC yesterday.
The user, d1mas, was using chan_zap for incoming calls and was having DTMF
recognition issues in some situations.  Specifically, he noticed that the 
problem occurred when using DISA or WaitExten.  He also noticed that when 
using Read, the problem did not occur.  His system also used DUNDi for 
dialplan lookups.

So, he theorized that if the DUNDi lookups blocked for some period of time,
that audio from the zap channel could get lost.  If the audio got lost, then
it wouldn't be run through the DTMF detector, and digits could get lost.
He was correct, and the following set of changes fixes the problem.  However,
the changes go a little bit further than what was necessary to fix this exact
problem.

1) I updated pbx_extension_helper() to autoservice the associated channel to
   handle cases where extension lookups may take a long time.  This would
   normally be a dialplan switch that does some lookup over the network, such
   as the DUNDi or IAX2 switches.

   This ensures that even while a DUNDi lookup is blocking, the channel will be
   continuously serviced.

2) I made a change to the autoservice code.  This is actually something that
   has bothered me for a long time.  When a channel is in autoservice, _all_
   frames get thrown away.  However, some frames really shouldn't be thrown
   away.  The most notable examples are signalling (CONTROL) frames, and DTMF.

   So, this patch queues up important frames while a channel is in autoservice.
   When autoservice is stopped on the channel, the queued up frames get stuck
   back on the channel so that they can get processed instead of thrown away.

3) I made another change to the autoservice code to handle the case where
   autoservice is started on channels recursively.

   Previously, you could call ast_autoservice_start() multiple times on a
   channel, and it would stop the first time ast_autoservice_stop() gets
   called.  Now, it will ensure that autoservice doesn't actually stop until
   the final call to ast_autoservice_stop().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89790 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 21:45:51 +00:00
Mark Michelson
601df8f699 Changing some calls from free() to ast_free() since they were allocated with
ast_calloc().

(closes issue #11390, reported and patched by Laureano)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 20:22:59 +00:00
Kevin P. Fleming
2fa2fea3f5 on second thought... revert all the other changes i've made in app options parsing leaving only one: if an empty argument is supplied for an option, set that argument pointer to point to an empty string rather than NULL, so that the application can do normal checks on it without worrying about it being NULL
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89709 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 20:16:56 +00:00
Kevin P. Fleming
e31c1b0441 generate a warning when an application option that requires an argument is ignored due to lack of an argument
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 19:36:55 +00:00
Russell Bryant
d96a341228 Add a note to the sample voicemail config noting that when using IMAP storage,
only the first format specified will be attached to the message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89634 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 16:12:33 +00:00
Tilghman Lesher
1d33d680b9 Default result of STAT should be "0" not "".
Reported via the -users mailing list, fixed by me.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 15:38:03 +00:00
Olle Johansson
0c3ec937ce If we get a codec offer using a well-known payload type, but using it for another
codec that we don't know, Asterisk did not remove that codec from the list.

With this patch, we remove the codec from audio and video rtp objects and
deny it ever existed. Thanks to lasse for testing.

(closes issue #11376)
Reported by: lasse
Patches: 
      bug11376.txt uploaded by oej (license 306)
Tested by: lasse


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 15:23:17 +00:00
Olle Johansson
8b650ee007 Clarify limitonpeers=yes
(closes issue #11304)
Reported by: pj



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 07:34:19 +00:00
Steve Murphy
1975b6e753 closes issue #11379; OK, this is an attempt to make both sides happy. To the cdr.conf file, I added the option 'unanswered', which defaults to 'no'. In this mode, you will see a cdr for a call, whether it was answered or not. The disposition will be NO ANSWER or ANSWERED, as appropriate. The src is as you'd expect, the destination channel will be one of the channels from the Dial() call, usually the last in the list if more than one chan was specified. With unanswered set to 'yes', you will still see this cdr entry in both cases. But in the case where the dial timed out, you will also see a cdr for each line attempted, marked NO ANSWER, with no destination channel name. The new option defaults to 'no', so you don't see the pesky extra cdr's by default, and you will not see the irritating 'not posted' messages.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-27 06:24:02 +00:00
Mark Michelson
7166081028 After issuing a "say load new", if a caller hangs up during the middle of playback of a number,
app_playback will continue to try to play the remaining files. With this change, no more files will
be played back upon hangup.

(closes issue #11345, reported and patched by IgorG)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:10:49 +00:00
Mark Michelson
f669a1c661 After issuing a "say load new" tons of warning messages are printed
out to the CLI every time do_say in app_playback is called. Removing these
warnings



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 23:02:30 +00:00
Joshua Colp
aeed294b7b Fix issues with async dialing with an application executing. The application has to be terminated and control returned to the thread before hanging things up. (issue #BE-252)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89610 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 21:10:29 +00:00
Joshua Colp
4ac8f69d0a Add module counting removal for error conditions.
(closes issue #11333)
Reported by: Laureano
Patches:
      res_features_v2.c.patch uploaded by Laureano (license 265)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89599 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 18:02:56 +00:00
Russell Bryant
a17edf7d99 Add channel locking to a function that needed to be doing it. This is just a
little something I noticed while working on a completely unrelated issue.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89594 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:41:04 +00:00
Joshua Colp
107209927a Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled.
(closes issue #11347)
Reported by: ys
Patches:
      pbx.pbx_config.c.diff uploaded by ys (license 281)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:36:45 +00:00
Joshua Colp
19fc56c14d Close the audio file before sending it to the post processing application.
(closes issue #11357)
Reported by: reformed
Patches:
      mixmonitor.patch uploaded by reformed (license 330)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89587 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:20:58 +00:00
Kevin P. Fleming
daea9fd8e8 when parsing application options that take arguments, don't indicate that the option was supplied unless a non-zero-length argument was found for it
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89586 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:20:36 +00:00
Mark Michelson
5efa50746e Revert vmu->email back to an empty string if it was empty when imap_store_file
was called. This prevents sending a duplicate e-mail. 

(closes issue #11204, reported by spditner, patched by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:48:06 +00:00
Joshua Colp
c93621d1ec If channel allocation fails because the alert pipe could not be created also free the scheduler context.
(closes issue #11355)
Reported by: eliel
Patches:
      main.channel.c.patch uploaded by eliel (license 64)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89577 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 15:34:38 +00:00
Joshua Colp
1884c603d6 When unloading app_meetme destroy any auto created contexts created by SLA.
(closes issue #11367)
Reported by: eliel


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89571 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 14:41:03 +00:00
Tilghman Lesher
095108273b We previously attempted to use the ESCAPE clause to set the escape delimiter to
a backslash.  Unfortunately, this does not universally work on all databases,
since on databases which natively use the backslash as a delimiter, the
backslash itself needs to be delimited, but on other databases that have no
delimiter, backslashing the backslash causes an error.

So the only solution that I can come up with is to create an option in res_odbc
that explicitly specifies whether or not backslash is a native delimiter.  If
it is, we use it natively; if not, we use the ESCAPE clause to make it one.

Reported by: elguero
Patch by: tilghman
(Closes issue #11364)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25 17:17:10 +00:00
Tilghman Lesher
7808fb44f1 Free some frames that would otherwise leak on error.
Reported by: Laureano
Patch by: Laureano,tilghman
(Closes issue #11351)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89545 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 16:59:59 +00:00
Tilghman Lesher
e671cb909d Currently, zero-length voicemail messages cause a hangup in VoicemailMain.
This change fixes the problem, with a multi-faceted approach.  First, we
do our best to avoid these messages from being created in the first place,
and second, if that fails, we detect when the voicemail message is
zero-length and avoid exiting at that point.
Reported by: dtyoo
Patch by: gkloepfer,tilghman
(Closes issue #11083)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-24 06:19:23 +00:00
Tilghman Lesher
540a2c7098 Up until this point, the XML output of the manager has been technically
invalid, due to the repetition of certain parameters in a single event.
This caused various issues for XML parsers, some of which refused to parse
at all, given the invalidity of the rendered XML.  So this commit fixes
the XML output, ensuring that each entity parameter has a unique name, thus
ensuring valid XML.
Reported by: msetim
Patch by: tilghman
(Closes issue #10220)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 17:18:26 +00:00
Tilghman Lesher
528dd04ecb Use ESCAPE clause for the first parameter, not just 2nd-Nth parameters.
Reported by: apsaras
Patch by: tilghman
(Closes issue #11353)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89534 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 17:05:10 +00:00
Russell Bryant
53c77e38f4 mvanbaak pointed out a spelling error in this sample configuration file. While
I was at it, I went ahead and tweaked it a little bit more.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89527 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 17:29:41 +00:00
Mark Michelson
ddc5bf5b47 Fix a small error I made in my previous commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:27:51 +00:00
Mark Michelson
d105c24a57 Changing an inaccurate debug message to be less inaccurate. Under the circumstances, this
message would always report that there were 0 members available, even though that may not be true.




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 19:24:22 +00:00
Terry Wilson
9c29d80d70 If a channel gets masqueraded in the middle of a park, don't play the
announcement to the masqueraded channel, and dial back to the original
channel on timeout.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89491 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 18:59:27 +00:00
Kevin P. Fleming
a90e90384c re-doxygen some comments
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89462 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 19:16:24 +00:00
Kevin P. Fleming
337fb0c37f bring back compile-option checking when loading modules, only this time use a string-based storage and comparison mechanism because it is easier to support on other platforms
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89461 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 19:12:52 +00:00
Mark Michelson
da4933e657 According to comments in main/pbx.c, it is essential that if we are going to lock
the conlock as well as the hints lock, it must be locked in that respective order.
In order to prevent a potential deadlock, we need to lock the conlock prior to 
locking the hints lock in ast_hint_state_changed (see the call stack example on
issue #11323 for how this can happen).

(closes issue #11323, reported  by eelcob, suggestion for patch by eelcob, patch by me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 17:50:31 +00:00
Steve Murphy
8a1f941a17 closes issue #11324; break statements missing in switch cases.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89450 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 15:22:08 +00:00
Christian Richter
be20960013 added RR patch from iroot #10908, thanks.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89445 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 13:40:55 +00:00
Joshua Colp
34a3095877 Print out the correct filename (features.conf) in the log message when parkpos options are incorrect.
(closes issue #11295)
Reported by: Laureano
Patches:
      res_features.c.patch uploaded by Laureano (license 265)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 15:53:32 +00:00
Joshua Colp
1bd082719f Clarify documentation a bit, include that a frame has to pass through the core in order for the Local channel optimization to happen.
(closes issue #11246)
Reported by: jon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89416 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 15:24:12 +00:00
Russell Bryant
12d60508f3 Temporarily revert revision 89325, which added md5 magic for keeping track of
what build options were used.  We agreed that we should remove this before
making a 1.4 release, and then we can put it back in.  Then, we can take a
month or so to play around with it to get it how we want it.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 22:26:44 +00:00
Kevin P. Fleming
22b119d188 To help combat problems where people build external modules (asterisk-addons or others) and then change the build options of the Asterisk build in a way that makes the incompatible without warning, this commit introduces an MD5 signature of the important build-time options and includes that signature into modules when they are built. When the loader loads one of these modules and notices the problem, it will emit a warning to console and refuse to initialize the module, as doing so could cause the system to be unstable or even crash.
If you upgrade to this version of Asterisk, you must rebuild *all* of your modules that came from other sources before trying to run this version. If you are using Digium's G.729 binary codec module, you will need v33 or newer.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 16:47:46 +00:00
Mark Michelson
891b3bab2a Make realtime queues accessible from the QUEUE_MEMBER_COUNT function.
(closes issue #11271, reported and patched by atis, with small modifications from me)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89323 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 15:28:22 +00:00
Tilghman Lesher
92d1018c2a Start Asterisk in Debian at a more reasonable time (since zaptel is at level 20)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89302 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:37:38 +00:00
Tilghman Lesher
245abfa1c2 Fix an uninitialized memory read found by valgrind
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:23:14 +00:00
Tilghman Lesher
f39db73930 Yet another memory corruption issue.
Reported by: atis
Patch by: tilghman
Fixes issue #10923


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 18:05:56 +00:00
Russell Bryant
bd5b8a4014 Update the SLAStation application to account for the case where the SLA thread
has a call out to the station,  but the user has pressed a line button to answer
the call instead of picking up the handset.  If they do, the phone sends out a
new INVITE.  So, the SLAStation app must check to see if it is picking up a
ringing trunk, and ensure that the other stations stop ringing.

(reported internally, patched by me, tested by mogorman)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 17:19:28 +00:00
Mark Michelson
1fece3bb67 Undoing previous commit since I realize it was wrong
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:57:28 +00:00
Mark Michelson
88f847869d Adding a missing mutex unlock.
(closes issue 11256, reported and patched by ys)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 14:54:10 +00:00
Olle Johansson
9d3be20a0d Don't send re-invites during pending INVITE transactions.
Patch by one47 - thanks!

Closes issue #9305


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:26:22 +00:00
Olle Johansson
fc49ddab3a Improve support for multipart messages. Code by gasparz, changes
by me (mostly formatting). Thanks, gasparz!

Closes issue #10947


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-15 11:15:09 +00:00