asterisk/asterisk.git
9 years agoKill some startup warnings and errors and make some messages more helpful in tracking...
Tilghman Lesher [Fri, 9 Jul 2010 17:00:22 +0000 (17:00 +0000)]
Kill some startup warnings and errors and make some messages more helpful in tracking down the source.

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

9 years agoReturn logic of sip_debug_test_addr() to its original functionality.
Mark Michelson [Fri, 9 Jul 2010 16:39:16 +0000 (16:39 +0000)]
Return logic of sip_debug_test_addr() to its original functionality.

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

9 years agoMerged revisions 275027 via svnmerge from
Matthew Nicholson [Fri, 9 Jul 2010 16:05:58 +0000 (16:05 +0000)]
Merged revisions 275027 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275027 | mnicholson | 2010-07-09 11:04:21 -0500 (Fri, 09 Jul 2010) | 8 lines

  Clear the AST_CDR_FLAG_DIALED flag for channels going into the pbx via the G option in app_dial

  (closes issue #17592)
  Reported by: jamicque
  Patches:
        G-flag-cdr-fix1.diff uploaded by mnicholson (license 96)
  Tested by: jamicque, mnicholson
........

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

9 years agoMerged revisions 275021 via svnmerge from
Russell Bryant [Fri, 9 Jul 2010 15:35:53 +0000 (15:35 +0000)]
Merged revisions 275021 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r275021 | russell | 2010-07-09 10:33:08 -0500 (Fri, 09 Jul 2010) | 4 lines

  Document that a leading and trailing slash is expected for test categories.

  Also, emit a warning if a test is registered without one of these.
........

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

9 years agoFix sip_uri_parse test comparison.
Mark Michelson [Fri, 9 Jul 2010 14:27:07 +0000 (14:27 +0000)]
Fix sip_uri_parse test comparison.

Part of the change with the IPv6 changes is to treat a host:port as
a single 'domain' entity. This test was not updated to have the correct
expectation after calling parse_uri().

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

9 years agoCopy the address into the peer structure after we set the default port
<simon.perreault@viagenie.ca> [Fri, 9 Jul 2010 13:30:37 +0000 (13:30 +0000)]
Copy the address into the peer structure after we set the default port

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

9 years agoSadly we can't dereference a pointer cast and use it as an lvalue without getting...
<simon.perreault@viagenie.ca> [Fri, 9 Jul 2010 12:56:18 +0000 (12:56 +0000)]
Sadly we can't dereference a pointer cast and use it as an lvalue without getting this
warning (at least with gcc 4.4.4):

netsock2.c:492: warning: dereferencing pointer ‘({anonymous})’ does break strict-aliasing rules

So we're back to using memcpy()...

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

9 years agoExtend length limit on country name in indications.conf.
Russell Bryant [Fri, 9 Jul 2010 12:48:25 +0000 (12:48 +0000)]
Extend length limit on country name in indications.conf.

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

9 years agoMake it possible to disable individual cdr files per accountcode in cdr_csv
Olle Johansson [Fri, 9 Jul 2010 11:06:19 +0000 (11:06 +0000)]
Make it possible to disable individual cdr files per accountcode in cdr_csv

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

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

9 years agoFix calls of ast_sockaddr_from_sin() from IPv6 integration.
Richard Mudgett [Thu, 8 Jul 2010 23:46:20 +0000 (23:46 +0000)]
Fix calls of ast_sockaddr_from_sin() from IPv6 integration.

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

9 years agoFix compile of chan_ooh323.c from IPv6 integration.
Richard Mudgett [Thu, 8 Jul 2010 23:23:17 +0000 (23:23 +0000)]
Fix compile of chan_ooh323.c from IPv6 integration.

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

9 years agoAnd the automerge property.
Mark Michelson [Thu, 8 Jul 2010 22:16:16 +0000 (22:16 +0000)]
And the automerge property.

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

9 years agoDelete properties I merged during v6-new merge.
Mark Michelson [Thu, 8 Jul 2010 22:15:25 +0000 (22:15 +0000)]
Delete properties I merged during v6-new merge.

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

9 years agoAdd IPv6 to Asterisk.
Mark Michelson [Thu, 8 Jul 2010 22:08:07 +0000 (22:08 +0000)]
Add IPv6 to Asterisk.

This adds a generic API for accommodating IPv6 and IPv4 addresses
within Asterisk. While many files have been updated to make use of the
API, chan_sip and the RTP code are the files which actually support
IPv6 addresses at the time of this commit. The way has been paved for
easier upgrading for other files in the near future, though.

Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne
for their hard work on this.

(closes issue #17565)
Reported by: russell
Patches:
      asteriskv6-test-report.pdf uploaded by russell (license 2)

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

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

9 years agoGenerate a correct AstData string for ast_callerid.cid_ton
Richard Mudgett [Thu, 8 Jul 2010 22:05:40 +0000 (22:05 +0000)]
Generate a correct AstData string for ast_callerid.cid_ton

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

9 years agoFix trunk compile.
Richard Mudgett [Thu, 8 Jul 2010 19:12:55 +0000 (19:12 +0000)]
Fix trunk compile.

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

9 years agoImplement AstData API data providers as part of the GSOC 2010 project,
Eliel C. Sardanons [Thu, 8 Jul 2010 14:48:42 +0000 (14:48 +0000)]
Implement AstData API data providers as part of the GSOC 2010 project,
midterm evaluation.

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

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

9 years agoFixes some ref count issues introduced by r274539
David Vossel [Wed, 7 Jul 2010 20:09:00 +0000 (20:09 +0000)]
Fixes some ref count issues introduced by r274539

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

9 years agoAdd missing conditional around chan_dahdi mfcr2_skip_category config parameter.
Richard Mudgett [Wed, 7 Jul 2010 18:32:35 +0000 (18:32 +0000)]
Add missing conditional around chan_dahdi mfcr2_skip_category config parameter.

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

9 years agoMerged revisions 274579 via svnmerge from
Richard Mudgett [Wed, 7 Jul 2010 18:20:00 +0000 (18:20 +0000)]
Merged revisions 274579 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r274579 | rmudgett | 2010-07-07 13:12:41 -0500 (Wed, 07 Jul 2010) | 1 line

  Close the DAHDI FD on error when processing chan_dahdi toneduration config parameter.
........

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

9 years agoSet proper FAXOPT(status), FAXOPT(statusstr), and FAXOPT(error) values where possible...
Matthew Nicholson [Wed, 7 Jul 2010 16:40:19 +0000 (16:40 +0000)]
Set proper FAXOPT(status), FAXOPT(statusstr), and FAXOPT(error) values where possible.  Previously some failure cases did not result in proper FAXOPT values.

FAX-203

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

9 years agoUse the relatedpeer field of a sip_pvt during INVITE processing.
Mark Michelson [Wed, 7 Jul 2010 16:21:53 +0000 (16:21 +0000)]
Use the relatedpeer field of a sip_pvt during INVITE processing.

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

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

9 years agoChanged OSP TCP port from 1080 to 5045.
TransNexus OSP Development [Wed, 7 Jul 2010 07:07:08 +0000 (07:07 +0000)]
Changed OSP TCP port from 1080 to 5045.

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

9 years agoAlso run the externnotify script when the pollmailboxes thread notices a change.
Tilghman Lesher [Wed, 7 Jul 2010 06:32:39 +0000 (06:32 +0000)]
Also run the externnotify script when the pollmailboxes thread notices a change.

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

9 years agoMerged revisions 274417 via svnmerge from
Tilghman Lesher [Wed, 7 Jul 2010 06:15:43 +0000 (06:15 +0000)]
Merged revisions 274417 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r274417 | tilghman | 2010-07-07 01:13:54 -0500 (Wed, 07 Jul 2010) | 8 lines

  Correct how 100, 200, 300, etc. is said.  Also add the crazy British numbers.

  (closes issue #16102)
   Reported by: Delvar
   Patches:
         say.conf.fix.patch uploaded by Delvar (license 908)
         (plus a few additional fixes and simplifications by me)
........

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

9 years agoMerged revisions 274283 via svnmerge from
Jeff Peeler [Tue, 6 Jul 2010 22:23:35 +0000 (22:23 +0000)]
Merged revisions 274283 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r274283 | jpeeler | 2010-07-06 17:15:21 -0500 (Tue, 06 Jul 2010) | 7 lines

  Correct sip.conf.sample comments for prematuremedia option.

  (closes issue #17513)
  Reported by: festr
  Patches:
        patch uploaded by festr (license 443)
........

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

9 years agoMerged revisions 274280 via svnmerge from
Terry Wilson [Tue, 6 Jul 2010 22:15:27 +0000 (22:15 +0000)]
Merged revisions 274280 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r274280 | twilson | 2010-07-06 17:08:20 -0500 (Tue, 06 Jul 2010) | 9 lines

  Add option to not do a call forward on 482 Loop Detected

  Asterisk has always set up a forwarded call when receiving a 482 Loop Detected.
  This prevents handling the call failure by just continuing on in the dialplan.
  Since this would be a change in behavior, the new option to disable this
  behavior is forwardloopdetected which defaults to 'yes'.

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

(no option for trunk, just changing the behavior)

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

9 years agoStatus shows all non-CRC4 lines as "yellow", even if "yellow" was not in the bitfield.
Tilghman Lesher [Tue, 6 Jul 2010 22:09:23 +0000 (22:09 +0000)]
Status shows all non-CRC4 lines as "yellow", even if "yellow" was not in the bitfield.

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

9 years agoProperly detect and report invalid maxrate and maxrate values in the FAXOPT dialplan...
Matthew Nicholson [Tue, 6 Jul 2010 19:53:04 +0000 (19:53 +0000)]
Properly detect and report invalid maxrate and maxrate values in the FAXOPT dialplan function.  Also make fax_rate_str_to_int() return an unsigned int and return 0 instead of -1 in the event of an error.

FAX-202

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

9 years agoMerged revisions 274157 via svnmerge from
Mark Michelson [Tue, 6 Jul 2010 14:31:13 +0000 (14:31 +0000)]
Merged revisions 274157 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r274157 | mmichelson | 2010-07-06 09:29:23 -0500 (Tue, 06 Jul 2010) | 16 lines

  Fix problem with RFC 2833 DTMF not being accepted.

  A recent check was added to ensure that we did not erroneously
  detect duplicate DTMF when we received packets out of order.
  The problem was that the check did not account for the fact that
  the seqno of an RTP stream will roll over back to 0 after hitting
  65535. Now, we have a secondary check that will ensure that the
  seqno rolling over will not cause us to stop accepting DTMF.

  (closes issue #17571)
  Reported by: mdeneen
  Patches:
        rtp_seqno_rollover.patch uploaded by mmichelson (license 60)
  Tested by: richardf, maxochoa, JJCinAZ
........

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

9 years agoBlocked revisions 274093 via svnmerge
Matthew Nicholson [Tue, 6 Jul 2010 13:52:56 +0000 (13:52 +0000)]
Blocked revisions 274093 via svnmerge

........
  r274093 | mnicholson | 2010-07-06 08:52:28 -0500 (Tue, 06 Jul 2010) | 2 lines

  Make get_member_status return QUEUE_NO_MEMBERS instead of QUEUE_NO_REACHABLE_MEMBERS to make joinempty=no work again.  This regression was introduced in 273639.  Also fixed whitespace.
........

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

9 years agoUh, yeah.
Tilghman Lesher [Tue, 6 Jul 2010 06:01:37 +0000 (06:01 +0000)]
Uh, yeah.

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

9 years agoBlocked revisions 273981 via svnmerge
Tilghman Lesher [Mon, 5 Jul 2010 20:00:48 +0000 (20:00 +0000)]
Blocked revisions 273981 via svnmerge

........
  r273981 | tilghman | 2010-07-05 14:48:42 -0500 (Mon, 05 Jul 2010) | 2 lines

  Command 'stop gracefully' doesn't.
........

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

9 years agoMerged revisions 273884 via svnmerge from
Paul Belanger [Mon, 5 Jul 2010 13:53:44 +0000 (13:53 +0000)]
Merged revisions 273884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273884 | pabelanger | 2010-07-05 09:51:29 -0400 (Mon, 05 Jul 2010) | 8 lines

  Remove extra line breaks from 'core show config mappings'

  (closes issue #17583)
  Reported by: pabelanger
  Patches:
        issue17583.patch uploaded by pabelanger (license 224)
  Tested by: lmadsen
........

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

9 years agoMerged revisions 273793 via svnmerge from
Tilghman Lesher [Sat, 3 Jul 2010 02:36:31 +0000 (02:36 +0000)]
Merged revisions 273793 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273793 | tilghman | 2010-07-02 16:36:39 -0500 (Fri, 02 Jul 2010) | 9 lines

  Have the DEADLOCK_AVOIDANCE macro warn when an unlock fails, to help catch potentially large software bugs.

  (closes issue #17407)
   Reported by: pdf
   Patches:
         20100527__issue17407.diff.txt uploaded by tilghman (license 14)

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

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

9 years agoMerged revisions 273717 via svnmerge from
Tilghman Lesher [Fri, 2 Jul 2010 17:10:59 +0000 (17:10 +0000)]
Merged revisions 273717 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273717 | tilghman | 2010-07-02 12:09:47 -0500 (Fri, 02 Jul 2010) | 8 lines

  Autoservice loop optimization causes a busy loop, when channels are serviced while in hangup.

  (closes issue #17564)
   Reported by: ramonpeek
   Patches:
         20100630__issue17564.diff.txt uploaded by tilghman (license 14)
   Tested by: ramonpeek
........

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

9 years agoBlocked revisions 273639 via svnmerge
Tilghman Lesher [Fri, 2 Jul 2010 16:57:50 +0000 (16:57 +0000)]
Blocked revisions 273639 via svnmerge

........
  r273639 | tilghman | 2010-07-02 10:46:27 -0500 (Fri, 02 Jul 2010) | 8 lines

  If all members are paused, the wrong status is indicated.

  (closes issue #17576)
   Reported by: ramonpeek
   Patches:
         diff.txt uploaded by ramonpeek (license 266)
   Tested by: ramonpeek
........

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

9 years agoThe switch fallthrough could create some errorneous situations, so best to force...
Tilghman Lesher [Fri, 2 Jul 2010 16:57:28 +0000 (16:57 +0000)]
The switch fallthrough could create some errorneous situations, so best to force directly to the default case.

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

9 years agoFix various typos reported by Lintian
Tzafrir Cohen [Fri, 2 Jul 2010 15:57:02 +0000 (15:57 +0000)]
Fix various typos reported by Lintian

(Also fix the typos in the comments)

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

9 years agoMerged revisions 273565 via svnmerge from
Russell Bryant [Thu, 1 Jul 2010 22:16:23 +0000 (22:16 +0000)]
Merged revisions 273565 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273565 | russell | 2010-07-01 17:09:19 -0500 (Thu, 01 Jul 2010) | 7 lines

  Don't return a partially initialized datastore.

  If memory allocation fails in ast_strdup(), don't return a partially
  initialized datastore.  Bad things may happen.

  (related to ABE-2415)
........

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

9 years agoMerged revisions 273474 via svnmerge from
Jeff Peeler [Thu, 1 Jul 2010 20:28:15 +0000 (20:28 +0000)]
Merged revisions 273474 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273474 | jpeeler | 2010-07-01 15:19:16 -0500 (Thu, 01 Jul 2010) | 14 lines

  Allow admin user to join conference without using admin mode and no user pin.

  Configuring the conference in meetme.conf like the following:
  conf => 2345,,6666
  did not prompt for pin when used without admin mode. This meant that the
  conference could not be joined as an admin even if the user knew the correct
  pin. The original bug report was submitted claiming that the blank user pin
  should deny entry into the conference. I think a better way to handle this
  would be with a feature enhancement that used the following syntax:
  conf => 2345,X,6666 - where X denotes no acceptable pin allowed

  (closes issue #15704)
  Reported by: modelnine
........

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

9 years agoProperly handle failures of fax->start_session()
Matthew Nicholson [Thu, 1 Jul 2010 19:34:47 +0000 (19:34 +0000)]
Properly handle failures of fax->start_session()

FAX-177

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

9 years agocorrect handling of get_destination return values
David Vossel [Thu, 1 Jul 2010 16:40:17 +0000 (16:40 +0000)]
correct handling of get_destination return values

A failure when calling the get_destination can mean multiple things.  If
the extension is not found, a 404 error is appropriate, but if the URI
scheme is incorrect, a 404 is not approperiate.  This patch adds the
get_destination_result enum to differentiate between these and other failure
types.  The only logical difference in this patch is that we now send a "416
Unsupported URI scheme" response instead of a "404" when the scheme is not
recognized.  This indicates to the initiator of the INVITE to retry the request
with a correct URI.

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

9 years agoMerged revisions 273354 via svnmerge from
Jeff Peeler [Thu, 1 Jul 2010 15:12:31 +0000 (15:12 +0000)]
Merged revisions 273354 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273354 | jpeeler | 2010-07-01 10:05:43 -0500 (Thu, 01 Jul 2010) | 12 lines

  Ensure channel placed in meetme in ringing state is properly hung up.

  An outgoing channel placed in meetme while still ringing which was then hung up
  would not exit meetme and the channel was not properly destroyed. Specifically
  checking for this scenario by looking at the appropriate control frames resolves
  the issue.

  (closes issue #15871)
  Reported by: Ivan
  Patches:
        meetme_congestion_trunk_v2.patch uploaded by Ivan (license 229)
........

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

9 years agoFixed whitespace problems
Matthew Nicholson [Thu, 1 Jul 2010 14:37:37 +0000 (14:37 +0000)]
Fixed whitespace problems

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

9 years agoAltered my comment about TCP_NODELAY
Matthew Nicholson [Thu, 1 Jul 2010 14:34:31 +0000 (14:34 +0000)]
Altered my comment about TCP_NODELAY

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

9 years agoDon't free written frames in chan_mobile's mbl_write() function.
Matthew Nicholson [Thu, 1 Jul 2010 12:57:18 +0000 (12:57 +0000)]
Don't free written frames in chan_mobile's mbl_write() function.

(closes issue #16430)
Reported by: azbest
Tested by: azbest

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

9 years agoSet TCP_NODELAY on manager TCP sockets to prevent delays on outgoing packets. This...
Matthew Nicholson [Wed, 30 Jun 2010 18:48:21 +0000 (18:48 +0000)]
Set TCP_NODELAY on manager TCP sockets to prevent delays on outgoing packets.  This regression was introduced in r48338.

AST-359

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

9 years agoFix rt(c)p set debug ip taking wrong argument
Paul Belanger [Wed, 30 Jun 2010 17:28:04 +0000 (17:28 +0000)]
Fix rt(c)p set debug ip taking wrong argument

Also clean up some coding errors.

(closes issue #17469)
Reported by: wdoekes
Patches:
      astsvn-rtp-set-debug-ip.patch uploaded by wdoekes (license 717)
Tested by: wdoekes, pabelanger

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

9 years agoRemove unnecessary if test in CV_DSTR()
Richard Mudgett [Wed, 30 Jun 2010 17:17:05 +0000 (17:17 +0000)]
Remove unnecessary if test in CV_DSTR()

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

9 years agoMisc doxygen cleanup in config.h
Richard Mudgett [Wed, 30 Jun 2010 17:15:46 +0000 (17:15 +0000)]
Misc doxygen cleanup in config.h

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

9 years agoPermission checking for the system application is backwards.
Tilghman Lesher [Wed, 30 Jun 2010 01:07:02 +0000 (01:07 +0000)]
Permission checking for the system application is backwards.

(closes issue #17550)
 Reported by: kenner
 Patches:
       manager.c.diff uploaded by kenner (license 1040)
 Tested by: kenner

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

9 years agoDon't attempt to proceed if our internal parser indicates an invalid file.
Tilghman Lesher [Wed, 30 Jun 2010 01:01:14 +0000 (01:01 +0000)]
Don't attempt to proceed if our internal parser indicates an invalid file.

(closes issue #17560)
 Reported by: Nick_Lewis

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

9 years agoMerged revisions 273060 via svnmerge from
Tilghman Lesher [Tue, 29 Jun 2010 23:20:40 +0000 (23:20 +0000)]
Merged revisions 273060 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273060 | tilghman | 2010-06-29 18:15:28 -0500 (Tue, 29 Jun 2010) | 10 lines

  Allow the "useragent" value to be restored into memory from the realtime backend.

  This value is purely informational.  It does not alter configuration at all.

  (closes issue #16029)
   Reported by: Guggemand
   Patches:
         realtime-useragent.patch uploaded by Guggemand (license 897)
   Tested by: Guggemand
........

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

9 years agoRecorded merge of revisions 273057 via svnmerge from
Tilghman Lesher [Tue, 29 Jun 2010 22:59:51 +0000 (22:59 +0000)]
Recorded merge of revisions 273057 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273057 | tilghman | 2010-06-29 17:58:58 -0500 (Tue, 29 Jun 2010) | 4 lines

  _Really_ skip the channel... don't just retry for another 200 cycles.

  (Closes issue SWP-1652, ABE-2240)
........

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

9 years agoExclude libical for insufficient versions.
Tilghman Lesher [Tue, 29 Jun 2010 22:40:00 +0000 (22:40 +0000)]
Exclude libical for insufficient versions.

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

9 years agoSend DialPlanComplete as a response, not as a separate event.
Tilghman Lesher [Tue, 29 Jun 2010 22:39:22 +0000 (22:39 +0000)]
Send DialPlanComplete as a response, not as a separate event.

Otherwise, it goes to all manager sessions and may exclude the current session,
if the Events mask excludes it.

(closes issue #17504)
 Reported by: rrb3942
 Patches:
       showdialplan_patch.diff uploaded by rrb3942 (license 1003)
 Tested by: rrb3942

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

9 years agosend a 400 Bad Request on malformed sip request
David Vossel [Tue, 29 Jun 2010 20:44:05 +0000 (20:44 +0000)]
send a 400 Bad Request on malformed sip request

RFC 2361 section 24.4.1 send a 400 Bad Request if the request
can not be understood due to malformed syntax.  Currently we
simply ignore a packet with a missing callid, to, from, or
via header.  Instead of ignoring we now send the 400 Bad request.

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

9 years agoMerged revisions 272925 via svnmerge from
Tilghman Lesher [Mon, 28 Jun 2010 21:50:57 +0000 (21:50 +0000)]
Merged revisions 272925 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272925 | tilghman | 2010-06-28 16:50:02 -0500 (Mon, 28 Jun 2010) | 8 lines

  Don't change ownership/group/permissions on run directory, if it already exists.

  (closes issue #17076)
   Reported by: stuarth
   Patches:
         20100324__issue17076.diff.txt uploaded by tilghman (license 14)
   Tested by: stuarth
........

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

9 years agoMerged revisions 272921-272922 via svnmerge from
Tilghman Lesher [Mon, 28 Jun 2010 21:42:52 +0000 (21:42 +0000)]
Merged revisions 272921-272922 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272921 | tilghman | 2010-06-28 16:29:27 -0500 (Mon, 28 Jun 2010) | 8 lines

  Change the way that we read include files, to accommodate for changes in GCC 4.4.

  (closes issue #17472)
   Reported by: seandarcy
   Patches:
         config2.patch uploaded by nivan (license 1066)
   Tested by: nivan
........
  r272922 | tilghman | 2010-06-28 16:38:49 -0500 (Mon, 28 Jun 2010) | 2 lines

  Also trim trailing blanks on #includes
........

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

9 years agorfc compliant sip option parsing + new unit test
David Vossel [Mon, 28 Jun 2010 18:38:47 +0000 (18:38 +0000)]
rfc compliant sip option parsing + new unit test

RFC 3261 section 8.2.2.3 states that if any unsupported options
are found in the Require header field, a "420 (Bad Extension)"
response should be sent with an Unsupported header field containing
only the unsupported options.

This is not currently being done correctly.  Right now, if Asterisk
detects any unsupported sip options in a Require header the entire
list of options are returned in the Unsupported header even if some
of those options are in fact supported.  This patch fixes that by
building an unsupported options character buffer when parsing the
options that can be sent with the 420 response.  A unit test verifying
this functionality has been created.  Some code refactoring was required.

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

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

9 years agoMerged revisions 272804 via svnmerge from
Mark Michelson [Mon, 28 Jun 2010 17:33:12 +0000 (17:33 +0000)]
Merged revisions 272804 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272804 | mmichelson | 2010-06-28 12:31:40 -0500 (Mon, 28 Jun 2010) | 5 lines

  Decode URI in contact header of 302 response.

  ABE-2352
........

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

9 years agoUse the underscore package so that underscores do not need to be escaped.
Russell Bryant [Mon, 28 Jun 2010 15:33:32 +0000 (15:33 +0000)]
Use the underscore package so that underscores do not need to be escaped.

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

9 years agocode guidelines cleanup for retrans_pkt() function
David Vossel [Mon, 28 Jun 2010 14:55:25 +0000 (14:55 +0000)]
code guidelines cleanup for retrans_pkt() function

I am doing work in this function.  I noticed a large number of
coding guidline fixes that needed to be made.  Rather than have
those changes distract from my functional changes I decided
to separate these into a separate patch.

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

9 years agoMerged revisions 272562 via svnmerge from
Tilghman Lesher [Fri, 25 Jun 2010 20:18:47 +0000 (20:18 +0000)]
Merged revisions 272562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272562 | tilghman | 2010-06-25 15:17:37 -0500 (Fri, 25 Jun 2010) | 5 lines

  Make the structure of the table specified before match the queries and results.

  (closes issue #17557)
   Reported by: cmaj
........

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

9 years agoImplemement support for handling multiple documents when sending.
Matthew Nicholson [Fri, 25 Jun 2010 19:42:54 +0000 (19:42 +0000)]
Implemement support for handling multiple documents when sending.

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

9 years agochan_sip: more accurate retransmissions
David Vossel [Fri, 25 Jun 2010 19:39:53 +0000 (19:39 +0000)]
chan_sip: more accurate retransmissions

RFC3261 states that Timer A should start at 500ms (T1) by default.
In chan_sip this value initially started at 1000ms and I changed
it to 500ms recently. After doing that I noticed in my packet
captures that it still occasionally retransmitted starting at
1000ms instead of 500ms like I told it to.  This occurs because
the scheduler runs in the do_monitor thread.  If a new retransmission
is added while the do_monitor thread is sleeping then it may not
detect that retransmission for nearly 1000ms.  To fix this I just
poke the do_monitor thread to wake up when a new packet is sent
reliably requiring retransmits.  The thread then detects the new
scheduler entry and adjusts its sleep time to account for it.

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

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

9 years agoSymlink sounds files, to save disk space, when multiple tarballs/checkouts are on...
Tilghman Lesher [Fri, 25 Jun 2010 19:17:16 +0000 (19:17 +0000)]
Symlink sounds files, to save disk space, when multiple tarballs/checkouts are on the same system.

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

9 years agoMerged revisions 272446 via svnmerge from
Richard Mudgett [Thu, 24 Jun 2010 22:11:26 +0000 (22:11 +0000)]
Merged revisions 272446 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272446 | rmudgett | 2010-06-24 16:58:49 -0500 (Thu, 24 Jun 2010) | 10 lines

  ss_thread calls pri_grab without lock during overlap dial

  Recent changes to chan_dahdi with relation to overlap dialing call
  pri_grab without first obtaining a lock.

  (closes issue #17414)
  Reported by: pdf
  Patches:
        bug17414.patch uploaded by jpeeler (license 325)
........

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

9 years agoResolve some errors produced during module unload of chan_iax2.
Russell Bryant [Wed, 23 Jun 2010 23:09:28 +0000 (23:09 +0000)]
Resolve some errors produced during module unload of chan_iax2.

The external test suite stops Asterisk using the "core stop gracefully" command.
The logs from the tests show that there are a number of problems with Asterisk
trying to cleanly shut down.  This patch addresses the following type of error
that comes from chan_iax2:

[Jun 22 16:58:11] ERROR[29884]: lock.c:129 __ast_pthread_mutex_destroy:
                chan_iax2.c line 11371 (iax2_process_thread_cleanup):
                Error destroying mutex &thread->lock: Device or resource busy

For an example in the context of a build, see:

http://bamboo.asterisk.org/browse/AST-TRUNK-739/log

The primary purpose of this patch is to change the thread pool shutdown
procedure to be more explicit to ensure that the thread exits from a point
where it is not holding a lock.  While testing that, I encountered various
crashes due to the order of operations in unload_module() being problematic.
I reordered some things there, as well.

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

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

9 years agoMerged revisions 272367 via svnmerge from
Matthew Nicholson [Wed, 23 Jun 2010 22:36:49 +0000 (22:36 +0000)]
Merged revisions 272367 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

This version of the patch only adds AgentComplete for attended transfers.  It was already present for blind transfers.

........
  r272367 | mnicholson | 2010-06-23 17:33:51 -0500 (Wed, 23 Jun 2010) | 8 lines

  Send AgentComplete manager events in the event of blind and attended transfers.

  (closes issue #16819)
  Reported by: elbriga
  Patches:
        app_queue.diff uploaded by elbriga (license 482)
........

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

9 years agoIf there is realtime configuration, it does not get re-read on reload unless the...
Tilghman Lesher [Wed, 23 Jun 2010 21:53:49 +0000 (21:53 +0000)]
If there is realtime configuration, it does not get re-read on reload unless the config file also changes.

(closes issue #16982)
 Reported by: dmitri
 Patches:
       res_musiconhold.patch uploaded by dmitri (license 1001)
 Tested by: atis

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

9 years agoEnsure a NULL file while debugging cannot crash AEL.
Tilghman Lesher [Wed, 23 Jun 2010 21:06:40 +0000 (21:06 +0000)]
Ensure a NULL file while debugging cannot crash AEL.

(closes issue #17215)
 Reported by: vazir
 Patches:
       20100518__issue17215.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman

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

9 years agoFix previous merge. ast_test_flag != ast_test_flag64
Paul Belanger [Wed, 23 Jun 2010 21:06:15 +0000 (21:06 +0000)]
Fix previous merge. ast_test_flag != ast_test_flag64

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

9 years agoMerged revisions 272255 via svnmerge from
Paul Belanger [Wed, 23 Jun 2010 21:00:00 +0000 (21:00 +0000)]
Merged revisions 272255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272255 | pabelanger | 2010-06-23 16:57:01 -0400 (Wed, 23 Jun 2010) | 12 lines

  First caller into a dynamic conference now enter pin once.

  If MeetMe is configured to use dynamic conference
  numbers, then the first caller (which creates the
  conference) had to enter the PIN number twice.

  (closes issue #15878)
  Reported by: shawkris
  Patches:
        issue15878.patch uploaded by pabelanger (license 224)
  Tested by: pabelanger
........

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

9 years agoUpdate configure when changing autconf m4 files...
Terry Wilson [Wed, 23 Jun 2010 20:59:17 +0000 (20:59 +0000)]
Update configure when changing autconf m4 files...

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

9 years agoHonor the --with-${library}=path for AST_EXT_TOOL_CHECK
Terry Wilson [Wed, 23 Jun 2010 20:53:48 +0000 (20:53 +0000)]
Honor the --with-${library}=path for AST_EXT_TOOL_CHECK

(closes issue #16991)
Reported by: pprindeville
Patches:
      with_netsnmp.patch.txt uploaded by twilson (license 396)
Tested by: twilson

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

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

9 years agoCorrect manager variable 'EventList' case.
Paul Belanger [Wed, 23 Jun 2010 20:35:45 +0000 (20:35 +0000)]
Correct manager variable 'EventList' case.

(closes issue #17520)
Reported by: kobaz
Patches:
      manager.patch uploaded by kobaz (license 834)
Tested by: lmadsen

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

9 years agoAdd localization support for Spanish
Paul Belanger [Wed, 23 Jun 2010 20:22:44 +0000 (20:22 +0000)]
Add localization support for Spanish

(closes issue #17548)
Reported by: cjacobsen
Patches:
      say.conf.sample.diff uploaded by cjacobsen (license 1029)

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

9 years agoAdd new AMI command LocalOptimizeAway.
Tim Ringenbach [Wed, 23 Jun 2010 19:59:43 +0000 (19:59 +0000)]
Add new AMI command LocalOptimizeAway.

This command lets you request a "/n" local channel
optimize itself out of the way anyway.

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

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

9 years agoD'oh! Defaultenabled FTL.
Tilghman Lesher [Wed, 23 Jun 2010 18:45:18 +0000 (18:45 +0000)]
D'oh!  Defaultenabled FTL.

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

9 years agoRecorded merge of revisions 272147 via svnmerge from
Tilghman Lesher [Wed, 23 Jun 2010 18:41:18 +0000 (18:41 +0000)]
Recorded merge of revisions 272147 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272147 | tilghman | 2010-06-23 13:40:28 -0500 (Wed, 23 Jun 2010) | 5 lines

  Backport part of revision 136715 to fix callerid in voicemail text files (IMAP only).

  (closes issue #16945)
   Reported by: mneuhauser
........

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

9 years agoDon't start the sla thread unless we realy need it
Terry Wilson [Wed, 23 Jun 2010 18:39:20 +0000 (18:39 +0000)]
Don't start the sla thread unless we realy need it

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

9 years agoLoad all lines from realtime, not just the first one.
Tilghman Lesher [Wed, 23 Jun 2010 18:25:54 +0000 (18:25 +0000)]
Load all lines from realtime, not just the first one.

(closes issue #17144)
 Reported by: nahuelgreco
 Patches:
       20100513__issue17144__trunk.diff.txt uploaded by tilghman (license 14)
 Tested by: tilghman

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

9 years agoMake sure reload updates SLA config
Terry Wilson [Wed, 23 Jun 2010 17:21:40 +0000 (17:21 +0000)]
Make sure reload updates SLA config

Even if there are no stations or trunks defined, we need to start the sla
thread to make sure we get the reload event. Also, when doing a reload we need
to remove the existing trunks and stations or they end up hanging around.

(closes issue #16818)
Reported by: mbonin
Patches:
      sla_reload.patch uploaded by twilson (license 396)
Tested by: twilson

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

9 years agoAdd extra protection for reinvite glare scenario.
Mark Michelson [Wed, 23 Jun 2010 17:08:34 +0000 (17:08 +0000)]
Add extra protection for reinvite glare scenario.

Testing proved that if Asterisk sent a connected line reinvite, and
the endpoint to which the reinvite were being sent sent a reinvite, Asterisk
would not properly respond with a 491 response.

The reason is that on connected line reinvites, we set the dialog's invitestate
to INV_CALLING to prevent Asterisk from sending a rapid flurry of connected line
reinvites. For other reinvites we do not do this. Because of the current invitestate,
when Asterisk received the reinvite, we interpreted this as a spiraled INVITE, and thus
did not behave properly.

The fix for this is to not enter the loop detection or spiral logic in handle_request_invite
if the channel state is currently up. This way, no mid-call reinvites will be misinterpreted,
no matter what the nature of the reinvite may have been.

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

9 years agoDon't try to lock/unlock an uninitialized lock on a dahdi_pri.
Russell Bryant [Tue, 22 Jun 2010 23:20:37 +0000 (23:20 +0000)]
Don't try to lock/unlock an uninitialized lock on a dahdi_pri.

This small changes prevents destroy_all_channels() from accessing a lock on an
unused dahdi_pri struct, resolving a ton of ERRORs that get spewed out when
shutting Asterisk down gracefully.

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

9 years agofixes issue with 'dialplan remove extension blah' segfaulting with tab completion
David Vossel [Tue, 22 Jun 2010 22:11:50 +0000 (22:11 +0000)]
fixes issue with 'dialplan remove extension blah' segfaulting with tab completion

(closes issue #17440)
Reported by: kobaz

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

9 years agoignore CANCEL request after having already received final response to INVITE
David Vossel [Tue, 22 Jun 2010 20:37:05 +0000 (20:37 +0000)]
ignore CANCEL request after having already received final response to INVITE

RFC 3261 section 9 states that a CANCEL has no effect on a
request to a UAS that has already given a final response.  This
patch checks to make sure there is a pending invite before
allowing a CANCEL request to be processed, otherwise it responds
to the CANCEL with a "481 Call/Transaction Does Not Exist".

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

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

9 years agominor fixes for white/black event filters
David Vossel [Tue, 22 Jun 2010 17:57:28 +0000 (17:57 +0000)]
minor fixes for white/black event filters

This fixes a ref count leak in event filters and checks for
a filter container allocation failure during session creation.

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

9 years agoMerged revisions 271902 via svnmerge from
Matthew Nicholson [Tue, 22 Jun 2010 17:35:17 +0000 (17:35 +0000)]
Merged revisions 271902 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271902 | mnicholson | 2010-06-22 12:31:57 -0500 (Tue, 22 Jun 2010) | 8 lines

  Decrease the module ref count in sip_hangup when SIP_DEFER_BYE_ON_TRANSFER is set.  This is necessary to keep the ref count correct.

  (closes issue #16815)
  Reported by: rain
  Patches:
        chan_sip-unref-fix.diff uploaded by rain (license 327) (modified)
  Tested by: rain
........

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

9 years agoAdd regular expression filtering for manager events.
Jeff Peeler [Tue, 22 Jun 2010 16:29:18 +0000 (16:29 +0000)]
Add regular expression filtering for manager events.

This patch as documented in the sample config allows one to optionally apply
white, black, or both types of filtering to manager events. The new
'eventfilter' option is set per user.

(closes issue #14861)
Reported by: fnordian
Patches:
      eventfilter3.patch uploaded by fnordian (license 110),
      modified by me

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

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

9 years agoResolve some errors that occur on a graceful shutdown.
Russell Bryant [Tue, 22 Jun 2010 16:28:03 +0000 (16:28 +0000)]
Resolve some errors that occur on a graceful shutdown.

Don't Finalize() if Initialize() did not succeed.  This resulted in an error
about trying to Finalize() an invalid handle.

Also trim some trailing whitespace while in the area.

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

9 years agoChange the method of retrieving the Asterisk version string.
Russell Bryant [Tue, 22 Jun 2010 16:17:14 +0000 (16:17 +0000)]
Change the method of retrieving the Asterisk version string.

Using this method makes it so res_fax doesn't have to be rebuilt on every
svn update.

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

9 years agofixes attended transfer behavior when both transferee and transferer hung up
David Vossel [Tue, 22 Jun 2010 15:46:22 +0000 (15:46 +0000)]
fixes attended transfer behavior when both transferee and transferer hung up

If both the transferer and transferee of a attended transfer hangup before
the new channel picks up, the new channel should be hung up as well as it
has no endpoint to talk to.  This mirrors the expected behavior used in 1.4.

(closes issue #17444)
Reported by: corruptor

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

9 years agoUpdated the CHANGES file documenting the addition of a configurable port in the dundi...
Matthew Nicholson [Tue, 22 Jun 2010 15:08:39 +0000 (15:08 +0000)]
Updated the CHANGES file documenting the addition of a configurable port in the dundi config file.

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

9 years agoMerged revisions 271761 via svnmerge from
Matthew Nicholson [Tue, 22 Jun 2010 14:54:58 +0000 (14:54 +0000)]
Merged revisions 271761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271761 | mnicholson | 2010-06-22 09:49:36 -0500 (Tue, 22 Jun 2010) | 9 lines

  Allow users to specify a port for dundi peers.

  (closes issue #17056)
  Reported by: klaus3000
  Patches:
        dundi-peerport-patch-trunk.txt uploaded by klaus3000 (license 65)
  Tested by: klaus3000
........

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

9 years agoMerged revisions 271689 via svnmerge from
Matthew Nicholson [Tue, 22 Jun 2010 12:58:28 +0000 (12:58 +0000)]
Merged revisions 271689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r271689 | mnicholson | 2010-06-22 07:52:27 -0500 (Tue, 22 Jun 2010) | 8 lines

  Modify chan_sip's packet generation api to automatically calculate the Content-Length.  This is done by storing packet content in a buffer until it is actually time to send the packet, at which time the size of the packet is calculated.  This change was made to ensure that the Content-Length is always correct.

  (closes issue #17326)
  Reported by: kenner
  Tested by: mnicholson, kenner

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

This change also adds an ast_str_copy_string() function (similar to ast_copy_string), that copies one ast_str into another, properly handling embedded nulls.

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

9 years agoConflict kqueue on OS X, since it doesn't work there yet, anyway.
Tilghman Lesher [Mon, 21 Jun 2010 22:41:00 +0000 (22:41 +0000)]
Conflict kqueue on OS X, since it doesn't work there yet, anyway.

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

9 years agoadd speex 16khz sample frame so codec cost can be calculated
David Vossel [Mon, 21 Jun 2010 21:58:33 +0000 (21:58 +0000)]
add speex 16khz sample frame so codec cost can be calculated

(closes issue #17534)
Reported by: fabled
Patches:
      speex-wb-sample.diff uploaded by fabled (license 448)

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