]> git.ipfire.org Git - thirdparty/asterisk.git/log
thirdparty/asterisk.git
14 years agoConfBridge does not handle hangup properly
Kinsey Moore [Tue, 21 Jun 2011 16:09:14 +0000 (16:09 +0000)] 
ConfBridge does not handle hangup properly

When playing back a prompt to a channel, confbridge neglects to check for
hangup events causing lockup condititions for hangups that occur before
actually joining the conference.  This change ensures that the user is removed
from the conference in the event of a premature hangup.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324305 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove extra 'the'.
Leif Madsen [Mon, 20 Jun 2011 18:12:32 +0000 (18:12 +0000)] 
Remove extra 'the'.
Reported by Vlad Povorozniuc

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324241 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRevert previous merge which had extra changes.
Leif Madsen [Mon, 20 Jun 2011 18:11:09 +0000 (18:11 +0000)] 
Revert previous merge which had extra changes.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324240 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove extra 'the'.
Leif Madsen [Mon, 20 Jun 2011 18:07:44 +0000 (18:07 +0000)] 
Remove extra 'the'.
Reported by Vlad Povorozniuc

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324239 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoIgnore media offers with a port of 0
Terry Wilson [Mon, 20 Jun 2011 17:33:07 +0000 (17:33 +0000)] 
Ignore media offers with a port of 0

Section 5.1 of RFC3264 states:
  A port number of zero in the offer indicates that the stream is offered
  but MUST NOT be used.

(closes issue ASTERISK-17845)
Reported by: jacco
Patches:
      issue19281_2.patch uploaded by jacco (license 1277)
Tested by: jacco, twilson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd Username and Secret fields to manager Login action.
Leif Madsen [Fri, 17 Jun 2011 18:51:16 +0000 (18:51 +0000)] 
Add Username and Secret fields to manager Login action.
Pointed out by Vlad Povorozniuc

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324178 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix typo in documentation.
Leif Madsen [Fri, 17 Jun 2011 18:38:40 +0000 (18:38 +0000)] 
Fix typo in documentation.
Pointed out by Vlad Povorozniuc

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324176 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd header string to libpri debug output.
Richard Mudgett [Fri, 17 Jun 2011 18:23:19 +0000 (18:23 +0000)] 
Add header string to libpri debug output.

Add header string to libpri debug output so the libpri output can be
found/extracted easier from huge debug trace files.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324174 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix grammar in documentation for Goto() and GotoIf()
Leif Madsen [Fri, 17 Jun 2011 15:14:54 +0000 (15:14 +0000)] 
Fix grammar in documentation for Goto() and GotoIf()
(closes issue ASTERISK-18023)
Reported by: Tim Osman

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324115 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoShame on me
Terry Wilson [Thu, 16 Jun 2011 22:41:01 +0000 (22:41 +0000)] 
Shame on me

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324049 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoLock the channel before calling the setoption callback
Terry Wilson [Thu, 16 Jun 2011 22:35:41 +0000 (22:35 +0000)] 
Lock the channel before calling the setoption callback

The channel needs to be locked before calling these callback functions. Also,
sip_setoption needs to lock the pvt and a check p->rtp is non-null before using
it.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@324048 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThe test_event unit test is occasionally failing.
Richard Mudgett [Thu, 16 Jun 2011 18:12:32 +0000 (18:12 +0000)] 
The test_event unit test is occasionally failing.

Wait for the special posted event to process before adding a new
subscription.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323990 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoDon't assume ASTDBDIR exists
Terry Wilson [Thu, 16 Jun 2011 15:58:22 +0000 (15:58 +0000)] 
Don't assume ASTDBDIR exists

It most likely doesn't on FreeBSD

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323932 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove now-useless cast of ARRAY_LEN
Terry Wilson [Wed, 15 Jun 2011 20:03:58 +0000 (20:03 +0000)] 
Remove now-useless cast of ARRAY_LEN

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323866 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMake ARRAY_LEN() return the same type on x86 and x86_64 systems
Terry Wilson [Wed, 15 Jun 2011 19:58:18 +0000 (19:58 +0000)] 
Make ARRAY_LEN() return the same type on x86 and x86_64 systems

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323863 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix more ARRAY_LEN format string issues
Terry Wilson [Wed, 15 Jun 2011 19:45:20 +0000 (19:45 +0000)] 
Fix more ARRAY_LEN format string issues

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323859 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 323733 via svnmerge from
Terry Wilson [Wed, 15 Jun 2011 18:21:52 +0000 (18:21 +0000)] 
Merged revisions 323733 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323733 | twilson | 2011-06-15 13:13:00 -0500 (Wed, 15 Jun 2011) | 16 lines

  Merged revisions 323732 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r323732 | twilson | 2011-06-15 13:06:24 -0500 (Wed, 15 Jun 2011) | 9 lines

    Fix DYNAMIC_FEATURES

    DYNAMIC_FEATURES were broken by a recent DTMF change. This patch makes
    sure that dynamic features are also checked when deciding whether or not
    to pass DTMF through or store it for interpreting.

    (closes issue ASTERISK-17914)
    Reported by: vrban
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323754 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdds locking to find_table in res_configure_pgsql to prevent a crash.
Jonathan Rose [Wed, 15 Jun 2011 17:42:42 +0000 (17:42 +0000)] 
Adds locking to find_table in res_configure_pgsql to prevent a crash.

Bryonclark described the problem as occuring during this function because of multiple
simultaneous database operations causing corruption against a pgsqlConn object.

(closes issue ASTERISK-17811)
Reported by: byronclark
Patches:
      pgsql_find_table_locking.patch uploaded by byronclark (license 1200)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323730 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCast ARRAY_LEN to size_t for ast_logging
