Commit Graph

14167 Commits

Author SHA1 Message Date
Jason Parker d5c19c4c98 Fix issue with decoding ^-escaped characters in realtime.
(closes issue #17790)
Reported by: denzs
Patches: 
      17790-chunky.diff uploaded by qwell (license 4)
Tested by: qwell, denzs


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283880 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27 20:29:11 +00:00
Terry Wilson a0e2fe78a8 Use ast_free since ast_variable_new uses ast_calloc
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27 15:11:11 +00:00
David Vossel c26e47f289 Fixed how Asterisk destroys a dialog on channel hangup before invite receives a response.
If an ast_channel with a SIP tech pvt hangs up before the sip dialog gets a response
to its outgoing INVITE, Asterisk used to pretend_ack the INVITE.  This is not rfc
compliant and results in confusion at the other endpoint.  sip_pretend_ack will ack
and remove all the packets in the retransmit queue.  This means that the INVITE will
stop retransmitting, and that any response to that INVITE that comes after the pretend_ack
occurs will be ignored.

Instead of faking any sort of acknowledgement for an outgoing INVITE during an internal
hangup, we should let the protocol stack process the INVITE transaction and terminate
the dialog properly.  This is achieved by setting the PENDING_BYE flag.  When this flag
is used, once the dialog proceeds to an escapable state the transaction will either be
canceled with a SIP_CANCEL or completed followed immediately by a BYE.  Attempting to do
this any other way is incorrect.  If the endpoint is not responding to the INVITE request,
the INVITE must continue to be retransmitted until it times out which will result in the
dialog being destroyed.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-26 15:22:28 +00:00
David Vossel 3550593f30 This fix makes sure the ast_channel hangs up correctly when the dialog's PENDING_BYE flag is set.
When the pending bye flag is used, it is possible that the dialog will terminate
and leave the sip_pvt->owner channel up.  This is because we never hangup the
ast_channel after sending the SIP_BYE request.  When we receive the response for
the SIP_BYE we set need_destroy which we would expect to destroy the dialog on the
next do_monitor loop, but this is not the case.  The dialog will only be destroyed
once the owner is hungup even with the need_destroy flag set.  This patch sets the
softhangup flag on the ast_channel when a SIP_BYE request is sent as a result of the
pending bye flag.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-24 16:01:51 +00:00
Richard Mudgett 498cbf96bf Merged revision 278274 from
https://origsvn.digium.com/svn/asterisk/trunk

..........
  r278274 | rmudgett | 2010-07-20 17:38:13 -0500 (Tue, 20 Jul 2010) | 1 line

  Reference correct struct member for unlikely event PRI_EVENT_CONFIG_ERR.
..........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-20 16:46:22 +00:00
Richard Mudgett 34806f56f5 Q931 - Sending PROGRESS after sending ALERTING is a protocol error
The PRI layer in chan_dadhi will check if a PROGRESS message has already
been sent, and not allow sending another (although that is technically
allowed by the Q931 spec), however it does not protect against sending an
ALERTING and then sending a PROGRESS message, which is a violation of the
specification.

Most switches don't seem to care too deeply about this, but some do, and
will disconnect the call when receiving this invalid sequence.

Protocol specification reference: T-REC-Q.931-199805-I page 223, "Figure
A.5/Q.931 -- Overview protocol control (network side) point-point
(sheet 3 of 8)"

(closes issue #17874)
Reported by: nic_bellamy
Patches:
      asterisk-1.4-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)
      asterisk-1.6.2-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)
      asterisk-trunk-r282537_no-progress-after-alerting.patch uploaded by nic bellamy (license 299)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@283048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-20 15:24:36 +00:00
David Vossel d04e866925 tos_sip option was not being set correctly
When tos_sip is used, the tos of the sip socket is only set
correctly if the socket binding changes on a reload.  If the binding
stays the same but the TOS changes, the new tos value would not take
into effect.  This patch fixes that.


