Commit Graph

13555 Commits

Author SHA1 Message Date
Sean Bright
a34f50f08b Backport fix for parallel build warnings from trunk r199781.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@200185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-11 22:20:31 +00:00
Leif Madsen
c5ee7242d8 Fix path for .flavor and .version.
(issue #14737)
Reported by: davidw
Patches:
      flavor.patch uploaded by davidw (license 780)
Tested by: davidw


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@200037 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-11 12:12:06 +00:00
Sean Bright
035b942a7a __WORDSIZE is not available on all platforms, so use sizeof(void *) instead.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-10 16:08:35 +00:00
Sean Bright
aea9d7d060 Fix a typo in the stack size calculation just introduced.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-08 19:28:33 +00:00
Sean Bright
0d849d509d Increase the size of our thread stack on 64 bit processors.
We were setting the stack size for each thread to 240KB regardless of
architecture, which meant that in some scenarios we actually had less available
stack space on 64 bit processors (pointers use 8 bytes instead of 4).  So now we
calculate the stack size we reserve based on the platform's __WORDSIZE, which
gives us:

     32 bit -> 240KB
     64 bit -> 496KB
    128 bit -> 1008KB (that's right, we're ready for 128 bit processors)

Patch typed by me but written by several members of #asterisk-dev, including
Kevin, Tilghman, and Qwell.

(closes issue #14932)
Reported by: jpiszcz
Patches:
      06052009_issue14932.patch uploaded by seanbright (license 71)
Tested by: seanbright


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-08 19:24:32 +00:00
David Vossel
d3bea6da02 Fixes issue with hints giving unexpected results.
Hints with two or more devices that include ONHOLD gave unexpected results.

(closes issue #15057)
Reported by: p_lindheimer
Patches:
      onhold_trunk.diff uploaded by dvossel (license 671)
      pbx.c.1.4.patch uploaded by p (license 558)
      devicestate.c.trunk.patch uploaded by p (license 671)
Tested by: p_lindheimer, dvossel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199297 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-05 21:19:56 +00:00
David Vossel
ed94be12f0 Additional updates to AST-2009-001
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 19:00:15 +00:00
Sean Bright
7605487610 Safely handle AMI connections/reload requests that occur during startup.
During asterisk startup, a lock on the list of modules is obtained by the
primary thread while each module is initialized.  Issue 13778 pointed out a
problem with this approach, however.  Because the AMI is loaded before other
modules, it is possible for a module reload to be issued by a connected client
(via Action: Command), causing a deadlock.

The resolution for 13778 was to move initialization of the manager to happen
after the other modules had already been lodaded.  While this fixed this
particular issue, it caused a problem for users (like FreePBX) who call AMI
scripts via an #exec in a configuration file (See issue 15189).

The solution I have come up with is to defer any reload requests that come in
until after the server is fully booted.  When a call comes in to
ast_module_reload (from wherever) before we are fully booted, the request is
added to a queue of pending requests.  Once we are done booting up, we then
execute these deferred requests in turn.

Note that I have tried to make this a bit more intelligent in that it will not
queue up more than 1 request for the same module to be reloaded, and if a
general reload request comes in ('module reload') the queue is flushed and we
only issue a single deferred reload for the entire system.

As for how this will impact existing installations - Before 13778, a reload
issued before module initialization was completed would result in a deadlock.
After 13778, you simply couldn't connect to the manager during startup (which
causes problems with #exec-that-calls-AMI configuration files).  I believe this
is a good general purpose solution that won't negatively impact existing
installations.

(closes issue #15189)
(closes issue #13778)
Reported by: p_lindheimer
Patches:
      06032009_15189_deferred_reloads.diff uploaded by seanbright (license 71)
Tested by: p_lindheimer, seanbright

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@199022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-04 14:14:57 +00:00
Sean Bright
f3b85fface Fix a possible crash in pbx_spool.
We were trying to reference members of a struct that had previously been freed.
This patch makes sure that we free the struct after it has been removed from
the spooler queue.

(closes issue #15072)
Reported by: garlew
Patches:
      spool.diff uploaded by garlew (license 376)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-03 20:39:10 +00:00
David Vossel
ddb4e3f2e7 Generic call forward api, ast_call_forward()
The function ast_call_forward() forwards a call to an extension specified in an ast_channel's call_forward string.  After an ast_channel is called, if the channel's call_forward string is set this function can be used to forward the call to a new channel and terminate the original one.  I have included this api call in both channel.c's ast_request_and_dial() and res_feature.c's feature_request_and_dial().  App_dial and app_queue already contain call forward logic specific for their application and options.

(closes issue #13630)
Reported by: festr

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-03 15:49:46 +00:00
Tilghman Lesher
af31809bcf If using the old deprecated format, a reload would cause the class to disappear.
(closes issue #14759)
 Reported by: lidocaineus
 Patches: 
       20090518__issue14759.diff.txt uploaded by tilghman (license 14)
 Tested by: lmadsen


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-01 20:07:04 +00:00
Sean Bright
8fc78eae7a Properly terminate AMI JabberSend response messages.
The response message (either Error or Success) needs an extra trailing \r\n
after the fields to inform the client that the message is complete.

(closes issue #14876)
Reported by: srt
Patches:
      05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
      asterisk_14876.patch uploaded by srt (license 378)
      trunk-14876-2.diff uploaded by phsultan (license 73)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 19:36:20 +00:00
Russell Bryant
e86b26f1a8 Fix a crash that occurred when MWI SMDI messages expired.
(closes issue #14561)
Reported by: cmoss28


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 03:42:46 +00:00
Sean Bright
48253ef901 Treat an empty FORWARD_CONTEXT the same way we treat a missing one.
(closes issue #15056)
Reported by: p_lindheimer
Patches:
      05292009_bug15056.diff uploaded by seanbright (license 71)
Tested by: p_lindheimer


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198251 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 02:46:41 +00:00
Matthew Nicholson
aa2fd9a4c2 Use AST_CDR_NOANSWER instead of AST_CDR_NULL as the default CDR disposition.
This change also involves the addition of an AST_CDR_FLAG_ORIGINATED flag that is used on originated channels to distinguish: them from dialed channels.

(closes issue #12946)
Reported by: meral
Patches:
      null-cdr2.diff uploaded by mnicholson (license 96)
Tested by: mnicholson, dbrooks

(closes issue #15122)
Reported by: sum
Tested by: sum



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@198068 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 18:53:01 +00:00
Sean Bright
be8d983874 Fix 'make config' target for Slackware.
There was a missing semi-colon after the echo statement in the Makefile that was
causing problems for some users.  Fix suggested by reporter.

(closes issue #15225)
Reported by: pdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 18:14:12 +00:00
Leif Madsen
ad5f20b94b Update MixMonitor documentation.
Updated the MixMonitor documentation for the 'b' option so that
it is more obvious that you must not optimize awat the Local
channel when using this option.

(issue #14829)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 23:57:00 +00:00
David Vossel
67928d88a9 'iax show peer blah' now outputs whether or not peer 'blah' is in trunk mode or not.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:51:52 +00:00
Mark Michelson
590408dca3 Allow for media to arrive from an alternate source when responding to a reinvite with 491.
When we receive a SIP reinvite, it is possible that we may not be able to process the
reinvite immediately since we have also sent a reinvite out ourselves. The problem is
that whoever sent us the reinvite may have also sent a reinvite out to another party,
and that reinvite may have succeeded.

As a result, even though we are not going to accept the reinvite we just received, it
is important for us to not have problems if we suddenly start receiving RTP from a new
source. The fix for this is to grab the media source information from the SDP of the
reinvite that we receive. This information is passed to the RTP layer so that it will
know about the alternate source for media.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197588 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:27:49 +00:00
Eliel C. Sardanons
26cec158af Use the address we already know when reloading a peer with nat=yes.
If we already have an address for a peer, and we are reloading the sip
configuration, try to use that address to contact the peer, instead of
getting it from the Contact.

(closes issue #15194)
Reported by: ibc
Patches:
      sip.patch uploaded by eliel (license 64)
      Tested by: manwe



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 15:21:32 +00:00
Mark Michelson
3268149a1f Add flags to chanspy audiohook so that audio stays in sync.
There are two flags being added to the chanspy audiohook here. One
is the pre-existing AST_AUDIOHOOK_TRIGGER_SYNC flag. With this set,
we ensure that the read and write slinfactories on the audiohook do
not skew beyond a certain tolerance.

In addition, there is a new audiohook flag added here,
AST_AUDIOHOOK_SMALL_QUEUE. With this flag set, we do not allow for
a slinfactory to build up a substantial amount of audio before 
flushing it. For this particular issue, this means that the person 
spying on the call will hear the conversations in real time with very 
little delay in the audio.

(closes issue #13745)
Reported by: geoffs
Patches:
      13745.patch uploaded by mmichelson (license 60)
Tested by: snblitz



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197537 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 14:49:13 +00:00
Joshua Colp
eb2a672328 Fix a bug where the flag indicating the presence of rport would get overwritten by the nat setting.
The presence of rport is now stored as a separate flag. Once the dialog is setup and authenticated
(or it passes through unauthenticated) the proper nat flag is set.

(closes issue #13823)
Reported by: dimas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-28 13:44:58 +00:00
Sean Bright
ad4de8c79c Use bash explicitly when calling build_tools/mkpkgconfig from the Makefile.
Since we use bashisms in build_tools/mkpkgconfig, we should call on bash
explicitly when running from the Makefile, otherwise we get errors during a
'make install.'

(closes issue #15209)
Reported by: seandarcy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 20:12:06 +00:00
Olle Johansson
59a69ff380 Typo fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 20:07:04 +00:00
Tilghman Lesher
292448fd86 Use a different determinator on whether to print the delimiter, since leading fields may be blank.
(closes issue #15208)
 Reported by: ramonpeek
 Patch by me, though inspired in part by a patch from ramonpeek


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197194 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 19:09:42 +00:00
Jeff Peeler
829907e467 Fix broken attended transfers
The bridge was terminating immediately after the attended transfer was 
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.

(closes issue #15183)
Reported by: andrebarbosa
Tested by: andrebarbosa, tootai, loloski



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 16:49:38 +00:00
Sean Bright
a2fd7f4e47 Fix handling of the 'state_interface' option of the 'queue add member' CLI
command.

This change relates to r184980, which was a backport of the state interface
changes to app_queue from trunk.  trunk and all of the 1.6.x branches are not
affected.

'queue add member' allows for specifying an interface to use for device state
when adding a queue member via CLI, but the validation code was not properly
updated to reflect this optional argument.

(closes issue #15198)
Reported by: loloski
Patches:
      05272009_app_queue.diff uploaded by seanbright (license 71)
Tested by: loloski


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@197024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-27 13:54:35 +00:00
Russell Bryant
245950ad00 Resolve a file handle leak.
The frames here should have always been freed.  However, out of luck, there was
never any memory leaked.  However, after file streams became reference counted,
this code would leak the file stream for the file being read.

(closes issue #15181)
Reported by: jkroon


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@196826 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 18:14:36 +00:00
Joshua Colp
aca2aadbfa Remove some bash specific stuff from safe_asterisk.
(closes issue #10812)
Reported by: paravoid
Patches:
      safe_asterisk_bashism.diff uploaded by tzafrir (license 46)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@196657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 13:06:09 +00:00
Joshua Colp
e79b7e3c8d Fix a bug where using immediate with mISDN caused a cause code of 16 to get sent back instead of 1 if the 's' extension did not exist.
(closes issue #12286)
Reported by: lmamane


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@196116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-22 13:54:17 +00:00
David Vossel
620bae6924 Sign problem calculating timestamp for iax frame leads to no audio on the receiving peer.
There are rare cases in which a frame's delivery timestamp is slightly less than the iax2_pvt's offset.  This causes the pvt's timestamp to be a small negative number, but since the timestamp value is unsigned it looks like a huge positive number.  This patch checks for this negative case and sets the ms to zero.  A similar check is already done right below this one in the 'else' statement.

(closes issue #15032)
Reported by: guillecabeza
Patches:
      chan_iax2.c.patch_timestamp uploaded by guillecabeza (license 380)
Tested by: guillecabeza

(closes issue #14216)
Reported by: Andrey Sofronov



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 19:04:56 +00:00
Matthew Nicholson
df4812c96e This commit prevents cdr records with AST_CDR_FLAG_ANSLOCKED and AST_CDR_FLAG_LOCKED from being updated in certain cases.
This is accomplished by adding two functions to update the answer time and disposition of calls that checks for the proper lock flags.  These functions are used in the ast_bridge_call() function so that ForkCDR(A) calls are respected.

This patch also modifies the way ast_bridge_call() chooses the cdr record to base the bridged_cdr on.  Previously the first unlocked cdr record would be chosen, now instead the first cdr record is chosen and forked cdr records are moved to the bridge_cdr.  This allows the original cdr record and any forked cdr records to be properly updated with answer and end times.

(closes issue #13797)
Reported by: sh0t
Tested by: sh0t

(closes issue #14744)
Reported by: deepesh


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 15:25:50 +00:00
Joshua Colp
91843c8c58 Fix some code that wrongly assumed a pointer would always be non-NULL when dealing with CDRs after a bridge.
(closes issue #15079)
Reported by: barryf


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 17:30:25 +00:00
Joshua Colp
65494bfdf7 Fix a bug where the MeetMe option 'D' did not actually prompt for the pin.
(closes issue #15050)
Reported by: pmhaddad


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-20 17:14:00 +00:00
Tilghman Lesher
6de96b9120 Ensure thread keys are initialized before attempting to access them.
(closes issue #14889)
 Reported by: jaroth
 Patches: 
       app_voicemail.c.patch uploaded by msirota (license 758)
 Tested by: msirota, BlargMaN


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-19 20:12:20 +00:00
Joshua Colp
64c1093e14 Fix a bug where direct RTP setup would partially occur even when disabled if the calling channel was answered.
(issue #13545)
Reported by: davidw
(issue #14244)
Reported by: mbnwa


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195448 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-19 14:41:45 +00:00
Tilghman Lesher
efb22ba096 Add a similar dependency on SMDI for voicemail as already exists for ADSI.
(closes issue #14846)
 Reported by: pj
 Patches: 
       20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
       20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
       20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195366 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:24:13 +00:00
Joshua Colp
ee5ca5fb33 Fix a typo which caused loss of audio when using G729 in some scenarios with a smoother present.
(closes issue #15105)
Reported by: bamby
Patches:
      process-vad-correctly.diff uploaded by bamby (license 430)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195206 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 15:51:22 +00:00
Joshua Colp
ac71a26c0f Fix a bug where the codecs of the called party leg were not properly sent back to the caller call leg when reinvited.
(closes issue #13569)
Reported by: bkw918


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195095 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 13:53:39 +00:00
Russell Bryant
85483848d0 Don't try to unlock a bogus channel.
(closes issue #15144)
Reported by: cristiandimache


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@195020 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 12:57:46 +00:00
David Vossel
ca3481edb9 IAX2 REGAUTH loop
IAX was not sending REGREJ to terminate invalid registrations.  Instead it sent another REGAUTH if the authentication challenge failed.  This caused a loop of REGREQ and REGAUTH frames.

(Related to Security fix AST-2009-001)

(closes issue #14867)
Reported by: aragon
Tested by: dvossel

(closes issue #14717)
Reported by: mobeck
Patches:
      regauth_loop_update_patch.diff uploaded by dvossel (license 671)
Tested by: dvossel



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194873 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 22:43:13 +00:00
Russell Bryant
5b9004d067 Fix some spelling fail.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 18:43:18 +00:00
David Vossel
1e410cdfc5 Update to previous IAX2 "Ghost" Channels patch.
Fixed some comments made on reviewboard for the previous patch.

(issue #14207)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 15:40:37 +00:00
David Vossel
616674ae68 IAX2 "Ghost" Channels
There is a bug tracker issue where people are reporting "Ghost" channels in their 'iax2 show channels' output.  The confusion is caused by channels being listed as "(NONE)" with format "unknown".  These are not channels of coarse.  They are usually just pending registration or poke requests, but it is confusing output.  To help make sense of this I have added two columns to 'iax2 show channels'.  One shows the first message which started the transaction, and the second shows the last message sent by either side of the call.  This helps diagnose why the entry exists and why it may not go away.

(closes issue #14207)
Reported by: clive18

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 22:59:43 +00:00
Kevin P. Fleming
9a14ec91a7 Update URL to Reviewboard
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 22:23:49 +00:00
Mark Michelson
7aa29c797a Fix a race condition where a reinvite could trigger a 482 response.
The loop detection/spiral detection code in chan_sip used the owner
channel's state as a criterion for determining if the incoming INVITE
is a looped request. The problem with this is that the INVITE-handling
code happens in a different thread than the thread that marks the owner
channel as being up. As a result, if a reinvite were to come in very quickly,
say from another Asterisk on the same LAN, it was possible for the reinvite
to arrive before the owner channel had been set to the up state.

This patch corrects the problem by using the invitestate of the sip_pvt
instead, since that can be guaranteed to be set correctly by the time
the reinvite arrives. Since there is a switch statement further in the
INVITE-handling code, the AST_STATE_RINGING state also checks the invitestate
of the sip_pvt in case we should actually be treating the channel as if it were
up already.

(closes issue #12215)
Reported by: jpyle
Patches:
      12215_confirmed.patch uploaded by mmichelson (license 60)
Tested by: lmadsen



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194484 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-14 22:17:55 +00:00
Mark Michelson
7189d75805 Remove an extraneous unlocking operation from ast_channel_free.
In the case that we could not remove the desired channel from the
list of channels, there was an extra call to unlock the channel list.
Since we unlock the list later on in the function anyway, this results
in the list being unlocked twice yet only being locked once.

(closes issue #15098)
Reported by: tim_ringenbach
Patches:
      remove_extra_unlock.diff uploaded by tim (license 540)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194356 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-13 19:41:44 +00:00
Doug Bailey
0e29c52c46 Pull in a piece of murf's 88166 patch that makes it safe to call
pbx_substitute_variables_helper_full with a non-zero'd buffer 



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-13 16:18:36 +00:00
Joshua Colp
0a55b56dc8 Fix RFC2833 issues with DTMF getting duplicated and with duration wrapping over.
(closes issue #14815)
Reported by: geoff2010
Patches:
      v1-14815.patch uploaded by dimas (license 88)
Tested by: geoff2010, file, dimas, ZX81, moliveras
(closes issue #14460)
Reported by: moliveras
Tested by: moliveras


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194208 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-13 13:38:01 +00:00
Tilghman Lesher
c23d9c8960 Fix logic for how to proceed with a single digit extension.
(closes issue #15091)
 Reported by: andrew
 Patches: 
       20090512__issue15091.diff.txt uploaded by tilghman (license 14)
 Tested by: andrew


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@194137 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-13 00:52:03 +00:00