Commit Graph

24867 Commits

Author SHA1 Message Date
Joshua Colp
d904906a1a Revert revision 403304: Fixed the filename for the ari.conf docs
The changed value refers to the name of the module. The name of the
configuration file is specified in the configFile section.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403310 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-03 16:32:12 +00:00
David M. Lee
1a940480b5 Fixed the filename for the ari.conf docs
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 18:34:50 +00:00
Alexandr Anikin
d80611a52e remove unwanted property svn:mergeinfo
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403291 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 18:03:15 +00:00
Alexandr Anikin
c90c183e92 Check and reject non-digits e164 values on peers and general sections in ooh323.conf
Regenerate e164 endpoint list on reload ooh323
(issue ASTERISK-22901)
Reported by: Cyril CONSTANTIN
Patches:
	ASTERISK-22901.patch
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-02 17:58:33 +00:00
Joshua Colp
7026284b5a res_pjsip_session: Apply fromuser and fromdomain to all requests as documented.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 21:12:37 +00:00
Joshua Colp
fb7c0d5ecc res_pjsip_t38: Add the framehook to the channel only on first INVITE.
The check for determining whether the T.38 framehook should be added to
the channel or not has now been changed to guarantee adding only occurs
on the first incoming or outgoing INVITE.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 20:04:02 +00:00
Joshua Colp
e0cfdf5655 res_pjsip_transport_websocket: Fix security events and simplify implementation.
Transport type determination for security events has been simplified to use
the type present on the message itself instead of searching through configured
transports to find the transport used.

The actual WebSocket transport has also been simplified. It now leverages the
existing PJSIP transport manager for finding the active WebSocket transport
for outgoing messages. This removes the need for res_pjsip_transport_websocket
to store a mapping itself.

(closes issue ASTERISK-22897)
Reported by: Max E. Reyes Vera J.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403256 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-01 19:56:38 +00:00
Joshua Colp
021f49bad7 res_ari: Add Recording events to the validator.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403240 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-30 14:11:55 +00:00
Joshua Colp
e9a5c707d6 res_pjsip_sdp_rtp: Don't produce an invalid media stream with no formats.
Depending on configuration it was possible for a media stream to be
created without any media formats. The produced SDP would fail internal
validation and cause a crash.

The code will now no longer add media streams with no formats to the SDP,
allowing it to pass validation and work.

(closes issue ASTERISK-22858)
Reported by: Anthony Messina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 02:12:04 +00:00
Joshua Colp
457ddd6cc1 res_pjsip_header_funcs: Don't add headers to re-INVITEs.
When sending a re-INVITE to an endpoint it was possible for received
headers to be added as well (since they are stored for retrieval using
the PJSIP_HEADER dialplan function). This caused a broken (and
potentially large) SIP INVITE to be produced and sent.

This changes the module so it will no longer add headers to
re-INVITEs.

(closes issue ASTERISK-22882)
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 01:56:02 +00:00
Joshua Colp
54523ed21e res_stasis_playback: Add 'number', 'digits', and 'characters' URI scheme implementations.
This change adds new URI scheme implementations for playing numbers, digits,
and characters. This is done as part of the normal playback mechanism and can
be used with queueing to create a combined sentence.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:53:43 +00:00
Joshua Colp
4a9e6d06a7 res_pjsip_session: Add configurable behavior for redirects.
The action taken when a redirect occurs is now configurable on a
per-endpoint basis. The redirect can either be treated as a redirect
to a local extension, to a URI that is dialed through the Asterisk
core, or to a URI that is dialed within PJSIP itself.

(closes issue ASTERISK-21710)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-28 00:36:53 +00:00
Joshua Colp
c40e808b14 res_pjsip: Fix crash when reloading certain configurations.
Certain options available that specify a SIP URI perform validation
on the provided URI using the PJSIP URI parser. This operation
requires that the thread executing it be registered with the PJLIB
library. During reloads this was done on a thread which was NOT
registered with it.

This fixes the problem by creating a task which reloads the
configuration on a PJSIP thread.

