Commit Graph

25959 Commits

Author SHA1 Message Date
Matthew Jordan c3ff212cae res/res_phoneprov: Bail on registration if res_phoneprov didn't load
If res_phoneprov failed to fully load (due to not being configured), the
providers container will be NULL. If a module attempts to register a phone
provisioning provider, it should check for the presence of the container.
If there is no providers container, it should return an error.

This patch makes the ast_phoneprov_provider_register function do that...
otherwise this would be a silly commit message.
........

Merged revisions 425220 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425221 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 14:31:42 +00:00
Joshua Colp c46100ad5f res_pjsip_phoneprov_provider: Add missing dependency on pjproject.
........

Merged revisions 425216 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425217 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 14:24:57 +00:00
Kinsey Moore 37b5f52da7 CallerID: Fix parsing regression
This fixes a regression in callerid parsing introduced when another bug
was fixed. This bug occurred when the name was composed entirely of
DTMF keys and quoted without a number section (<>). 

ASTERISK-24406 #close
Reported by: Etienne Lessard
Tested by: Etienne Lessard
Patches:
    callerid_fix.diff uploaded by Kinsey Moore
Review: https://reviewboard.asterisk.org/r/4067/
........

Merged revisions 425152 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 425153 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425154 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425155 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425156 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 13:03:18 +00:00
Joshua Colp 0ef680cff0 res_pjsip_nat: Place source port into rport of responses if 'force_rport' is on.
When the 'force_rport' option is enabled the behavior should be the same
as if the remote side placed rport into the message themselves. Therefore
any responses we send should include the source port of the request in the
rport of the Via header.

#SIPit31

ASTERISK-24387 #close
Reported by: Matt Jordan
........

Merged revisions 425131 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425132 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 12:10:53 +00:00
Walter Doekes d3f525fd8f chan_sip: Fix dialog leak resulting from missing ACK to re-INVITE.
If a device re-INVITEs at the same time as the dialog is hung up, and
if then the ACK to the re-INVITE never reaches Asterisk, chan_sip would
fail to destroy the dialog after a while.  This resulted in (most
prominently) file handle leaks.

(Patch reindented by me.)

