asterisk/apps
Steve Murphy 6fad66dfb3 Merged revisions 152535 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r152535 | murf | 2008-10-28 22:36:32 -0600 (Tue, 28 Oct 2008) | 46 lines

The magic trick to avoid this crash is not to
try to find the channel by name in the list,
which is slow and resource consuming, but rather
to pay attention to the result codes from the
ast_bridge_call, to which I added the 
AST_PBX_NO_HANGUP_PEER_PARKED value, which
now are returned when a channel is parked.
Why? because CDR's aren't generated via parking,
so nothing is needed, but if a transfer occurred,
there are critical things I need.

If you get AST_PBX_KEEPALIVE,
then don't touch the channel pointer.

If you get AST_PBX_NO_HANGUP_PEER, or
AST_PBX_NO_HANGUP_PEER_PARKED, then don't
touch the peer pointer.

Updated the several places where the results
from a bridge were not being properly obeyed,
and fixed some code I had introduced so that
the results of the bridge were not overridden 
(in trunk).

All the places that previously tested for 
AST_PBX_NO_HANGUP_PEER now have to check for
both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED.

I tested this against the 4 common parking
scenarios:


1. A calls B; B answers; A parks B; B hangs up while A is getting the parking
slot announcement, immediately after being put on hold.

2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but
before the park times out.

3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold.

4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out.


No crash.

I also ran the scenarios above against valgrind, and accesses looked good.