(closes issue ASTERISK-22923)
Reported by: Anthony Messina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403179 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 16:09:48 +00:00
David M. Lee
094c5e2cca ari:Add application/json parameter support
The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).

For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.

The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.

(closes issue ASTERISK-22685)
Review: https://reviewboard.asterisk.org/r/2994/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403175 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 15:36:16 +00:00
Joshua Colp
5537def54d res_pjsip: Update handling of some options to work with new option names.
Some options (such as call_group and pickup_group) share the same configuration
handler and decide what logic to use based on the name of the option. These
handlers were not updated to check for the new option names and were treating
the options as invalid.

This change simply updates the handlers with the proper names of the options.

(closes issue ASTERISK-22922)
Reported by: Anthony Messina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 15:31:05 +00:00
Joshua Colp
9a2df36dd4 Fix a configure issue with PJSIP transaction group lock detection.
The configure check did not use the provided paths for pjproject
if provided when looking for transaction group lock support.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-26 22:33:19 +00:00
Kevin Harwell
99d5cb8555 ARI: Implement device state API
Created a data model and implemented functionality for an ARI device state
resource.  The following operations have been added that allow a user to
manipulate an ARI controlled device:

Create/Change the state of an ARI controlled device
PUT    /deviceStates/{deviceName}&{deviceState}

Retrieve all ARI controlled devices
GET    /deviceStates

Retrieve the current state of a device
GET    /deviceStates/{deviceName}

Destroy a device-state controlled by ARI
DELETE /deviceStates/{deviceName}

The ARI controlled device must begin with 'Stasis:'.  An example controlled
device name would be Stasis:Example.  A 'DeviceStateChanged' event has also
been added so that an application can subscribe and receive device change
events.  Any device state, ARI controlled or not, can be subscribed to.

While adding the event, the underlying subscription control mechanism was
refactored so that all current and future resource subscriptions would be
the same.  Each event resource must now register itself in order to be able
to properly handle [un]subscribes.

(issue ASTERISK-22838)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/3025/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403134 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 17:38:29 +00:00
Kevin Harwell
24568ea6c9 res_pjsip: AMI commands and events.
Created the following AMI commands and corresponding events for res_pjsip:

PJSIPShowEndpoints - Provides a listing of all pjsip endpoints and a few
                     select attributes on each.
  Events:
    EndpointList - for each endpoint a few attributes.
    EndpointlistComplete - after all endpoints have been listed.

PJSIPShowEndpoint - Provides a detail list of attributes for a specified
                    endpoint.
  Events:
    EndpointDetail - attributes on an endpoint.
    AorDetail - raised for each AOR on an endpoint.
    AuthDetail - raised for each associated inbound and outbound auth
    TransportDetail - transport attributes.
    IdentifyDetail - attributes for the identify object associated with
                     the endpoint.
    EndpointDetailComplete - last event raised after all detail events.

PJSIPShowRegistrationsInbound - Provides a detail listing of all inbound
                                registrations.
  Events:
    InboundRegistrationDetail - inbound registration attributes for each
                                registration.
    InboundRegistrationDetailComplete - raised after all detail records have
                                been listed.

PJSIPShowRegistrationsOutbound  - Provides a detail listing of all outbound
                                  registrations.
  Events:
    OutboundRegistrationDetail - outbound registration attributes for each
                                 registration.
    OutboundRegistrationDetailComplete - raised after all detail records
                                 have been listed.

PJSIPShowSubscriptionsInbound - A detail listing of all inbound subscriptions
                                and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

PJSIPShowSubscriptionsOutbound - A detail listing of all outboundbound
                                subscriptions and their attributes.
  Events:
    SubscriptionDetail - on each subscription detailed attributes
    SubscriptionDetailComplete - raised after all detail records have
                                 been listed.

(issue ASTERISK-22609)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2959/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 17:14:22 +00:00
Joshua Colp
22f800d14e ari: Add events for playback and recording.
While there were events defined for playback and recording
these were not actually sent. This change implements the
to_json handlers which produces them.