Terry Wilson [Wed, 15 Jun 2011 17:09:51 +0000 (17:09 +0000)] 
Cast ARRAY_LEN to size_t for ast_logging

32-bit and 64-bit machines return different types for ARRAY_LEN(), so cast
it before using in a format string.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323672 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd a test to the event unit tests to catch ASTERISK-18002.
Richard Mudgett [Wed, 15 Jun 2011 16:43:31 +0000 (16:43 +0000)] 
Add a test to the event unit tests to catch ASTERISK-18002.

The new tests check to see if there are ANY subscribers to the event type
when ast_event_check_subscriber() is not passed any specific ie values.

(issue ASTERISK-18002)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323670 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years ago[regression] Voicemail MWI is no longer sent.
Richard Mudgett [Wed, 15 Jun 2011 16:43:18 +0000 (16:43 +0000)] 
[regression] Voicemail MWI is no longer sent.

When leaving a voicemail, the MWI message is never sent.  The same thing
happens when checking a voicemail and marking it as read.

If you restart Asterisk, everything comes up at that state correctly, but
changes to the messages in voicemail causes the light to not be set
appropriately.  Very easy to reproduce.

* Made ast_event_check_subscriber() return TRUE if there are ANY
subscribers to an event type when there are no restricting ie values
passed.  This allows an event being queued to be queued.

(closes issue ASTERISK-18002)
Reported by: lmadsen
Tested by: lmadsen, irroot
Patches:
     jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)

(closes issue ASTERISK-18019)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323669 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdds PQclear calls on result to various parts of res_conf_pgsql
Jonathan Rose [Wed, 15 Jun 2011 16:09:24 +0000 (16:09 +0000)] 
Adds PQclear calls on result to various parts of res_conf_pgsql

(closes issue ASTERISK-17812)
Reported by: byronclark
Patches:
      pgsql_pqclear.patch uploaded by byronclark (license 1200)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323610 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 323579 via svnmerge from