ASTERISK-20784 #close
ASTERISK-15879 #close
Reported by: Torrey Searle, Nitesh Bansal
Patches:
  reinvite_ack_timeout.patch uploaded by Torrey Searle (License #5334)
  patch_asterisk_20784.txt uploaded by Nitesh Bansal (License #6418)

Reviewboard: https://reviewboard.asterisk.org/r/4052/
(testcase can be found at r4051)
........

Merged revisions 425068 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 425069 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 425070 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425071 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-10 07:34:50 +00:00
George Joseph aef63118da res_pjsip_phoneprov_provider: fix compile breakage on AST_VECTOR
endpoint->inbound_auths was changed to a vector in 13 and I
committed the 12 patch instead of the 13 patch.

Tested-by: George Joseph
........

Merged revisions 425052 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425053 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 23:37:49 +00:00
Kevin Harwell 6fc4df7279 res_rtp_asterisk: Crash if no candidates received for component
When starting ice if there is not at least one remote ice candidate with an RTP
component asterisk will crash. This is due to an assertion in pjnath as it
expects at least one candidate with an RTP component. Added a check to make
sure at least one candidate contains an RTP component and at least one candidate
has an RTCP component.

ASTERISK-24383 #close
Review: https://reviewboard.asterisk.org/r/4039/
........

Merged revisions 425031 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425032 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 21:39:12 +00:00
George Joseph c6837c236f res_pjsip_phoneprov_provider: Provides pjsip integration with res_phoneprov
This module allows res_pjsip to integrate with res_phoneprov.  It handles
the pjsip 'phoneprov' object type.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3976/
........

Merged revisions 425007 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425008 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 20:55:50 +00:00
Matthew Jordan 3a187aa14a res/res_phoneprov: Don't cancel Asterisk load on module load failure
........

Merged revisions 424985 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424986 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 18:44:00 +00:00
George Joseph cc595f7353 res_phoneprov: Refactor phoneprov to allow pluggable config providers
This patch makes res_phoneprov more modular so other modules (like pjsip)
can provide configuration information instead of res_phoneprov relying solely
on users.conf and sip.conf.  To accomplish this a new ast_phoneprov public API
is now exposed which allows config providers to register themselves, set
defaults (server profile, etc) and add user extensions.

* ast_phoneprov_provider_register registers the provider and provides callbacks
  for loading default settings and loading users.
* ast_phoneprov_provider_unregister clears the defaults and users.
* ast_phoneprov_add_extension should be called once for each user/extension
  by the provider's load_users callback to add them.
* ast_phoneprov_delete_extension deletes one extension.
* ast_phoneprov_delete_extensions deletes all extensions for the provider.

Tested-by: George Joseph
Review: https://reviewboard.asterisk.org/r/3970/
........

Merged revisions 424963 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424964 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424965 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 17:46:23 +00:00
Richard Mudgett 0f50e8856b cdr.c: Make turning on CDR debug a one step process instead of two.
Now "cdr set debug on" doesn't also require "core set verbose 1" to see
CDR debug output.
........

Merged revisions 424941 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424942 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424943 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 16:38:40 +00:00
Walter Doekes d0255c4a46 safe_asterisk: Don't automatically exceed MAXFILES value of 2^20.
On systems with lots of RAM (e.g. 24GB) /proc/sys/fs/file-max divided
by two can exceed the per-process file limit of 2^20. This patch
ensures the value is capped.

(Patch cleaned up by me.)

ASTERISK-24011 #close
Reported by: Michael Myles
Patches:
  safe_asterisk-ulimit.diff uploaded by Michael Myles (License #6626)
........

Merged revisions 424875 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 424878 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424879 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424880 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424881 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-09 08:10:35 +00:00
Joshua Colp 8b0089ea1d res_rtp_asterisk: Allow only UDP ICE candidates.
The underlying library, pjnath, that res_rtp_asterisk uses for ICE
support does not have support for ICE-TCP. As candidates are
passed through directly to it this can cause error messages to occur
when it receives something unexpected (such as a TCP candidate).
This change merely ignores all non-UDP candidates so they never
reach pjnath.

ASTERISK-24326 #close
Reported by: Joshua Colp
........

Merged revisions 424852 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424853 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424854 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-08 18:47:32 +00:00
Kinsey Moore 5e50638539 Stasis: Relegate log message to dev-mode
This error message primarily applies to development tasks and will now
only show up when dev-mode is enabled via configure.
........

Merged revisions 424850 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-08 18:24:47 +00:00
Kinsey Moore 3dfc485e35 Indexer: Format message types may not exist
In Asterisk 13+, any given message type is not guaranteed to exist even
if Asterisk comes up correctly since creation of the message type could
be declined. The indexer should not prevent Asterisk from starting
under these conditions.
........

Merged revisions 424833 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-08 14:54:54 +00:00
Kinsey Moore d8bbf1ec1d Stasis: Only log errors for non-declined types
When message type creation is declined via stasis.conf, certain
operations log errors assuming that the declined type is being used
before initialization or after destruction. These error messages get
quite spammy for oft used message types and should not be logged in the
first place since the message type is validly NULL.

Reported by: Matt DiMeo
........

Merged revisions 424769 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-07 20:33:29 +00:00
Joshua Colp f7225da08a data: Properly access formats in capabilities structure when adding codecs.
Formats within a capabilities structure are addressed starting at 0, not 1.
Assuming 1 causes it to exceed an array.

ASTERISK-24389 #close
Reported by: Kevin Harwell
........

Merged revisions 424752 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-07 18:34:40 +00:00
Matthew Jordan a9011106b6 res/res_pjsip_outbound_registration: Initialize auth_reject_permanent parameter
Prior to this patch, the auth_reject_permanent parameter was not initialized on
the registration client state, leading to the parameter being disabled
regardless of the value specified in pjsip.conf.

This patch initialized the setting on the registration client state to the
provided configuration value.

ASTERISK-24398 #close
........

Merged revisions 424730 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424731 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-07 17:44:36 +00:00
Matthew Jordan 523da7d1b3 res/res_pjsip_pubsub: Fix typo in WARNING message
........

Merged revisions 424713 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-07 14:09:47 +00:00
Matthew Jordan 39bd5b7a70 message: Don't close an AMI connection on SendMessage action error
If SendMessage encounters an error (such as incorrect input provided to the
action), it will currently return -1. Actions should only return -1 if the
connection to the AMI client should be closed. In this case, SendMessage
causing the client to disconnect is inappropriate.

This patch causes the action to return 0, which simply causes the action to
fail.

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

ASTERISK-24354 #close
Reported by: Peter Katzmann
patches:
  sendMessage.patch uploaded by Peter Katzmann (License 5968)
........

Merged revisions 424690 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424691 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424692 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 18:39:54 +00:00
Richard Mudgett c384532aa4 features.c: Fix lingering channel ref while Bridge() application is active.
Using the Bridge application to bridge a channel that is executing an
applicaiton such as Wait results in a lingering Surrogate channel in the
CLI "core show channels" output even though it has already hungup.

* Fix bridge_exec() to not hold onto the current_dest_chan ref once it has
been put into the bridge.

* Eliminated bridge_exec()'s use of RAII_VAR().

ASTERISK-24224 #close
Reported by: Mark Michelson

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

Merged revisions 424668 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424669 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424670 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 15:41:32 +00:00
Matthew Jordan 3a87f32dc0 sdp_srtp: Add new lines to some WARNING messages
........

Merged revisions 424646 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424647 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 12:39:03 +00:00
Matthew Jordan cce3d99ec8 res_pjsip/pjsip_options: Do not 404 an OPTIONS request not sent to an endpoint
An OPTIONS request that is sent to Asterisk but not to a specific endpoint is
currently sent a 404 in response. This is because, not surprisingly, an empty
extension is never going to be found in the dialplan.

This patch makes it so that we only attempt to look up the endpoint in the
dialplan if it is specified in the OPTIONS request URI.

#SIPit31

ASTERISK-24370 #close
Reported by: Matt Jordan
........

Merged revisions 424624 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424625 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 01:01:43 +00:00
Matthew Jordan c013916869 pjsip/dialplan_functions: Handle PJSIP_MEDIA_OFFER called on non-PJSIP channels
Calling PJSIP_MEDIA_OFFER on a non-PJSIP channel is hazardous to your health.
It will treat the channels as a PJSIP channel, eventually hitting an ao2 error,
FRACKing on assertion error, and quite likely crashing.

This patch adds checks to the read/write callbacks that ensure that the channel
technology is of type 'PJSIP' before attempting to operate on the channel.

#SIPit31

ASTERISK-24382 #close
Reported by: Matt Jordan
........

Merged revisions 424621 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424622 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 00:53:37 +00:00
Matthew Jordan 45b7b474ac res_pjsip: Prevent crashes when PJPROJECT presents an rdata with no message
When a message that exceeds the PJ_MAX_PKT_SIZE is sent over a reliable
transport, it is possible (although it shouldn't occur) for pjproject to pass
up an rdata object with a NULL msg in the msg_info. Needless to say, things
that attempt to dereference this are in for a rough ride.

In particular, this caused crashes in three different locations, all of which
are 'low level' enough to intercept an rdata object early in processing:

(1) res_pjsip_logger
(2) res_hep_pjsip
(3) res_pjsip/distributor

Anything that can intercept an rdata object before res_pjsip/distributor should
be defensive when looking at the received packet.

#SIPit31

ASTERISK-24369 #close
Reported by: Matt Jordan
........

Merged revisions 424618 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424619 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 00:31:48 +00:00
Matthew Jordan f27f41a288 res/res_pjsip_pubsub: Gracefully handle errors when re-creating subscriptions
A subscription that has been persisted can - for various reasons - fail to be
re-created on startup. This patch resolves a number of crashes that occurred
when a subscription cannot be re-created on several off-nominal paths.

#SIPit31

ASTERISK-24368 #close
Reported by: Matt Jordan
........

Merged revisions 424601 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424602 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-06 00:13:58 +00:00
Corey Farrell 9611ef4f1e Release AMI connections on shutdown.
ASTERISK-24378 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4037/
........

Merged revisions 424578 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424579 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424580 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05 00:49:45 +00:00
Corey Farrell 1b0902caa4 chan_motif: Correct last commit to use ao2_cleanup to free format cap
This fix applies to 13 and trunk.

ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/
........

Merged revisions 424554 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05 00:15:43 +00:00
Corey Farrell 0cea12b9e8 chan_motif: Release format capabilities and config on module load error
ASTERISK-24384 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4043/
........

Merged revisions 424550 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424551 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424552 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-05 00:02:39 +00:00
Richard Mudgett 24ded9d9eb res_pjsip: Fix XML typo and update CHANGES.
ASTERISK-24199
........

Merged revisions 424528 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424529 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424530 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 21:58:03 +00:00
Richard Mudgett 70301b0438 audiohooks: Reevaluate the bridge technology when an audiohook is added or removed.
Adding a mixmonitor to a channel causes the bridge to change technologies
from native to simple_bridge so the call can be recorded.  However, when
the mixmonitor is stopped the bridge does not switch back to the native
technology.

* Added unbridge requests to reevaluate the bridge when a channel
audiohook is removed.

* Moved the unbridge request into ast_audiohook_attach() ensure that the
bridge reevaluates whenever an audiohook is attached.  This simplified the
mixmonitor and chan_spy start code as well.

* Added defensive code to stop_mixmonitor_full() in case additional
arguments are ever added to the StopMixMonitor application.

* Made ast_framehook_detach() not do an unbridge request if the framehook
does not exist.

* Made ast_framehook_list_fixup() do an unbridge request if there are any
framehooks.  Also simplified the loop.

ASTERISK-24195 #close
Reported by: Jonathan Rose

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

Merged revisions 424506 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424507 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 19:42:54 +00:00
Richard Mudgett cc11a78869 app_queue: Add dialplan function to get the channel name at the specified position in a queue.
The QUEUE_GET_CHANNEL function returns the caller's channel name at the
specified position in a queue.

QUEUE_GET_CHANNEL(<queuename>[,<position>])

The queue position parameter defaults to 1 if not specified.

Noop(${QUEUE_GET_CHANNEL(queuename, 2)})
"SIP/peer-00000002", if queue exist and have at least 2 callers

Noop(${QUEUE_GET_CHANNEL(queuename, 1)})
Noop(${QUEUE_GET_CHANNEL(queuename)})
"SIP/peer-00000000", if queue exist and have at least 1 caller

ASTERISK-24365 #close
Reported by: Kristian Hogh
Patches:
      queue_get_firstchannel.patch (license #6639) patch uploaded by Kristian Hogh
      rb4035.patch (license #6639) patch uploaded by Kristian Hogh
      Patch morphed from QUEUE_GET_FIRSTCHANEL to the more general QUEUE_GET_CHANNEL
      on reviewbord.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 18:54:53 +00:00
Richard Mudgett 0165c5f95a chan_pjsip: Fix deadlock when masquerading PJSIP channels.
Performing a directed call pickup resulted in a deadlock when PJSIP
channels were involved.

A masquerade needs to hold onto the channel locks while it swaps channel
information between the two channels involved in the masquerade.  With
PJSIP channels, the fixup routine needed to push a fixup task onto the
PJSIP channel's serializer.  Unfortunately, if the serializer was also
processing a task that needed to lock the channel, you get deadlock.

* Added a new control frame that is used to notify the channels that a
masquerade is about to start and when it has completed.

* Added the ability to query taskprocessors if the current thread is the
taskprocessor thread.

* Added the ability to suspend/unsuspend the PJSIP serializer thread so a
masquerade could fixup the PJSIP channel without using the serializer.

ASTERISK-24356 #close
Reported by: rmudgett

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

Merged revisions 424471 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424472 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424473 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 17:47:42 +00:00
George Joseph 4967478d18 sorcery: Prevent SEGV in sorcery_wizard_create when there's no create function
When you call ast_sorcery_create() you don't necessarily know which wizard is
going to be invoked.  If it happens to be a wizard like 'config' that doesn't
have a 'create' virtual function you get a segfault in the
sorcery_wizard_create callback.  This patch catches the null function pointer,
does an ast_assert, and logs an error.

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

Merged revisions 424447 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424448 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 15:55:57 +00:00
Kinsey Moore b1f8eba178 PJSIP: Restore functional default for callerid_privacy
The pjsip config option default fixups from r424263 altered the
functional default from "allowed_not_screened" to "allowed". This
change restores the functional default value when none is provided.
........

Merged revisions 424426 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424427 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 13:59:09 +00:00
Kinsey Moore 4246652603 Manager: Add missing fields and documentation for CoreShowChannels
This corrects some issues introduced in the responses to the
CoreShowChannels AMI command as well as adding documentation for the
responses. The command in Asterisk 12 was missing the following fields:
Duration, Application, ApplicationData, and BridgedChannel and
BridgedUniqueID (replaced with BridgeId).

ASTERISK-24262 #close
Reported by: Mitch Claborn
Review: https://reviewboard.asterisk.org/r/4040/
........

Merged revisions 424423 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424424 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-03 13:33:11 +00:00
Richard Mudgett 2b0777c017 res_pjsip: Make transport cipher option accept a comma separated list of cipher names.
Improvements to the res_pjsip transport cipher option.

* Made the cipher option accept a comma separated list of OpenSSL cipher
names.  Users of realtime will be glad if they have more than one name to
list.

* Added the CLI command 'pjsip list ciphers' so a user can know what
OpenSSL names are available for the cipher option.

* Updated the cipher option online XML documentation to specify what is
expected for the value.

* Updated pjsip.conf.sample to not indicate that ALL is acceptable since
ALL does not imply a preference order for the ciphers and PJSIP does not
simply pass the string to OpenSSL for interpretation.

ASTERISK-24199 #close
Reported by: Joshua Colp

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

Merged revisions 424393 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424394 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 21:55:37 +00:00
Jonathan Rose b15cd42b5b Alembic: Add enumerator value to sippeers -> directmedia - 'outgoing'
The 'outgoing' value was left off of the enumerator when first creating the
column. This patch adds it, and should gracefully upgrade keeping the existing
data in tact.

ASTERISK-23781 #close
Reported by: Stephen More
Review: https://reviewboard.asterisk.org/r/4013/
........

Merged revisions 424372 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424373 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424380 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 20:23:38 +00:00
Jonathan Rose 2f570094b7 chan_pjsip: Fix an assertion for channels that lack formats on creation
ASTERISK-24222 #close
Reported by: Mark Michelson
Review: https://reviewboard.asterisk.org/r/4017/
........

Merged revisions 424333 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 15:33:50 +00:00
Scott Griepentrog aa5458d6ab res_pjsip: document use of rewrite_contact in sample conf
Without setting rewrite_contact, an invite to an endpoint
behind NAT will not reach it - unless the endpoint itself
uses STUN or TURN to discover it's public URI.  Thus, the
use of this should be in the sample documentation.

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

Merged revisions 424337 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424338 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-02 13:36:01 +00:00
Corey Farrell a752ca00bd res_hep: Release allocation reference to configuration.
ASTERISK-24362 #close
Reported by: Corey Farrell
Review: https://reviewboard.asterisk.org/r/4026/
........

Merged revisions 424312 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424313 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 20:37:31 +00:00
Joshua Colp adba2a8d7f res_pjsip: Add 'dtls_fingerprint' option to configure DTLS fingerprint hash.
During the latest update to DTLS-SRTP support the ability to configure
the hash used for fingerprints was added. This gave us two supported ones:
SHA-1 and SHA-256. The default was accordingly updated to SHA-256.
Unfortunately this configuration ability was not exposed within res_pjsip.
This change adds a dtls_fingerprint option that controls it.

#SIPit31
........

Merged revisions 424290 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424291 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424292 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 16:39:45 +00:00
Joshua Colp 9233b1cf44 res_pjsip_sdp_rtp: Accept DTLS attributes in top level, not just media session.
#SIPit31
........

Merged revisions 424287 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424288 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424289 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 16:20:40 +00:00
Kinsey Moore 4d2c7c23f8 PJSIP: Handle defaults properly
This updates the code behind PJSIP configuration options with custom
handlers to deal with the assigned default values properly where it
makes sense and adjusting the default value where it doesn't. Before
applying this patch, there were several cases where the default value
for an option would prevent that config section from loading properly.

Reported by: Thomas Thompson
Review: https://reviewboard.asterisk.org/r/4019/
........

Merged revisions 424263 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424266 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 12:28:05 +00:00
Kinsey Moore 122cc050d0 PJSIP: Force transport on contact rewrite
If contact rewriting is enabled but the contact differs in transport
from what is actually being used, messages after the initial INVITE
transaction can be sent to an incorrect transport/port combination. In
the case where this bug occurred the remote party never received a BYE
since it was sent to the remote party's TCP port over UDP.

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

Merged revisions 424244 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424245 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424246 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 12:15:56 +00:00
Walter Doekes c3a7524457 chan_sip: Simplify some unref code by removing unlink_peer_from_tables.
ASTERISK-22945 #related
Reported by: ibercom
Patches:
  asterisk11-chan_sip-simplifies.patch uploaded by ibercom (License #6599)
........

Merged revisions 424181 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 424182 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424183 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424184 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424185 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 10:10:41 +00:00
Walter Doekes 841d978a30 chan_sip: Remove excess ref of realtime peer before sip_poke_peer.
The peer is referenced at the end of sip_poke_peer, it should not get
an extra ref before the call to sip_poke_peer. This fixes a memory
leak.

ASTERISK-22945 #close
Reported by: ibercom
Tested by: Yuriy Gorlichenko
Patches:
  asterisk11.patch uploaded by ibercom (License #6599)

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

Merged revisions 424176 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 424177 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424178 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424179 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-01 09:55:10 +00:00
Joshua Colp d7c29885ad res_pjsip_sdp_rtp: Don't place an extra whitespace before 'rport' and don't put IPv6 addresses in brackets.
#SIPit31
........

Merged revisions 424155 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424156 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424157 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-30 11:42:00 +00:00
Joshua Colp 3641ebcf96 res_rtp_asterisk: Ensure that the base and mapped address for candidates is present in SDP.
This change fixes an issue where ICE candidates put into the SDP did not contain
the 'raddr' and 'rport' information for server reflexive and relay candidates.

#SIPit31
........

Merged revisions 424151 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 424152 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424153 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-30 11:36:14 +00:00
George Joseph 27396a6b59 pjsip_cli: Suppress header print on error or no objects
If there's an error on the pjsip command line or there are no objects, don't
print the column headers.

ASTERISK-24350 #close
Reported-by: Brad Latus
Tested-by: George Joseph
Tested-by: Brad Latus

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

Merged revisions 424128 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 424129 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-09-29 22:00:38 +00:00