(closes issue ASTERISK-22710)
Reported by: Jonathan Rose

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 12:51:31 +00:00
Joshua Colp
60e700565a ari: Add Snoop operation for spying/whispering on channels.
The Snoop operation can be invoked on a channel to spy or
whisper on it. It returns a channel that any channel operations
can then be invoked on (such as record to do monitoring).

(closes issue ASTERISK-22780)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403117 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-23 12:38:04 +00:00
Kinsey Moore
10381f238a Make sure unit tests compile
This fixes the unit tests that were broken by r403069 and several
functions requiring a new parameter for sanitization of JSON messages
generated from object snapshots.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 23:44:39 +00:00
Kevin Harwell
1222501fcf res_pjsip: convert configuration settings names to snake case some more
Updated the alembic script for pjsip.  Also, the dtls config parsing stuff was
expecting strings with no underscores, so removed the underscores from the
option name before passing it to the parser.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 22:24:43 +00:00
Kinsey Moore
0045449943 ARI: Don't leak implementation details
This change prevents channels used as implementation details from
leaking out to ARI. It does this by preventing creation of JSON blobs
of channel snapshots created from those channels and sanitizing JSON
blobs of bridge snapshots as they are created. This introduces a
framework for excluding information from output targeted at Stasis
applications on a consumer-by-consumer basis using channel sanitization
callbacks which could be extended to bridges or endpoints if necessary.

This prevents unhelpful error messages from being generated by
ast_json_pack.

This also corrects a bug where BridgeCreated events would not be
created.

(closes issue ASTERISK-22744)
Review: https://reviewboard.asterisk.org/r/2987/
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403069 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 20:01:26 +00:00
Kevin Harwell
1ac597135a res_pjsip: convert configuration settings names to snake case
Renamed, where appropriate, the configuration options for chan/res_pjsip to use
snake case (compound words separated by an underscore).  For example, faxdetect
will become fax_detect, recordofffeature will become record_off_feature, etc...

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 17:19:18 +00:00
Joshua Colp
58059314cd translate: Move freeing of frame to after it is used.
When translating from one format to another it is possible
to inform the translation function that the source frame should
be freed. This was previously done immediately but shortly
afterwards the frame that was freed was accessed and used again.

This change moves code around a bit so that the frame is now
freed after it has been completely used.

(closes issue ASTERISK-22788)
Reported by: Corey Farrell
Patches:
	translate-access-after-free-11up.patch uploaded by coreyfarrell (license 5909)
	translate-access-after-free-1.8.patch uploaded by coreyfarrell (license 5909)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@403016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-22 17:11:46 +00:00
David M. Lee
5d515b50a6 ari: Fix #include to match generated headers for snakeCase resource files
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402993 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 22:35:44 +00:00
David M. Lee
4f346b155c ari: Fix generators for resources with camelCase names.
For the new deviceState resource, we need to properly generate
device_state.[ch] files.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 21:21:43 +00:00
Matthew Jordan
32c6a4b5db res_pjsip_session: Fix memory leak of direct media format capabilities
The direct media format capabilities are always allocated in
ast_sip_session_alloc and were not freed in the session destructor. Whoops.

(This being the third whoops caught by Scott and Nitesh's valgrind work for
the Asterisk Test Suite. Nifty!)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 19:21:20 +00:00
Richard Mudgett
01c44f6bed voicemail: Fixup some doxygen comments.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402956 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 19:08:40 +00:00
Richard Mudgett
f2d75eb74b bucket: Fix scheme ref leak in __ast_bucket_scheme_register().
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 18:00:39 +00:00
Matthew Jordan
57967ec04a res_pjsip_sdp_rtp: Fix use of uninitialized value in PJSIP
In PJMEDIA, pjmedia_sdp_rtpmap_to_attr will attempt to use the string
rtpmap.param regardless of its length value. Simply setting the length to 0
does not prevent the garbage on the stack in rtpmap.param.ptr from being
formatted in a sprintf call. This patch initializes the string to NULL so that
at the very least, something is provided to the function that is predictable.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 17:52:11 +00:00
Matthew Jordan
ef01e90ecf res_pjsip_mwi: Fix memory leak of MWI subscriptions container
This patch fixes a reference counting memory leak on the ao2_container
created as part of create_mwi_subscriptions. When we create the container
in this routine, the intent is to hand lifetime ownership over to the global
container unsolicited_mwi. When ao2_global_obj_replace_unref is called, the
reference count on mwi_subscriptions (the container) will be bumped by 1;
however, the function does not decrement the reference count on
mwi_subscriptions when this occurs. This will prevent the container from being
fully disposed of when Asterisk exits (or on any subsequent call to this
operation, such as during a reload).



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 17:49:28 +00:00
David M. Lee
4fd244e273 ari: Add silence generator controls
This patch adds the ability to start a silence generator on a channel
via ARI. This generator will play silence on the channel (avoiding audio
timeouts on the peer) until it is stopped, or some other media operation
is started (like playing media, starting music on hold, etc.).