Sean Bright [Wed, 15 Jun 2011 15:31:53 +0000 (15:31 +0000)] 
Merged revisions 323579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r323579 | seanbright | 2011-06-15 11:22:50 -0400 (Wed, 15 Jun 2011) | 32 lines

  Merged revisions 323559 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r323559 | seanbright | 2011-06-15 11:15:30 -0400 (Wed, 15 Jun 2011) | 25 lines

    Resolve a segfault/bus error when we try to map memory that falls on a page
    boundary.

    The fix for ASTERISK-15359 was incorrect in that it added 1 to the length of the
    mmap'd region.  The problem with this is that reading/writing to that extra byte
    outside of the bounds of the underlying fd causes a bus error.

    The real issue is that we are working with both a FILE * and the raw fd
    underneath it and not synchronizing between them.  The code that was removed in
    ASTERISK-15359 was correct, but we weren't flushing the FILE * before mapping
    the fd.

    Looking at the manager code in 1.4 reveals that the FILE * in 'struct
    mansession' is never used except to create a temporary file that we immediately
    fdopen.  This means we just need to write a 0 byte to the fd and everything will
    just work.  The other branches require a call to fflush() which, while not a
    guaranteed fix, should reduce the likelihood of a crash.

    This all makes sense in my head.

    (closes issue ASTERISK-16460)
    Reported by: Ravelomanantsoa Hoby (hoby)
    Patches:
     issue17747_1.4_svn_markII.patch uploaded by Sean Bright (license #5060)
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323608 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd missing break in ast_event_get_cached().
Richard Mudgett [Wed, 15 Jun 2011 00:50:20 +0000 (00:50 +0000)] 
Add missing break in ast_event_get_cached().

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323456 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMade ast_sockaddr_split_hostport() port warning msgs more meaningful.
Richard Mudgett [Tue, 14 Jun 2011 17:21:39 +0000 (17:21 +0000)] 
Made ast_sockaddr_split_hostport() port warning msgs more meaningful.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323394 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd more strict hostname checking to ast_dnsmgr_lookup().
Richard Mudgett [Tue, 14 Jun 2011 17:21:24 +0000 (17:21 +0000)] 
Add more strict hostname checking to ast_dnsmgr_lookup().

Change suggested in review.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323392 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoChanges contact use in build_peer to use the FORCE_RPORT flag instead of RPORT_PRESENT
Jonathan Rose [Tue, 14 Jun 2011 16:38:43 +0000 (16:38 +0000)] 
Changes contact use in build_peer to use the FORCE_RPORT flag instead of RPORT_PRESENT

It turned out that this was causing NAT=Yes to always use rport when present which was
against 1.6.2 behavior and the check itself was redundant since the only way this
segment of code could be reached was if RPORT_PRESENT was already evaluated as true
earlier.

(closes issue ASTERISK-17789)
Reported by: byronclark
Patches:
      use_sip_nat_force_rport.patch uploaded by byronclark (license 1200)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323371 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd rtpkeepalives back to 1.8
Terry Wilson [Tue, 14 Jun 2011 16:33:55 +0000 (16:33 +0000)] 
Add rtpkeepalives back to 1.8

The RTP-engine conversion left out support for handling rtpkeepalives.
This patch adds them back.

(closes issue ASTERISK-17304)
Reported by: lmadsen

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323370 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdditional documentation for bindaddr.
Leif Madsen [Mon, 13 Jun 2011 20:22:21 +0000 (20:22 +0000)] 
Additional documentation for bindaddr.
Note that bindaddr will only enable UDP instead of both UDP and TCP which is
what I would expect for backwards compatibility with systems being upgraded
which only support UDP transportation.

(closes issue ASTERISK-17976)
Reported by: Sean Darcy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323234 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAvoid dividing by zero with L() option to Dial()
Leif Madsen [Mon, 13 Jun 2011 19:51:52 +0000 (19:51 +0000)] 
Avoid dividing by zero with L() option to Dial()

Reported by: nicolasom
Patches:

issue-17995.patch - nicolasom (License #5994)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323213 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoTweak documentation for AGI Hangup command.
Leif Madsen [Mon, 13 Jun 2011 19:00:41 +0000 (19:00 +0000)] 
Tweak documentation for AGI Hangup command.

(closes issue ASTERISK-17999)
Reported by: Ben Klang
Patches:
     hangup-doc.diff - uploaded by Ben Klang (License #5876)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323154 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoUnlock the sip channel during fax detection like chan_dahdi does to prevent a deadloc...
Matthew Nicholson [Fri, 10 Jun 2011 19:20:41 +0000 (19:20 +0000)] 
Unlock the sip channel during fax detection like chan_dahdi does to prevent a deadlock with ast_autoservice_stop.

(closes issue ASTERISK-17798)
tested by mnicholson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@323040 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAvoid a DB1 infinite loop bug
Terry Wilson [Fri, 10 Jun 2011 15:29:00 +0000 (15:29 +0000)] 
Avoid a DB1 infinite loop bug

Explicity check the last entry in the DB and make sure that we don't iterate
past it. Since there can be no duplicates, this just makes sure that we stop
after matching the last key.

This patch also refactors the code to get away from some code duplication. A
previous patch added many astdb tests and this patch passed them.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322981 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd some astdb unit tests
Terry Wilson [Fri, 10 Jun 2011 02:33:23 +0000 (02:33 +0000)] 
Add some astdb unit tests

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322923 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCorrect ast_db_deltree documentation
Terry Wilson [Thu, 9 Jun 2011 22:29:20 +0000 (22:29 +0000)] 
Correct ast_db_deltree documentation

ast_db_deltree returns -1 on error, otherwise the number of deletions

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322865 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agodon't drop any voice frames when checking for T.38 during early media
Matthew Nicholson [Thu, 9 Jun 2011 17:37:07 +0000 (17:37 +0000)] 
don't drop any voice frames when checking for T.38 during early media

(closes issue ASTERISK-17705)
Review: https://reviewboard.asterisk.org/r/1186/
patch by oej
reported by oej

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322807 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove potential deadlock in call pickup race.
Richard Mudgett [Thu, 9 Jun 2011 16:31:53 +0000 (16:31 +0000)] 
Remove potential deadlock in call pickup race.

Deadlock is possible in ast_do_pickup() when holding the target channel
lock and trying to get the chan channel lock.  Also, holding the target
lock when calling ast_channel_masquerade() is not a good idea because that
routine does deadlock avoidance.

* Removed the need to hold the target lock after marking the target with a
datastore and getting the connected line data off of the target channel.

* Moved can_pickup() to ast_can_pickup() in features.c.  Now all the call
pickup methods use the same basic call pickup availability check.

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322749 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdds ast_escape_encoded utility to properly handle escaping of quoted field before...
Jonathan Rose [Thu, 9 Jun 2011 14:06:42 +0000 (14:06 +0000)] 
Adds ast_escape_encoded utility to properly handle escaping of quoted field before uri.

This commit backports a feature in trunk affecting initreqprep so that display name won't
be encoded improperly. Also includes unit tests for the ast_escape_quoted function.
This patch gives 1.8 a much improved outlook in countries which don't use standard
ASCII characters.

(closes issue ASTERISK-16949)
Reported by: Ã–rn Arnarson
Review: https://reviewboard.asterisk.org/r/1235/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322585 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRing all queue with more than 255 agents will cause crash.
Richard Mudgett [Wed, 8 Jun 2011 20:46:55 +0000 (20:46 +0000)] 
Ring all queue with more than 255 agents will cause crash.

1. Create a ring-all queue with 500 permanent agents.
2. Call it.
3. Asterisk will crash.

The watchers array in app_queue.c has a hard limit of 255.  Bounds
checking is not done on this array.  No sane person should put 255 people
in a ring-all queue, but we should not crash anyway.

* Added bounds checking to the watchers array.

JIRA AST-464
JIRA SWP-2903

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322484 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoSRV lookup attempted for SIP peers listed as an IP address.
Richard Mudgett [Wed, 8 Jun 2011 18:46:30 +0000 (18:46 +0000)] 
SRV lookup attempted for SIP peers listed as an IP address.

Asterisk attempts to SRV lookup a host name even if the host name is an IP
address.  Regression introduced when IPv6 support was added.

* Restored the check in ast_dnsmgr_lookup() to see if the given host name
is an IP address.  The IP address could be in either IPv4 or IPv6 formats.

(closes issue ASTERISK-17815)
Reported by: Byron Clark
Tested by: Byron Clark, Richard Mudgett
Patches:
     issue19248_v1.8.patch - uploaded by Richard Mudgett (License #5621)

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322425 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years ago Make handle_request_publish do dialog expiration and destruction.
Gregory Nietsky [Wed, 8 Jun 2011 06:18:38 +0000 (06:18 +0000)] 
  Make handle_request_publish do dialog expiration and destruction.

  This patch fixes handle_request_publish so that it does dialog expiration and destruction.

  Without this patch the incoming PUBLISH requests will get stuck in the dialog list.
  Restarting asterisk is the only way to remove them.

  Personal observation on one system the server hung up while looping through the channels
  rendering asterisk unusable and all sip phones unregisterd when they try reregister
  more requests are added.

  (closes issue #18898)
  Reported by: gareth
  Tested by: loloski, Chainsaw, wimpy, se, kuj, irroot

  Jira: https://issues.asterisk.org/jira/browse/ASTERISK-17915
  Review: https://reviewboard.asterisk.org/r/1253

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322322 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoUse correct syntax for 'sip notify snom-reboot'
Paul Belanger [Tue, 7 Jun 2011 17:59:13 +0000 (17:59 +0000)] 
Use correct syntax for 'sip notify snom-reboot'

(closes issue ASTERISK-17915)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322189 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFixes level toggling for logger set levels since it was reversed
Jonathan Rose [Mon, 6 Jun 2011 19:07:56 +0000 (19:07 +0000)] 
Fixes level toggling for logger set levels since it was reversed

(closes issue ASTERISK-17850)
Reported by: Luke H
Tested by: jrose, Luke H

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@322069 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAsterisk crash when unloading cdr_radius/cel_radius.
Richard Mudgett [Fri, 3 Jun 2011 22:09:36 +0000 (22:09 +0000)] 
Asterisk crash when unloading cdr_radius/cel_radius.

The rc_openlog() API call is passed a string that is used by openlog() to
format log messages.  The openlog() does not copy the string it just keeps
a pointer to it.  When the module is unloaded, the string is gone from
memory.  Depending upon module load order and if the other module then has
an error, a crash happens.

* Pass rc_openlog() a strdup'd string with the understanding that there
will be a small memory leak if the cdr_radius/cel_radius modules are
unloaded.

* Call rc_destroy() to free the rc handle memory when the module is
unloaded.

JIRA AST-483
JIRA SWP-3062

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321926 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoBe more explicit for CCSS generic device state event subscription.
Richard Mudgett [Fri, 3 Jun 2011 21:49:17 +0000 (21:49 +0000)] 
Be more explicit for CCSS generic device state event subscription.

Make CCSS generic device state event subscription specify the
AST_EVENT_IE_STATE ie exists to be safe.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321924 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoEvent subscription fixes.
Richard Mudgett [Fri, 3 Jun 2011 20:58:13 +0000 (20:58 +0000)] 
Event subscription fixes.

Must commit the subscription fixes together with the integration
subscription tests.  The subscription fixes cause an erroneously passing
test to fail.  The new subscription tests detect errors without the
subscription fixes.

* Added missing event_names[] table entry.

* Reworked ast_event_check_subscriber()/match_sub_ie_val_to_event() to
correctly detect if a subscriber exists for the proposed event.

* Made match_ie_val() and match_sub_ie_val_to_event() check the buffer
length for RAW payload types.

* Fixed error handling memory leak in ast_event_sub_activate(),
ast_event_unsubscribe(), and ast_event_queue().

* Made ast_event_new() and ast_event_check_subscriber() better protect
themselves from an invalid payload type.

* Added container lock protection between removing old cache events and
adding the new cached event in
ast_event_queue_and_cache()/event_update_cache().

* Added new event subscription tests.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321871 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoConstify subscription description parameter string.
Richard Mudgett [Fri, 3 Jun 2011 19:56:09 +0000 (19:56 +0000)] 
Constify subscription description parameter string.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321813 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCorrect IAX2 and SIP event subscription description string.
Richard Mudgett [Fri, 3 Jun 2011 19:55:21 +0000 (19:55 +0000)] 
Correct IAX2 and SIP event subscription description string.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321812 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoBackport an astobj2 unit test so that it runs on 1.8 as well.
Russell Bryant [Fri, 3 Jun 2011 18:32:45 +0000 (18:32 +0000)] 
Backport an astobj2 unit test so that it runs on 1.8 as well.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321753 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAlso document the 'queue-minute' option.
Leif Madsen [Fri, 3 Jun 2011 13:17:50 +0000 (13:17 +0000)] 
Also document the 'queue-minute' option.

(closes issue #19386)
Reported by: juanmol

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321685 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCDR comment tweaks.
Richard Mudgett [Wed, 1 Jun 2011 23:11:55 +0000 (23:11 +0000)] 
CDR comment tweaks.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321547 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThis patch fixes an issue with using the wrong voicemail folders with greetings.
Brett Bryant [Wed, 1 Jun 2011 20:10:02 +0000 (20:10 +0000)] 
This patch fixes an issue with using the wrong voicemail folders with greetings.

(closes issue #17871)
Reported by: edhorton
Patches:
      digium_bug_17871_2 uploaded by fhackenberger (license 592)
Tested by: edhorton, fhackenberger

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321537 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix double alerting, add forced alerting before answer
Alexandr Anikin [Wed, 1 Jun 2011 10:40:19 +0000 (10:40 +0000)] 
Fix double alerting, add forced alerting before answer

Fix double alerting (it wasn't fixed here by issue #18542)
Add forced alerting before connect (if it wasn't before)
Try to send all packets from outgoing queue rather than one only
Call goes into clearing state when disconnect command is received

(closes issue #19361)
Reported by: vmikhelson
Patches:
      issue19361-3.patch uploaded by may213 (license 454)
Tested by: vmikhelson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321528 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoUpdate some comments.
Richard Mudgett [Tue, 31 May 2011 20:54:35 +0000 (20:54 +0000)] 
Update some comments.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321517 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoChan_local locking cleanup.
David Vossel [Tue, 31 May 2011 18:52:54 +0000 (18:52 +0000)] 
Chan_local locking cleanup.

This patch removes all of the unnecessary deadlock
avoidance loops that occur in chan_local.  It also
resolves an issue with a deadlock triggered by
local channel optimizations.

(issue #18028)

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321515 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoEnhance NOTICE message to know who couldn't access the dialplan.
Leif Madsen [Tue, 31 May 2011 16:04:47 +0000 (16:04 +0000)] 
Enhance NOTICE message to know who couldn't access the dialplan.

(closes issue #19390)
Reported by: lmadsen
Patches:
      __20110531-sip-notice-tweak.txt uploaded by lmadsen (license 10)
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321511 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoSome hagi launch cleanup.
Richard Mudgett [Sat, 28 May 2011 00:27:52 +0000 (00:27 +0000)] 
Some hagi launch cleanup.

Inspired by issue 19256.  This patch would also fix the crash.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321436 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCrash when using hagi and no servers are available.
Richard Mudgett [Fri, 27 May 2011 23:45:41 +0000 (23:45 +0000)] 
Crash when using hagi and no servers are available.

When none of the servers returned by the SRV querey respond, asterisk
crashes.  The problem is that if the loop over all the SRV entries
finishes then the srv_context has already been cleaned up.

* Make ast_srv_cleanup() check to see if the context is already cleaned
up.

(closes issue #19256)
Reported by: byronclark

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321392 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThe app_privacy args have undocumented "options" position, interferes with "context...
Richard Mudgett [Fri, 27 May 2011 22:06:43 +0000 (22:06 +0000)] 
The app_privacy args have undocumented "options" position, interferes with "context" position.

* Add documention for unused "options" position to match existing code.

(closes issue #19273)
Reported by: mdavenport

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321337 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix issue with playback of H.261 video.
Leif Madsen [Fri, 27 May 2011 21:54:54 +0000 (21:54 +0000)] 
Fix issue with playback of H.261 video.

(closes issue #19379)
Reported by: neutrino88
Patches:
      videoprompt.patch uploaded by neutrino88 (license 297)
(changes by russell)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321335 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAllow parking lot hints and musicclass to be set.
Leif Madsen [Fri, 27 May 2011 21:40:23 +0000 (21:40 +0000)] 
Allow parking lot hints and musicclass to be set.

(closes issue #19378)
Reported by: sboily_proformatique
Patches:
      pf_parkinghint_music_fix uploaded by sboily proformatique (license 206)
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321333 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThe app_privacy args have undocumented "options" position, interferes with "context...
Richard Mudgett [Fri, 27 May 2011 21:31:25 +0000 (21:31 +0000)] 
The app_privacy args have undocumented "options" position, interferes with "context" position.

* Add documention for unused "options" position to match existing code.
The trunk(v1.10) version will remove the unused options position.

(closes issue #19273)
Reported by: mdavenport

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321330 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agomarkm committed a patch I was working on yesterday, this fixes it to mesh up with...
Jonathan Rose [Fri, 27 May 2011 14:59:34 +0000 (14:59 +0000)] 
markm committed a patch I was working on yesterday, this fixes it to mesh up with suggestions by mnicholson.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321273 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix *8 directed pickup locks system during pickupsound play out
Alec L Davis [Fri, 27 May 2011 08:31:15 +0000 (08:31 +0000)] 
Fix *8 directed pickup locks system during pickupsound play out

move playout from sip_pickup_thread to bridge using BRIDGE_PLAY_SOUND method,
This stop the clash of 2 threads trying to write audio to same channel.
In addition fixes choppy audio beep in issue 19177.

 (issue #18654)
 (issue #19177)
 Reported by: Docent
 Patches:
      review1232-1.88888888 alecdavis (license 585)
 Tested by: alecdavis

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321211 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFixed build problem with dev mode enabled, which was caused by commit 321100. Reform...
Mark Murawki [Thu, 26 May 2011 21:48:45 +0000 (21:48 +0000)] 
Fixed build problem with dev mode enabled, which was caused by commit 321100.  Reformulated patch to be more generic.

Moved the sip uri parse variable initalization to parse_uri_full in reqresp_parser.c.  This will ensure that any use of parse uri will have null output variables if the parse fails.

(closes issue #19346)
Reported by: kobaz
Tested by: kobaz,JonathanRose

Review: [full review board URL with trailing slash]

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321155 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoast_sockaddr_resolve() in netsock2.c may deref a null pointer
Mark Murawki [Thu, 26 May 2011 20:09:35 +0000 (20:09 +0000)] 
ast_sockaddr_resolve() in netsock2.c may deref a null pointer

Added a null check in netsock2 ast_sockaddr_resolve() as well as added default initalizers in chan_sip parse_uri_legacy_check() to make sure that invalid uris will make null (and not undefined) user,pass,domain,transport variables

(closes issue #19346)
Reported by: kobaz
Patches:
      netsock2.patch uploaded by kobaz (license 834)
Tested by: kobaz, Marquis

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321100 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoUpdate ast_sockaddr comment with an important note.
Richard Mudgett [Thu, 26 May 2011 18:10:17 +0000 (18:10 +0000)] 
Update ast_sockaddr comment with an important note.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321044 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoInitialize stack-allocated ast_sockaddrs before use
Terry Wilson [Thu, 26 May 2011 17:29:54 +0000 (17:29 +0000)] 
Initialize stack-allocated ast_sockaddrs before use

It is important to always initialize ast_sockaddrs before use--even if they
are passed to ast_sockaddr_copy as the underlying storage could be bigger
than what ends up being copied--leaving part of the data unitialized.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@321042 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRemove some variables that were set but unused.
Russell Bryant [Thu, 26 May 2011 15:57:13 +0000 (15:57 +0000)] 
Remove some variables that were set but unused.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320947 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoNative SIP CCSS sends bad CC cancel SUBSCRIBE message.
Richard Mudgett [Wed, 25 May 2011 22:25:18 +0000 (22:25 +0000)] 
Native SIP CCSS sends bad CC cancel SUBSCRIBE message.

The SUBSCRIBE message used to cancel a CC request has incorrect To/From
SIP headers.  They are reversed and the dialog tags are the same when they
should not be.  If pedantic mode was disabled, then the cancel would have
succeeded despite the incorrect message.

* The SIP_OUTGOING flag was not set correctly for the dialog and I had to
move some CC subscribe handling code as a result.

* Initialized the dialog subscribed type to CALL_COMPLETION earlier.  If a
CC request SUBSCRIBE message comes in and the CC instance is not found,
the 404 response was duplicated.

JIRA AST-568
JIRA SWP-3493

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320883 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThe AMI Newstate event contains different information between v1.4 and v1.8.
Richard Mudgett [Wed, 25 May 2011 17:06:38 +0000 (17:06 +0000)] 
The AMI Newstate event contains different information between v1.4 and v1.8.

The addition of connected line support in v1.8 changes the behavior of the
channel caller ID somewhat.  The channel caller ID value no longer time
shares with the connected line ID on outgoing call legs.  The timing of
some AMI events/responses output the connected line ID as caller ID.
These party ID's are now separate.

* The ConnectedLineNum and ConnectedLineName headers were added to many
AMI events/responses if the CallerIDNum/CallerIDName headers were also
present.

(closes issue #18252)
Reported by: gje
Tested by: rmudgett

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320823 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoGive zombies a safe channel driver to use.
Richard Mudgett [Wed, 25 May 2011 16:23:11 +0000 (16:23 +0000)] 
Give zombies a safe channel driver to use.

Recent crashes from zombie channels suggests that they need a safe home to
goto.  When a masquerade happens, the physical part of the zombie channel
is hungup.  The hangup normally sets the channel private pointer to NULL.
If someone then blindly does a callback to the channel driver, a crash is
likely because the private pointer is NULL.

The masquerade now sets the channel technology of zombie channels to the
kill channel driver.

Related to the following issues:
(issue #19116)
(issue #19310)

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320796 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCast data as char * before using S_OR
Terry Wilson [Wed, 25 May 2011 00:49:10 +0000 (00:49 +0000)] 
Cast data as char * before using S_OR

This is required for compiling successfully under dev mode

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320716 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdd ConnectedLineNum/Name headers to output of AMI action Status.
Richard Mudgett [Mon, 23 May 2011 17:53:44 +0000 (17:53 +0000)] 
Add ConnectedLineNum/Name headers to output of AMI action Status.

* Add ConnectedLineNum and ConnectedLineName headers to the output of the
AMI action Status.  This makes it easier to find out who the channel is
connected to without having to lookup BridgedChannel or when they are
connected to an application (e.g.: VoiceMail) which has no bridged
channel.

* Bridged channels with no CallerID had "" instead of "<unknown>" output,
that might be a bug as "<unknown>" was what older versions used.

(closes issue #18158)
Reported by: gareth
Patches:
      svn-292308.diff uploaded by gareth (license 208)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320650 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoGNU libiconv uses symbol "libiconv_open" instead of "iconv_open".
Tilghman Lesher [Mon, 23 May 2011 16:19:32 +0000 (16:19 +0000)] 
GNU libiconv uses symbol "libiconv_open" instead of "iconv_open".

(closes issue #19344)
 Reported by: rohanl
 Patches:
       iconv-check.patch uploaded by rohanl (license 1284)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320573 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 320562 via svnmerge from
David Vossel [Mon, 23 May 2011 16:18:33 +0000 (16:18 +0000)] 
Merged revisions 320562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r320562 | dvossel | 2011-05-23 11:15:18 -0500 (Mon, 23 May 2011) | 9 lines

  Adds missing part to the ast_tcptls_server_start fails second attempt to bind patch.

  (closes issue #19289)
  Reported by: wdoekes
  Patches:
        issue19289_delay_old_address_setting_tcptls_2.patch uploaded by wdoekes (license 717)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320568 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoDon't generate spurious "No: command not found" messages when running the
Kevin P. Fleming [Mon, 23 May 2011 15:47:14 +0000 (15:47 +0000)] 
Don't generate spurious "No: command not found" messages when running the
configure script on a system that has neither gmime-config nor pkg-config.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320560 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoBlocked revisions 320506 via svnmerge
David Vossel [Mon, 23 May 2011 14:48:53 +0000 (14:48 +0000)] 
Blocked revisions 320506 via svnmerge

........
  r320506 | dvossel | 2011-05-23 09:46:17 -0500 (Mon, 23 May 2011) | 8 lines

  Fixes chanspy enforced mode lacking a channel_unlock.

  (closes issue #19348)
  Reported by: wdoekes
  Patches:
        issue19348_chanspy_missing_channel_unlock.patch uploaded by wdoekes (license 717)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320507 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFixes segfault occuring in chan_sip.c at __set_address_from_contact
Jonathan Rose [Mon, 23 May 2011 14:33:20 +0000 (14:33 +0000)] 
Fixes segfault occuring in chan_sip.c at __set_address_from_contact

Checks to see if domain contains anything before sending it off to ast_sockaddr_resolve
which is where the segfault was occuring due to null str.

(closes issue #18857)
Reported by: sybasesql

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320504 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 320444 via svnmerge from
Tilghman Lesher [Sun, 22 May 2011 23:34:57 +0000 (23:34 +0000)] 
Merged revisions 320444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r320444 | tilghman | 2011-05-22 18:25:51 -0500 (Sun, 22 May 2011) | 8 lines

  Don't crash when the connection fails.

  (closes issue #19250)
   Reported by: seadweller
   Patches:
         20110514__issue19250.diff.txt uploaded by tilghman (license 14)
   Tested by: seadweller, sum
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320445 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 320271 via svnmerge from
David Vossel [Fri, 20 May 2011 21:39:36 +0000 (21:39 +0000)] 
Merged revisions 320271 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r320271 | dvossel | 2011-05-20 16:24:48 -0500 (Fri, 20 May 2011) | 8 lines

  Fixes issue with ast_tcptls_server_start failing on second attempt to bind.

  (closes issue #19289)
  Reported by: wdoekes
  Patches:
        issue19289_delay_old_address_setting_tcptls.patch uploaded by wdoekes (license 717)
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320338 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 320236 via svnmerge from
Richard Mudgett [Fri, 20 May 2011 20:49:03 +0000 (20:49 +0000)] 
Merged revisions 320236 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r320236 | rmudgett | 2011-05-20 15:44:54 -0500 (Fri, 20 May 2011) | 20 lines

  Merged revisions 320235 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r320235 | rmudgett | 2011-05-20 15:38:22 -0500 (Fri, 20 May 2011) | 13 lines

    The meetme CLI command completion leaves conferences mutex locked.

    When issuing a meetme kick CLI command and an invalid (non-existent)
    conference number is specified, pressing Tab leaves the conferences mutex
    locked and, therefore, all conferences deadlock.

    Add missing unlock.

    (closes issue #19336)
    Reported by: zvision
    Patches:
          app_meetme.diff uploaded by zvision (license 798)
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320237 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoThis commit modifies the way polling is done on TLS sockets.
Matthew Nicholson [Fri, 20 May 2011 18:48:46 +0000 (18:48 +0000)] 
This commit modifies the way polling is done on TLS sockets.

Because of the buffering the TLS layer does, polling is unreliable. If poll is
called while there is data waiting to be read in the TLS layer but not at the
network layer, the messaging processing engine will not proceed until something
else writes data to the socket, which may not occur. This change modifies the
logic around TLS sockets to only poll after a failed read on a non-blocking
socket. This way we know that there is no data waiting to be read from the
buffering layer.

(closes issue #19182)
Reported by: st
Patches:
      ssl-poll-fix3.diff uploaded by mnicholson (license 96)
Tested by: mnicholson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320180 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFixes an imapfolder related crash
Jonathan Rose [Fri, 20 May 2011 18:12:21 +0000 (18:12 +0000)] 
Fixes an imapfolder related crash

imapfolders being set in the general section of voicemail would cause the inbox folder name to
change.  Since sound file names are made based on the names of the folders, this would cause
the audio related to that folder name to change and if Asterisk attempted to play it, the
channel would instantly hang up when the audio file couldn't be found.  This patch searches for
the name of the folder first to leave existing behavior in tact and if that fails, it uses
the normal inbox name to get the sound file instead.

(closes issue #16104)
Reported by: blkline

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320162 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMisc comment cleanup in features.c.
Richard Mudgett [Fri, 20 May 2011 17:03:49 +0000 (17:03 +0000)] 
Misc comment cleanup in features.c.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320059 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCrash while transferring a call during DTMF feature timeout.
Richard Mudgett [Fri, 20 May 2011 16:43:02 +0000 (16:43 +0000)] 
Crash while transferring a call during DTMF feature timeout.

When a call is being attended transferred during the time between
AST_FRAME_DTMF_BEGIN and AST_FRAME_DTMF_END, the transferred channel
becomes a zombie (so tech data is not available), making ast_dtmf_stream()
segfault when it tries to send the DTMF digit (at least with SIP
channels).

Patch based on feature-end-zombie.patch uploaded by Irontec (license 1256)

* Check for zombies when ast_channel_bridge() returns.

* Guarantee that the fo parameter value is initialized in
ast_channel_bridge() before any returns.

(closes issue #19116)
Reported by: Irontec
Tested by: rmudgett

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320057 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoChange some variable names to make pickup code easier to understand.
Richard Mudgett [Fri, 20 May 2011 16:19:01 +0000 (16:19 +0000)] 
Change some variable names to make pickup code easier to understand.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@320007 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCrash when using directed pickup applications.
Richard Mudgett [Fri, 20 May 2011 15:48:25 +0000 (15:48 +0000)] 
Crash when using directed pickup applications.

The directed pickup applications can cause a crash if the pickup was
successful because the dialplan keeps executing.

This patch does the following:

* Completes the channel masquerade on a successful pickup before the
application returns.  The channel is now guaranteed a zombie and must not
continue executing the dialplan.

* Changes the return value of the directed pickup applications to return
zero if the pickup failed and nonzero(-1) if the pickup succeeded.

* Made some code optimizations that no longer require re-checking the
pickup channel to see if it is still available to pickup.

(closes issue #19310)
Reported by: remiq
Patches:
      issue19310_v1.8_v2.patch uploaded by rmudgett (license 664)
Tested by: alecdavis, remiq, rmudgett

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319997 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoAdds legacy_useroption_parsing to address interoperability concerns.
Jonathan Rose [Fri, 20 May 2011 13:28:24 +0000 (13:28 +0000)] 
Adds legacy_useroption_parsing to address interoperability concerns.

With the new option engaged, Asterisk should interpret user fields with useroptions
contained within the userfield of the uri by stripping them out of the original message
whenever a semicolon is encountered in the userfield string.

(closes issue #18344)
Reported by: danimal
Tested by: jrose

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319938 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoRevert part of a change to the bridging API code
Terry Wilson [Thu, 19 May 2011 23:28:13 +0000 (23:28 +0000)] 
Revert part of a change to the bridging API code

The capabilities used in the bridging API are very different than the
ones used for formats. When the conversion was made expanding the bit
width of codecs, the bridging code was accidentally accosted in ways
that it didn't deserve.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319920 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoFix Randomize option on Park()
Jonathan Rose [Thu, 19 May 2011 18:32:38 +0000 (18:32 +0000)] 
Fix Randomize option on Park()

The randomize option was generally not working like it should have at all on Park().
This patch restores intended functionality.

(closes issue #18862)
Reported by: davidw
Tested by: jrose

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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319866 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoIn cel_odbc, an uninitialized RWLIST is attempted to be locked.
Mark Murawki [Thu, 19 May 2011 17:59:01 +0000 (17:59 +0000)] 
In cel_odbc, an uninitialized RWLIST is attempted to be locked.

Added INIT and DESTROY for the RWLIST odbc_tables

(closes issue #19331)
Reported by: kobaz
Patches:
      odbc_cel.patch uploaded by kobaz (license 834)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319812 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoCCSS generic agent with POTS and ISDN phones fail caller busy call-back test.
Richard Mudgett [Thu, 19 May 2011 16:50:48 +0000 (16:50 +0000)] 
CCSS generic agent with POTS and ISDN phones fail caller busy call-back test.

If the following is true after a CCSS activation:
* The generic agent is for an analog phone or ISDN phone.  (Caller party)
* The called party becomes available.
* The caller party is not available.

When the caller party becomes available, the caller is not alerted to the
called party being available.  The generic agent still thinks the caller
is busy.

* Fixed the generic agent device state event subscription to look for all
device states that are considered available.

* Encapsulated the device state test for CCSS generic device available in
cc_generic_is_device_available().  Made the generic agent and monitor use
the new function instead of the manually coded inline equivalent.

JIRA AST-559
JIRA SWP-3462

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319758 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 319653 via svnmerge from
Terry Wilson [Wed, 18 May 2011 23:15:58 +0000 (23:15 +0000)] 
Merged revisions 319653 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r319653 | twilson | 2011-05-18 16:11:57 -0700 (Wed, 18 May 2011) | 15 lines

  Merged revisions 319652 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r319652 | twilson | 2011-05-18 16:04:35 -0700 (Wed, 18 May 2011) | 8 lines

    Make sure everyone gets an unhold when a transfer succeeds

    Some phones, like the Snom phones, send a hold to the transfer target after
    before sending the REFER. We need to make sure that we unhold the parties
    that are being connected after the masquerade. If Local channels with the /nm
    option are used when dialing the parties, hold music would still be playing on
    the transfer target, even after being connected with the transferee.
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319654 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoUnbreak the storing of registrations for restart
Terry Wilson [Wed, 18 May 2011 20:22:36 +0000 (20:22 +0000)] 
Unbreak the storing of registrations for restart

The fix for issue 18882 broke retrieving non-realtime peers from the ast_db
on restart/reload. This patch tries to unbreak things while leaving the intent
of the original fix intact.
(closes issue #19318)
Reported by: remiq
Patches:
      diff.txt uploaded by twilson (license 396)
Tested by: lmadsen, remiq

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319552 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revisions 319528 via svnmerge from
Terry Wilson [Wed, 18 May 2011 20:05:34 +0000 (20:05 +0000)] 
Merged revisions 319528 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

................
  r319528 | twilson | 2011-05-18 13:02:06 -0700 (Wed, 18 May 2011) | 17 lines

  Merged revisions 319527 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r319527 | twilson | 2011-05-18 12:56:08 -0700 (Wed, 18 May 2011) | 10 lines

    Fix app_dial ring groups

    Revert part of r315643. We need to remove the datastore here as well.
    The code in bridging code will catch anything that app_dial might miss.

    (closes issue #19311)
    Reported by: mspuhler
    Patches:
          issue_19311_no_answer.diff uploaded by elguero (license 37)
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319529 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMerged revision 319468 from
Richard Mudgett [Tue, 17 May 2011 21:57:56 +0000 (21:57 +0000)] 
Merged revision 319468 from
https://origsvn.digium.com/svn/asterisk/be/branches/C.3-bier

..........
  r319468 | rmudgett | 2011-05-17 16:49:31 -0500 (Tue, 17 May 2011) | 15 lines

  The mISDN HDLC mode is prevented on dialed channels.

  The use of mISDN HDLC mode is prevented if the mISDN dial technology
  option 'h1' is used when config option astdtmf=yes.

  There is a bug in channels/misdn/isdn_lib.c which prevents the use of HDLC
  mode.  Instead of setting the channel to HDLC mode it is set to
  transparent(no dsp, no hdlc), although hdlc is not "no hdlc".  I.e the
  logging message is correct, but the if condition is not.

  Make check the nodsp and hdlc flags.

  JIRA ABE-2787
  JIRA SWP-3437
..........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319469 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoDon't create [general] voicemail context when using users.conf
Leif Madsen [Tue, 17 May 2011 12:53:50 +0000 (12:53 +0000)] 
Don't create [general] voicemail context when using users.conf

Prior to this patch, app_voicemail would create a [general] context when parsing users.conf.

(closes issue #18891)
Reported by: pdugas
Patches:
      app_voicemail-ignore-general.patch uploaded by pdugas (license 1222)
      app_voicemail-ignore-general-style-guidelines.patch uploaded by seanbright (license 71)
Tested by: pdugas

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319367 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMake Debian init script lsb compliant
Leif Madsen [Tue, 17 May 2011 12:39:37 +0000 (12:39 +0000)] 
Make Debian init script lsb compliant

(closes issue #18896)
Reported by: manwe
Patches:
      debian_init_lsb.patch uploaded by manwe (license 1223)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319365 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 years agoMakes busy detection in dsp.c always allow for at least one frame (20ms) of error...
Jonathan Rose [Mon, 16 May 2011 21:00:55 +0000 (21:00 +0000)] 
Makes busy detection in dsp.c always allow for at least one frame (20ms) of error so that 200ms tone lengths don't get ignored by single frame error lengths.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@319261 65c4cc65-6c06-0410-ace0-fbb531ad65f3