(closes issue #17712)
Reported by: nickb


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-19 21:03:24 +00:00
Terry Wilson 1c0a484763 Add some documentation about codec negotiation to sip.conf
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-19 02:12:55 +00:00
Terry Wilson c5278fc111 Send a SRCCHANGE indication when we masquerade
Masquerading a channel means that the src of the audio is potentially
changing, so send a SRCCHANGE so that RTP-based media streams can get
a new SSRC generated to reflect the change. Original patch by addix
(along with lots of testing--thanks!).

(closes issue #17007)
Reported by: addix
Patches: 
      1001-reset-SSRC-original-channel.diff uploaded by addix (license 1006)
      srcchange.diff uploaded by twilson (license 396)
Tested by: addix, twilson

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282430 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-16 17:06:37 +00:00
Jason Parker e30457f021 Register CLI commands before parsing config, in case there is a config error.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@282129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 22:49:28 +00:00
Jeff Peeler e90fb11e61 Ensure SSRC is changed when media source is changed to resolve audio delay.
This change causes the SSRC to change right before the channels are bridged,
which is what used to happen. It seems that fixes were made to attempt limiting
SSRC changes, targeted mainly at sending DTMF. DTMF is not affecting the SSRC
with this change.

There are two other control frames sent in ast_channel_bridge that probably
should also be changed to AST_CONTROL_SRCCHANGE as well, but I'm going to leave
this change up to the discretion of resolving issue #17007.

For reference - old review implementing new control frame SRCCHANGE:
https://reviewboard.asterisk.org/r/540

(closes issue #17404)
Reported by: sdolloff
Patches: 
      bug17404.patch uploaded by jpeeler (license 325)
Tested by: sdolloff


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-12 03:00:14 +00:00
Leif Madsen e002fc6cf1 Add Danish support to say.conf.sample
(closes issue #17836)
Reported by: RoadKill
Patches:
      say.conf.sample.patch.dk uploaded by RoadKill (license 933)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-11 18:28:10 +00:00
Leif Madsen eb704b0fe3 Allow say.conf to handle large numbers ending with multiple zeros.
(closes issue #17833)
Reported by: RoadKill
Patches:
      say.conf.sample.patch.largenumbers uploaded by RoadKill (license 933)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-11 17:51:40 +00:00
Russell Bryant 1c72a8ab49 Reset visible indication after answer.
(closes issue #17641)
Reported by: klaus3000
Patches:
      ast1.6.2.9-app_dial-visible_indication.patch.txt uploaded by klaus3000 (license 65)
Tested by: schmidts


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-10 17:45:45 +00:00
Jeff Peeler 5be00864ee Prevent loss of Caller ID information set on local channel after masquerade.
Caller ID set on the channel before a masquerade occurs when using a local
channel would cause the information to be lost. The problem was that the
information was set on a channel destined to be hung up. The somewhat confusing
fix is to detect if any Caller ID has been set on the channel and if so 
preswap the Caller ID data so that basically the masquerade puts the data back.

(closes issue #17138)
Reported by: kobaz

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-09 20:04:30 +00:00
David Vossel 4f90553a45 chan_sip: fixes provisional keepalive scheduled item crash
There is a scheduler item in chan_sip that keeps sending the
last provisional message in response to an INVITE Request for
a period of time until a final response to that INVITE is
sent.  Because of the way this scheduler item works, it requires
a reference to a sip_pvt pointer to work properly.  The problem
with this is that it is currently possible (but rare) for the
sip_pvt to get destroyed and that scheduler item to still
exist.  When this occurs, the scheduler event fires and attempts
to access a freed sip_pvt which causes a crash.

(closes issue #17497)
Reported by: anonymouz666
Patches:
      keepalive_diff_1.4_v2.diff uploaded by dvossel (license 671)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@281185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-06 21:34:38 +00:00
Tilghman Lesher b7cb184823 Change context lock back to a mutex, because functionality depends upon the lock being recursive.
(closes issue #17643)
 Reported by: zerohalo
 Patches: 
       20100726__issue17643.diff.txt uploaded by tilghman (license 14)
 Tested by: zerohalo


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280982 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-05 07:28:33 +00:00
Russell Bryant 5ec4ea248c Copy astcli back to 1.4 so it's available for automated testing purposes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-04 18:54:35 +00:00
Tilghman Lesher 996a394a7d Prevent DAHDI channels from overriding the callerid, once it's been set by the user.
(closes issue #16661)
 Reported by: jstapleton
 Patches: 
       20100414__issue16661.diff.txt uploaded by tilghman (license 14)
       20100415__issue16661__1.6.2.diff.txt uploaded by tilghman (license 14)
 Tested by: jstapleton


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280811 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-03 20:49:10 +00:00
David Vossel 27c86f1e9a fixes issue with translator frame not getting freed
A translator frame even if it local storage so the translation path
can be freed.  This issue prevented g729 licenses from being freed up.

(closes issue #17630)
Reported by: manvirr
Patches:
      encoder_fix.diff uploaded by dvossel (license 671)
Tested by: manvirr, dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-29 19:04:23 +00:00
Jean Galarneau cf0d36226d Fix a dsp structure leak occuring when a local channel is put into a meetme
conference, then masquaraded away.
ABE-2422


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280341 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-29 15:52:31 +00:00
Leif Madsen d41395c6bf Update help text to be less confusing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@280088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-28 13:50:38 +00:00
David Vossel 0ebd53bba8 remove empty audiohook write list on channel
If a channel has an audiohook write list created on it, that
list stays on the channel until the channel is destroyed.  There
is no reason to keep that list on the channel if it becomes empty.
If it is empty that just means we are doing needless translating
for every ast_read and ast_write.  This patch removes the audiohook
list from the channel once it is detected to be empty on either a
read or write.  If a audiohook is added back to the channel after
this list is destroyed, the list just gets recreated as if it never
existed to begin with.

(closes issue #17630)
Reported by: manvirr

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




git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@279945 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-27 20:33:40 +00:00
Bradley Latus 13e5091b72 Minor update to man page
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@279346 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-24 23:57:38 +00:00
Jeff Peeler 20454a45d2 Provide a default value for DAHDI_TRANSCODE so when DAHDI is not installed
menuselect doesn't get confused:
Unknown value '' found in build_tools/menuselect-deps for DAHDI_TRANSCODE


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@279344 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-24 23:27:22 +00:00
Richard Mudgett 08883af231 SIP promiscuous redirect could fail to dial the redirect.
The ast_channel was created with one variable to ast_request() but the
call to ast_call() that initiates the outgoing call was using a different
variable.  The two variables are not equivalent if the call_forward string
included a channel technology specifier.  e.g., SIP/200


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@279206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 21:56:44 +00:00
Mark Michelson 7bc66e1d77 Backport fixes for sip_uri_params_cmp() from trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@279053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 18:04:05 +00:00
Tilghman Lesher 6a367c5674 Establish a maximum version for openh323 (i.e. not opal), because chan_h323 will fail to load, even if it links.
(issue #17679)
Reported by: am


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278984 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 17:04:15 +00:00
Tilghman Lesher 307d1b7888 Avoid race with consolethread on shutdown (on parallel processors).
(closes issue #17080)
 Reported by: sybasesql
 Patches: 
       20100721__issue17080.diff.txt uploaded by tilghman (license 14)
 Tested by: sybasesql


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 16:42:25 +00:00
Richard Mudgett 8f60bcf42f DNID does not get cleard on a new call when using immediate=yes with ISDN signaling.
When you are using chan_dahdi ISDN signaling with immediate=yes and a call
comes in without a DNID then you get the DNID of a previous call.
Chan_dahdi does not touch the DNID field on a new call if it does not have
a DNID.

Made always copy the DNID from the new call.

The patches backport the relevant changes from trunk -r210387.

(closes issue #17568)
Reported by: wuwu
Patches:
      issue17568_v1.4.patch uploaded by rmudgett (license 664)
      issue17568_v1.6.2.patch uploaded by rmudgett (license 664)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-22 19:31:34 +00:00
Mark Michelson f4f7637e62 Allow PLC to function properly when channels use SLIN for audio.
If a channel involved in a bridge was using SLIN audio, then translation
paths were not guaranteed to be set up properly since in all likelihood
the number of translation steps was only 1.

This patch enforces the transcode_via_slin behavior if transcode_via_slin
or generic_plc is enabled and one of the formats to make compatible is
SLIN.

AST-352



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-22 14:55:04 +00:00
Tilghman Lesher 7df9bcf5e7 Delete IMAP messages in reverse order, to ensure reordering after each expunge does not cause deletion of the wrong message.
(closes issue #16350)
 Reported by: noahisaac
 Patches: 
       20100623__issue16350.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 22:23:13 +00:00
Tilghman Lesher 8618bacfd8 Do not queue up DTMF frames while a call is on hold.
(Fixes ABE-2110)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278167 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 20:59:06 +00:00
Tilghman Lesher b765278efe Off-by-one error
(closes issue #16506)
 Reported by: nik600
 Patches: 
       20100629__issue16506.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@278023 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 16:37:18 +00:00
Paul Belanger b48d6c3dbe Regression with T.38 negotiation
Prior to 1.4.26.3 T.38 negotiation worked properly, in the case
of the reporter.  

(issue #16852)
Reported by: cfc

(closes issue #16705)
Reported by: mpiazzatnetbug
Patches:
      issue16705_2.diff uploaded by ebroad (license 878)
Tested by: vrban, ebroad, c0rnoTa, samdell3

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 20:56:07 +00:00
Jean Galarneau 20c9dd4aef Avoid trying to pickup a parked extension before the park operation is completed.
A crash could occur if the extension is picked up while the parking extension is
being announced. Testing pu->notquiteyet while searching for a parked extension
resolves this crash.

(ABE-2418)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-19 20:16:36 +00:00
Tilghman Lesher 891555ad4a Remove uclibc cross-compile triplet, as uclibc has a working fork()... it's only uclinux that does not.
(closes issue #17616)
 Reported by: pprindeville


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 16:59:11 +00:00
Tim Ringenbach 99202cbc03 Save and restore AST_FLAG_BRIDGE_HANGUP_DONT on attended transfer.
ast_bridge_call() clears AST_FLAG_BRIDGE_HANGUP_DONT. But during an attended
transfer, ast_bridge_call() is called for a second bridge on the same channel,
and it clears that flag, which still needs to get set for when the original
ast_bridge_call() gets control back and checks it.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 22:43:39 +00:00
Tilghman Lesher d38b8e2674 Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
(closes issue #17369)
 Reported by: gkservice
 Patches: 
       20100625__issue17369.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 21:54:29 +00:00
Matthew Nicholson 1c8d76145b Default to no udptl error correction so that error correction will be disabled in the event that the remote end indicates that they do not support the error correction mode we requested.
FAX-128


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 21:18:38 +00:00
Richard Mudgett 308d812403 priexclusive in chan_dahdi.conf ignored when reloading dahdi module
During a reload, the priexclusive and outsignalling parameters are not
read in from the config file as intended.  Unfortunately, they get set to
defaults as a result.  This patch makes sure that they do not get set to
defaults during a reload.

(closes issue #17441)
Reported by: mtryfoss
Patches:
      issue17441_v1.4.patch uploaded by rmudgett (license 664)
      issue17441_v1.6.2.patch uploaded by rmudgett (license 664)
      issue17441_trunk.patch uploaded by rmudgett (license 664)
Tested by: rmudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 20:18:54 +00:00
Matthew Nicholson 9f51a79d88 Interpret device state AST_DEVICE_UNKNOWN as extension state AST_EXTENSION_NOT_INUSE.
(closes issue #16035)
Reported by: francesco_r
Patches:
      pbx.c.patch uploaded by viniciusfontes (license 978)
Tested by: francesco_r, agx, lawbar


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 18:30:22 +00:00
Tilghman Lesher 7ac1e8e9c7 If variable gotten is not set, will segfault on Solaris.
(closes issue #17636)
 Reported by: bklang


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 18:04:11 +00:00
Matthew Nicholson cc8a3986cf For pass through DTMF tones, measure the actual duration between the begin and end packets on the wire. If it is detected to be less than AST_MIN_DTMF_DURATION, trigger dtmf emulation.
AST-362


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277247 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 17:29:57 +00:00
Paul Belanger d9e34da4ae Total analysis time error with SIP and silence suppression
When using app_amd with SIP providers that have silence
suppression on, the iTotalTime count increases exponentially.

(closes issue #17656)
Reported by: juls


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@277182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-16 17:10:36 +00:00
Jeff Peeler 4fbc487659 In a perfect world, the frame source would never be NULL. In the meantime, don't crash when it is.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-15 13:48:58 +00:00
Leif Madsen 65cad38b6b Update documentation for voicemail.conf externpass option.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-14 11:49:01 +00:00
Russell Bryant 26706f51b4 Only reset a CDR that exists.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276126 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13 19:14:54 +00:00
Russell Bryant dca56377a4 Use chan->cdr instead of chan_cdr (just like peer->cdr instead of peer_cdr in the last commit).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@276123 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13 19:06:53 +00:00
Russell Bryant 2a19af50e8 Access peer->cdr directly instead of through a saved off reference.
At this point in the code, it is possible that peer_cdr may be invalid.
Specifically, in the blind transfer code, CDRs are swapped between channels.
So, peer_cdr is no longer == peer->cdr.

The scenario that exposed a crash in this code was a blind transfer that hit
the system call limit, causing the transferee channel to get destroyed after
the transfer attempt failed.  Even if it succeeds and this code doesn't crash,
this code was still trying to reset a CDR on a channel that was now owned by
a different thread, which is a BadThing(tm).

(ABE-2417)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@275994 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-13 16:51:18 +00:00