(closes issue ASTERISK-22514)
Review: https://reviewboard.asterisk.org/r/3019/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402926 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 15:55:33 +00:00
Joshua Colp
527a8b08de res_pjsip_caller_id: Don't overwrite user portion of the From header when fromuser is set.
The fromuser option is used to explicitly set the user within the From header. The
res_pjsip_caller_id module did not take this setting into account when determining
if the From header could be modified or not.

(closes issue ASTERISK-22866)
Reported by: Anthony Messina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-19 23:17:18 +00:00
Joshua Colp
18a2f38b76 res_pjsip: Add support for building against pjproject with SIP transaction group lock support.
SIP transaction group lock support has been backported into our pjproject. Since the code
now internally uses a group lock the code is now changed to unlock it if present. Note
that the act of finding the transaction is what actually returns it locked.

For further information about group locks check out the wiki page at:
http://trac.pjsip.org/repos/wiki/Group_Lock

(issue ASTERISK-22818)
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-16 13:44:47 +00:00
Kinsey Moore
b72cc1c96f CEL: Fix crash when using CELGenUserEvent
This fixes a crash when CELGenUserEvent is called from the dialplan
while CEL is disabled. Currently, CEL does not create its topics and
forwards if it is not enabled and external entities may depend on
these topics blindly since they should always be available. This patch
breaks up route creation and topic/forward creation such that the CEL
topics and forwards will always exist while the router and its
associated routes will be torn down and recreated as necessary.

(closes issue ASTERISK-22799)
Review: https://reviewboard.asterisk.org/r/3010/
Reported by: Matt Jordan


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402838 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-15 14:35:58 +00:00
David M. Lee
13ce1cee50 stasis: Fixed scoping problem with bridge tracking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-14 15:01:51 +00:00
Joshua Colp
0f7db6c413 res_ari_channels: Add the ability to stop locally generated ringing on a channel.
Using the 'ring' operation it is possible to start locally generated ringback if
the channel is answered. This change adds the ability to stop it by using DELETE.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-13 23:09:38 +00:00
Kevin Harwell
129cd55355 ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
Was returning a 404 on a valid technology with an empty list of endpoints.
Now checking against the channel tech to make sure the tech itself is valid
and not just an empty list of endpoints.

(issue ASTERISK-22803)
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 23:16:58 +00:00
Kevin Harwell
59dc668622 ari endpoints: GET /ari/endpoints/{invalid-tech} should return a 404
Implementation listing endpoints by technology returned an empty array if no
matching endpoints were found.  Fixed so a "404 Not Found" will be returned
instead.

(closes issue ASTERISK-22803)
Reported by: David M. Lee


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 22:15:41 +00:00
Mark Michelson
68d09e0bf1 Switch to a scoped lock to avoid missing unlocks in failure returns.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402769 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 19:11:28 +00:00
Mark Michelson
15feef01a0 Move a NULL check to a place that makes more sense.
Two variables were being checked for NULLity immediately
after being declared NULL. I moved the NULL check until
after the variables are allocated.

