Commit Graph

6575 Commits

Author SHA1 Message Date
Mark Michelson cd4ebd336f 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
2010-07-08 22:08:07 +00:00
Eliel C. Sardanons a1b89a6a50 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
2010-07-08 14:48:42 +00:00
David Vossel 21f8c77934 Fixes some ref count issues introduced by r274539
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-07 20:09:00 +00:00
Richard Mudgett fd3297a272 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
2010-07-07 18:32:35 +00:00
Richard Mudgett d20ca64e70 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
2010-07-07 18:20:00 +00:00
Mark Michelson d6f8dd67f7 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
2010-07-07 16:21:53 +00:00
Terry Wilson 745f4edbd5 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
2010-07-06 22:15:27 +00:00
Tilghman Lesher 5754933045 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
2010-07-06 22:09:23 +00:00
Tilghman Lesher f4d96da591 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
2010-07-03 02:36:31 +00:00
Tzafrir Cohen c613897d1c 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
2010-07-02 15:57:02 +00:00
David Vossel 243d87038e 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
2010-07-01 16:40:17 +00:00
Tilghman Lesher 62a3133df2 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
2010-06-29 23:20:40 +00:00
David Vossel 64ae2e1e2a 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
2010-06-29 20:44:05 +00:00
David Vossel 8a07dbf95d 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
2010-06-28 18:38:47 +00:00
Mark Michelson dc877759cb 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
2010-06-28 17:33:12 +00:00
David Vossel 43871a926b 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
2010-06-28 14:55:25 +00:00
David Vossel aa428b8967 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
2010-06-25 19:39:53 +00:00
Richard Mudgett 30888f913d 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
2010-06-24 22:11:26 +00:00
Russell Bryant 450f4ff2ee 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
2010-06-23 23:09:28 +00:00
Tim Ringenbach c6b7eae5e6 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
2010-06-23 19:59:43 +00:00
Tilghman Lesher 48ae8ded89 D'oh! Defaultenabled FTL.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-23 18:45:18 +00:00
Tilghman Lesher cae6fa66ed 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
2010-06-23 18:25:54 +00:00
Mark Michelson 2c798f321a 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
2010-06-23 17:08:34 +00:00
Russell Bryant 746d8e6013 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
2010-06-22 23:20:37 +00:00
David Vossel 1509737580 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
2010-06-22 20:37:05 +00:00
Matthew Nicholson 5f45ca4d50 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
2010-06-22 17:35:17 +00:00
Matthew Nicholson 9bbeb945e8 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
2010-06-22 12:58:28 +00:00
David Vossel 462da0585e fixes crash when From header URI is missing "sip:"
(closes issue #17437)
Reported by: klaus3000
Patches:
      sip_crash uploaded by dvossel (license 671)
Tested by: klaus3000



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-21 20:46:22 +00:00
David Vossel 846050f698 fixes some coding guideline issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-17 21:23:41 +00:00
David Vossel a1fe641a38 retransmit response to BYE requests until timer J expires
According to RFC 3261 section 17.2.2, which describes non-INVITE server
transaction, when a dialog enters the Completed state it must destroy
the dialog after Timer J (T1*64) fires.  For a BYE transaction Asterisk
terminates the dialog immediately during sip_hangup() when it should be
waiting T1*64 ms.  This results in some odd behavior.  For instance if
Asterisk receives a BYE and transmits a 200ok in response, if the endpoint
never receives the 200ok it will retransmit the BYE to which Asterisk
responds with a "481 Call leg/transaction does not exist" because the
dialog is already gone.

To resolve this I made a function called sip_scheddestroy_final().  This
differs slightly from sip_schedestroy() in that it enables a flag that
will prevent the destruction from ever being rescheduled or canceled
afterwards.  It also prevents the pvt's needdestroy flag from being set
which triggers the destruction of the dialog within the do_monitor thread().
By using this function we are guaranteed destruction will not occur
until the scheduled time.  This allows Asterisk to respond to any possible
retransmits for a dialog after we process the initial BYE request for T1*64 ms.

Other changes: I removed two instances where sip_cancel_destroy is used
right before calling sip_scheddestroy.  sip_scheddestroy always calls
sip_cancel_destroy before scheduling the new destruction so it is completely
unnecessary.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-17 18:45:32 +00:00
Jeff Peeler 0ef5550742 Change expected operation from error to debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271192 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-17 15:34:08 +00:00
David Vossel 2112418032 addition of more parse_uri test cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@271056 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 22:37:45 +00:00
Jason Parker 01039c0465 Fix the actual place that was pointed out, for previous commit.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270983 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 21:12:25 +00:00
Jason Parker 8ef2c3100a Merged revisions 270980 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r270980 | qwell | 2010-06-16 16:10:09 -0500 (Wed, 16 Jun 2010) | 4 lines
  
  Need to lock the agent chan before access its internal bits.
  
  Pointed out by russellb on asterisk-dev mailing list.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 21:10:48 +00:00
David Vossel fcb055fb4e addition of G.719 pass-through support
(closes issue #16293)
Reported by: malcolmd
Patches:
      g719.passthrough.patch.7 uploaded by malcolmd (license 924)
      format_g719.c uploaded by malcolmd (license 924)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 19:03:24 +00:00
David Vossel 1da8159aa6 Merged revisions 270866 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r270866 | dvossel | 2010-06-16 12:35:29 -0500 (Wed, 16 Jun 2010) | 22 lines
  
  fixes chan_iax2 race condition
  
  There is code in chan_iax2.c that attempts to guarantee that only a single
  active thread will handle a call number at a time.  This code works once
  the thread is added to an active_list of threads, but we are not currently
  guaranteed that a newly activated thread will enter the active_list immediately
  because it is left up to the thread to add itself after frames have been
  queued to it.  This means that if two frames come in for the same call number
  at the same time, it is possible for them to grab two separate threads because
  the first thread did not add itself to the active_list fast enough.  This
  causes some pretty complex problems.
  
  This patch resolves this race condition by immediately adding an activated
  thread to the active_list within the network thread and only depending on
  the thread to remove itself once it is done processing the frames queued to
  it.  By doing this we are guaranteed that if another frame for the same call
  number comes in at the same time, that this thread will immediately be found
  in the active_list of threads.
  
  Review: https://reviewboard.asterisk.org/r/720/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 17:36:51 +00:00
Jeff Peeler 00433d60e6 Fix no call waiting caller ID
Clearing the callwaitcas flag in analog_call was causing the incoming D digit
to be ignored which triggers sending the caller ID.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-16 16:45:07 +00:00
Russell Bryant 3194c061a7 Don't blow up if an ast_channel doesn't get allocated.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 22:48:12 +00:00
Terry Wilson 480f412858 Make contactdeny apply to src ip when nat=yes
chan_sip's "contactdeny" feature screens the "to be registered contact".
In case of nat=yes it should not use the address information from the
Contact header (which is not used at all for routing), but the source
IP address of the request.

Thus, if nat=yes and a client sends a request from a denied IP address
(e.g. by spoofing the src-IP address) it can bypass the screening.

This commit makes contactdeny apply to the src ip when nat=yes instead.

(closes issue #17276)
Reported by: klaus3000
Patches: 
      patch-asterisk-trunk-contactdeny.txt uploaded by klaus3000 (license 65)
Tested by: klaus3000


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-15 20:18:04 +00:00
Richard Mudgett fb5fddd987 Extract sig_ss7_init_linkset() to sig_ss7.
Also found a place where sig_pri_init_pri() was inlined and called it
instead.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-14 20:51:09 +00:00
Jason Parker a806196f79 Add option to get untruncated channel name from AGENT function.
The "channel" option would chop the channel name at the last '-', which made
it useless for something like a channel transfer from the dialplan.  The
"fullchannel" option will return the channel name as-is.

ABE-2218


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270260 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-14 19:41:43 +00:00
Richard Mudgett 93a5e74e37 Add digit manipulation tag support to chan_dahdi/sig_pri like chan_misdn.
Add the append_msn_to_cid_tag option to chan_dahdi like chan_misdn.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270219 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-14 15:55:35 +00:00
Russell Bryant 8f92f95530 Attempt to fix a FreeBSD build error by including sys/stat.h.
http://bamboo.asterisk.org/download/AST-TRUNKFREEBSD/build_logs/AST-TRUNKFREEBSD-187.log


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-10 00:32:31 +00:00
Russell Bryant 403f9df8d0 Merged revisions 269495 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r269495 | russell | 2010-06-09 17:18:37 -0500 (Wed, 09 Jun 2010) | 2 lines
  
  Don't stop Asterisk if chan_oss fails to register 'Console' (due to another channel driver already claiming it).
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 22:19:20 +00:00
Richard Mudgett 717570899c Add missing API function to sig_ss7: sig_ss7_fixup().
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 17:06:41 +00:00
Richard Mudgett 6c6260d4c7 Eliminate deadlock potential in dahdi_fixup().
Calling dahdi_indicate() within dahdi_fixup() while the owner pointers are
in a potentially inconsistent state is a potentially bad thing in
principle.

However, calling dahdi_indicate() when the channel private lock is already
held can cause a deadlock if the PRI lock is needed because
dahdi_indicate() will also get the channel private lock.  The pri_grab()
function assumes that the channel private lock is held once to avoid
deadlock.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 16:54:38 +00:00
Tzafrir Cohen 6d627b8c38 dial by name in chan_dahdi
* chan_dahdi supports dialing configuring and dialing by device file name.
  DAHDI/span-name!local!1 will use /dev/dahdi/span-name/local/1 . Likewise
  it may appear in chan_dahdi.conf as 'channel => span-name!local!1'.
* A new options for chan_dahdi.conf: 'ignore_failed_channels'. Boolean.
  False by default. If set, chan_dahdi will ignore failed 'channel' entries.
  Handy for the above name-based syntax as it does not depend on
  initialization order.
* have my_pri_make_cc_dialstring() only manupulate dial-strings of group
  (gGrR) dialing, which make it lsightly more complicated.

https://reviewboard.asterisk.org/r/535/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@269238 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-09 13:17:43 +00:00
Leif Madsen c672763af8 Fix some doxygen warnings.
(closes issue #17336)
Reported by: snuffy
Patches:
      doxygen-fixes1.diff uploaded by snuffy (license 35)
Tested by: russell

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 14:38:18 +00:00
Terry Wilson 857814f435 Add SRTP support for Asterisk
After 5 years in mantis and over a year on reviewboard, SRTP support is finally
being comitted. This includes generic CHANNEL dialplan functions that work for
getting the status of whether a call has secure media or signaling as defined
by the underlying channel technology and for setting whether or not a new
channel being bridged to a calling channel should have secure signaling or
media. See doc/tex/secure-calls.tex for examples.

Original patch by mikma, updated for trunk and revised by me.

(closes issue #5413)
Reported by: mikma
Tested by: twilson, notthematrix, hemanshurpatel

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 05:29:08 +00:00
Richard Mudgett ebbf166c2d Make SIP tests compile again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@268857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-08 00:45:13 +00:00