........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 05:01:00 +00:00
..
Makefile Merged revisions 127892,127895 via svnmerge from 2008-07-03 22:23:04 +00:00
app_adsiprog.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_alarmreceiver.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_amd.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_authenticate.c Give app_authenticate the ability to select a prompt other than the default. 2008-10-18 03:35:24 +00:00
app_cdr.c whitespace fixes only. 2008-02-09 11:27:10 +00:00
app_chanisavail.c Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. 2008-06-12 17:27:55 +00:00
app_channelredirect.c Use proper return values for a few application modules 2008-06-03 19:48:37 +00:00
app_chanspy.c Merged revisions 139213 via svnmerge from 2008-08-20 22:16:36 +00:00
app_controlplayback.c whitespace fixes only. 2008-02-09 11:27:10 +00:00
app_dahdibarge.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_dahdiras.c build against the now-typedef-free dahdi/user.h, and remove some #ifdefs for features that will always be present in DAHDI 2008-07-29 22:22:13 +00:00
app_dahdiscan.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_db.c whitespace fixes only. 2008-02-09 11:27:10 +00:00
app_dial.c Merged revisions 152535 via svnmerge from 2008-10-29 05:01:00 +00:00
app_dictate.c whitespace fixes only. 2008-02-09 11:27:10 +00:00
app_directed_pickup.c Merge app_pickupchan with app_directed_pickup, for AST-27. 2008-04-25 18:32:22 +00:00
app_directory.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_disa.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_dumpchan.c Modify TIMEOUT() to be accurate down to the millisecond. 2008-05-01 23:06:23 +00:00
app_echo.c Minor spacing change 2008-10-15 15:30:21 +00:00
app_exec.c For the purpose of making the changed syntax to ExecIf easier to transition, 2008-06-06 17:34:21 +00:00
app_externalivr.c cleaup of the TCP/TLS socket API: 2008-10-19 19:11:28 +00:00
app_fax.c API differences in spandsp 0.0.6pre1 and higher 2008-10-14 15:15:45 +00:00
app_festival.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_flash.c Merged revisions 125132 via svnmerge from 2008-06-25 23:05:28 +00:00
app_followme.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_forkcdr.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_getcpeid.c Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. 2008-06-12 17:27:55 +00:00
app_ices.c Merged revisions 135058 via svnmerge from 2008-08-01 11:47:34 +00:00
app_image.c Change SendImage() to output a more consistent status variable. 2008-07-28 16:49:29 +00:00
app_ivrdemo.c include "logger.h" and errno.h from asterisk.h - usage shows that they 2007-11-19 18:52:04 +00:00
app_jack.c Update instructions for getting libresample 2008-09-02 15:11:53 +00:00
app_macro.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_meetme.c Fix option handling code. 2008-10-17 04:28:13 +00:00
app_milliwatt.c Janitor patch to change uses of sizeof to ARRAY_LEN 2008-07-11 18:09:35 +00:00
app_minivm.c Reverting format addition for now 2008-10-09 21:47:02 +00:00
app_mixmonitor.c Default file modes should always be full read and write, to allow the system 2008-10-21 15:20:50 +00:00
app_morsecode.c Lock around variables retrieved, and copy the values, if they stay persistent, 2008-04-30 19:21:04 +00:00
app_mp3.c - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause 2008-05-22 16:29:54 +00:00
app_nbscat.c - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause 2008-05-22 16:29:54 +00:00
app_osplookup.c Everytime a compile fails, a puppy dies. 2008-09-13 14:15:08 +00:00
app_page.c Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow. 2008-06-12 17:27:55 +00:00
app_parkandannounce.c remove remaining Zaptel references in various places 2008-07-28 16:42:00 +00:00
app_playback.c (closes issue #13557) 2008-09-25 22:21:28 +00:00
app_privacy.c add a new argument to PrivacyManager to specify a context 2008-06-08 11:40:44 +00:00
app_queue.c Merged revisions 152535 via svnmerge from 2008-10-29 05:01:00 +00:00
app_read.c Modify TIMEOUT() to be accurate down to the millisecond. 2008-05-01 23:06:23 +00:00
app_readexten.c Modify TIMEOUT() to be accurate down to the millisecond. 2008-05-01 23:06:23 +00:00
app_readfile.c remove another set of redundant #include "asterisk/options.h" 2007-11-21 23:24:55 +00:00
app_record.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_rpt.c Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating 2008-09-12 23:30:03 +00:00
app_sayunixtime.c remove another set of redundant #include "asterisk/options.h" 2007-11-21 23:24:55 +00:00
app_senddtmf.c Document that the duration of dtmf may be passed to 2008-07-17 21:26:41 +00:00
app_sendtext.c Fix a bug where SENDTEXTSTATUS isn't set properly when it isn't 2008-07-21 20:54:09 +00:00
app_setcallerid.c Merged revisions 114242 via svnmerge from 2008-04-18 06:53:47 +00:00
app_skel.c Updating app_skel.c to follow coding guidelines 2008-10-16 22:36:08 +00:00
app_sms.c Answer the channel prior to checking for the 'a' 2008-10-16 22:44:05 +00:00
app_softhangup.c include "logger.h" and errno.h from asterisk.h - usage shows that they 2007-11-19 18:52:04 +00:00
app_speech_utils.c Merged revisions 147517 via svnmerge from 2008-10-08 14:53:51 +00:00
app_stack.c Set ARGC in subroutines with the number of arguments passed. 2008-10-27 16:44:55 +00:00
app_system.c shuffle a little bit the content of header files to reduce dependencies. 2007-11-22 03:50:04 +00:00
app_talkdetect.c Add an option, specifying maximum analysis time for talk detection. 2008-06-17 21:42:42 +00:00
app_test.c - revert change to ast_queue_hangup and create ast_queue_hangup_with_cause 2008-05-22 16:29:54 +00:00
app_transfer.c Remove options argument parsing/syntax (it isn't used any longer) 2008-10-27 16:03:12 +00:00
app_url.c shuffle a little bit the content of header files to reduce dependencies. 2007-11-22 03:50:04 +00:00
app_userevent.c remove redundant headers 2007-11-22 01:39:06 +00:00
app_verbose.c more header removal 2007-11-22 04:37:08 +00:00
app_voicemail.c Merged revisions 152463 via svnmerge from 2008-10-28 22:33:40 +00:00
app_waitforring.c Whitespace changes only 2008-04-25 20:20:10 +00:00
app_waitforsilence.c Merged revisions 149061 via svnmerge from 2008-10-14 20:16:48 +00:00
app_waituntil.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_while.c More RSW merges. Everything from apps/ except for the big offenders 2008-08-10 14:45:25 +00:00
app_zapateller.c Use defined return values in load_module in more places. 2007-12-26 20:02:27 +00:00
enter.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
leave.h remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00
rpt_flow.pdf remove extraneous svn:executable properties 2005-11-29 18:24:39 +00:00