This allows for the "channelvars" option in manager.conf
to work as intended again.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 19:05:44 +00:00
Kevin Harwell
1d6201ab9c pjsip_messaging, pjsip_header_funcs: Crashes due to NULL pointer dereferences
Both res_pjsip_messaging and res_pjsip_header_funcs were causing asterisk to
crash because they were trying to dereference a NULL pointer.

In the case of res_pjsip_messaging it was attempting to "print" a contact
header that did not exist.  In fact contact headers should not be part of
a SIP MESSAGE, so the offending code was simply removed.

In the case of res_pjsip_header_funcs a null private channel tech was being
passed to the function and then later dereferenced.  Added null checks (and
error logging) to the read/write function handlers to guard against crashing.

(closes issue ASTERISK-22821)
Reported by: Anthony Messina


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402757 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 16:45:42 +00:00
Kinsey Moore
22801822bc CELGenUserEvent: Fix error message from ast_json_pack
This prevents NULL from being passed into an ast_json_pack call when no
extra information is passed to the application which prevents an error
message about NULL arguments from being generated.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402755 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 16:33:24 +00:00
David M. Lee
1432a9d59d Fixed a typ.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 15:26:26 +00:00
Kinsey Moore
192732b83d chan_dahdi: Fix crash during caller ID read
Asterisk will sometimes core dump during caller id read on analog
channels due to a negative return value from the read() in
my_get_callerid that slips through as a negative length argument to
callerid_feed() if the errno returned by DAHDI is ELAST. This change
ensures that the negative return is treated properly even when it is
ELAST.

(closes issue ASTERISK-22746)
Reported by: Michael Walton
Patches:
    chan_dahdi_cid_crash_fix.r401410.patch uploaded by Michael Walton (License 6502)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402710 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-12 15:02:18 +00:00
Mark Michelson
8d1527fd7a Get rid of some inaccurate comments.
I'm doing some unrelated work in app_confbridge and finding
these "invalid pin" comments to be annoying. Get out!
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402687 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 19:26:48 +00:00
Kinsey Moore
33a9e71b7e app_queue: Honor penalty limits of 0
In the current app_queue code from 1.8 up to trunk the upper and lower
penalties can be set to 0 but the value is interpreted to be disabled
instead of actually setting limits. This is especially evident if min
and max limits are set to 0 and members with penalties of 0 and 1 are
in the queue since the member with penalty 1 will still receive calls.
This patch adjusts the special disabled value to be INT_MAX instead of
0.

(closes issue ASTERISK-20862)
Review: https://reviewboard.asterisk.org/r/2995/
Reported by: Schmooze Com
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-11 15:36:23 +00:00
Scott Griepentrog
96048afd61 chan_sip: keep same local (from) tag for outgoing register requests
For outbound register requests the tag on the From line was
updated every 20 seconds prior to a successful registration
and also once for each registration renewal.  That behavior
can possibly cause the registration to be denied because of
the different tag, and is not aligned with the intention of
RFC 3261 8.1.3.5 "... request constitutes a new transaction
and SHOULD have the same value of the Call-ID, To, and From
of the previous request...".  This updates chan_sip to have
a field to keep the local tag in the registration structure
and use that tag for registration requests where the callid
is also unchanged.

(closes issue ASTERISK-12117)
Reported by: Pawel Pierscionek
Review: https://reviewboard.asterisk.org/r/2988/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402606 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 23:04:03 +00:00
Richard Mudgett
82c2db6592 res_stasis.c: Fix locking issues with the app_bridge_moh container.
* Fix unlinking from the app_bridges_moh container in remove_bridge_moh()
without a lock under normal circumstances.

* Made check ast_bridge_set_after_callback() return value in
bridge_moh_create() to handle failure.

* Fixed SCOPED_AO2LOCK() locking over too much scope in
stasis_app_bridge_moh_channel() and stasis_app_bridge_moh_stop().

* Fixed unusual usage of ao2_unlink_flag() in control_unlink().

* Fixed orphaned bridge from off nominal path in
stasis_app_bridge_create().

* Fixed strange construct in stasis_app_unsubscribe().  From a bad merge?

* Made load_module() cleanup on failure.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 20:20:27 +00:00