Commit Graph

25390 Commits

Author SHA1 Message Date
Jonathan Rose
005591423c PJSIP: Backport r405270 - Unhold on reinvite without SDP
Adds behavior to unhold on a reinvite without an SDP section
Review: https://reviewboard.asterisk.org/r/3106/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 17:09:11 +00:00
Kinsey Moore
e4a177b2a3 res_pjsip: Fix CLI tab completion issues
This fixes several issues with the new res_pjsip CLI tab completion
such as output of headers during tab completion and being able to 
tab-complete more items than the code actually handled (further items
would simply be ignored).

(closes issue ASTERISK-23081)
Review: https://reviewboard.asterisk.org/r/3115/
Reported by: xrobau


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405338 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-13 13:28:55 +00:00
Joshua Colp
0cafdf6e26 res_ari: Fix various memory leaks.
This change fixes a few memory leaks that were found based
on a mailing list post.

1. Some JSON response messages were never freed. This was
caused by the documentation stating that message references
were stolen when in reality they were not. The code now follows
the documentation and usage has been updated.

2. HTTP response headers were never freed.

3. The variable list for wildcards paths was never freed.

(closes issue ASTERISK-23128)
Reported by: Kenneth Watson (on list)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 22:23:12 +00:00
Matthew Jordan
bf63402b99 CDRs: Synchronize dialplan applications that manipulate CDRs with the engine
In https://reviewboard.asterisk.org/r/3057/, applications and functions that
manipulate CDRs were made to interact over Stasis. This was done to
synchronize manipulations of CDRs from the dialplan with the updates the
engine itself receives over the message bus.

This change rested on a faulty premise: that messages published to the CDR
topic or to a topic that forwards to the CDR topic are synchronized with the
messages handled by the CDR topic subscription in the CDR engine. This is not
the case. There is no ordering guaranteed for two messages published to the
same topic; ordering is only guaranteed if a message is published to the same
subscriber.

Stasis was modified in r405311 to allow a publisher to synchronize on the
subscriber. This patch uses that API to synchronize the CDR publishers with
the CDR engine message router, which maintains the overall topic subscription.

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

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 21:58:32 +00:00
Matthew Jordan
dde2d41715 stasis: Add methods to allow for synchronous publishing to subscriber
This patch adds an API call to Stasis that allows a publisher to publish a
stasis message that will not return until a specific subscriber handles the
message. Since a subscriber can have their own forwarding topic which orders
messages from many topics, this allows a publisher who knows of that subscriber
to synchronize to that subscriber regardless of the forwarding relationships
between topics.

This is of particular use for dialplan applications that need to synchronize
on a particular subscriber's handling of a message.

(issue ASTERISK-22884)
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 21:55:11 +00:00
Mark Michelson
08e624708d Print "<unknown>" for artificial endpoint in PJSIP security events.
Previously, this printed a UUID, which was not very clear when dealing
with an artificial endpoint.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10 19:39:23 +00:00
Richard Mudgett
eeb41848e0 Logging callid: Fix some sizeof() references per coding guidelines.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405282 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-10 18:00:47 +00:00
Damien Wedhorn
68463c28c4 Fix chan_dahdi copile issue in dev-mode.
Error "unused variable i in dahdi_create_channel_range" when compiling
in dev-mode. Small restructure to dahdi_create_channel_range to move 
the for(x) loop and int i,x to a block within the IFDEF.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 23:45:20 +00:00
Kevin Harwell
b2409f9458 res_pjsip_messaging: potential for field values in from/to headers to be missing
Added in ability to specify display name format ("name" <sip:name@ipaddr:port>)
for a given URI and made sure it was fully propagated to the outgoing message.
Also made it so outoing messages in res_pjsip always send as "sip:".

(closes issue ASTERISK-22924)
Reported by: Anthony Messina
Review: https://reviewboard.asterisk.org/r/3094/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405266 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 23:36:24 +00:00
Kinsey Moore
d7f5a0be5d astobj2: Correct ao2_iterator opacity violations
This corrects the ao2_iterator opacity violations in
res_pjsip_session.c by adding a global function to get the number of
elements inside the container hidden behind the iterator.

(closes issue ASTERISK-23053)
Review: https://reviewboard.asterisk.org/r/3111/
Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 20:25:24 +00:00
Kevin Harwell
a4d8398013 res_rtp_asterisk: Fails to resume WebRTC call from hold
In ast_rtp_ice_start if the ice session create check list failed, start check
was never initiated and ice_started was never set to true.  Upon re-entering
the function (for instance, [un]hold) it would try to create the check list
again with duplicate remote candidates.

Fixed so that if the create check list fails the necessary data structures
are properly re-initialized for any subsequent retries.

Note, it was decided to not stop ice support (by calling ast_rtp_ice_stop) on a
check list failure because it possible things might still work.  However, a
debug message was added to help with any future troubleshooting.

(closes issue ASTERISK-22911)
Reported by: Vytis Valentinavičius
Patches:
     works_on_my_machine.patch uploaded by xytis (license 6558)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 16:51:19 +00:00
Matthew Jordan
c8ed6fc892 app_confbridge: Fix crash caused when waitmarked/marked users leave together
When waitmarked users join a ConfBridge, the conference state is transitioned
from EMPTY -> INACTIVE. In this state, the users are maintined in a waiting
users list. When a marked user joins, the ConfBridge conference transitions
from INACTIVE -> MULTI_MARKED, and all users are put onto the active list of
users. This process works correctly.

When the marked user leaves, if they are the last marked user, the MULTI_MARKED
state does the following:
(1) It plays back a message to the bridge stating that the leader has left the
    conference. This requires an unlocking of the bridge.
(2) It moves waitmarked users back to the waiting list
(3) It transitions to the appropriate state: in this case, INACTIVE

However, because it plays the prompt back to the bridge before moving the users
and before finishing the state transition, this creates a race condition: with
the bridge unlocked, waitmarked users who leave the conference (or are kicked
from it) can cause a state transition of the bridge to another state before
the conference is transitioned to the INACTIVE state. This causes the state
machine to get a bit wonky, often leading to a crash when the MULTI_MARKED state
attempts to conclude its processing.

This patch fixes this problem:
(1) It prevents kicked users from being kicked again. That's just a nicety.
(2) More importantly, it fixes the race condition by only playing the prompt
    once the state has transitioned correctly to INACTIVE. If waitmarked users
    sneak out during the prompt being played, no harm no foul.

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

Note that the patch committed here is essentially the same as uploaded by
Simon Moxon on ASTERISK-22740, with the addition of the double kick prevention.

(closes issue AST-1258)
Reported by: Steve Pitts

(closes issue ASTERISK-22740)
Reported by: Simon Moxon
patches:
  ASTERISK-22740.diff uploaded by Simon Moxon (license 6546)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 15:49:40 +00:00
Walter Doekes
8c61a2a873 "Minimun" typo.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-09 14:14:13 +00:00
Mark Michelson
aa3835f397 Use proper case for checking if digest authentication is used.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:48:12 +00:00
Kinsey Moore
678bebb459 pbx_lua: Add support for Lua 5.2
This adds support for Lua 5.2 in pbx_lua which is available on newer
operating systems.

(closes issue ASTERISK-23011)
Review: https://reviewboard.asterisk.org/r/3075/
Reported by: George Joseph
Patch by: George Joseph
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405124 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-08 16:28:36 +00:00
Kinsey Moore
9e553991b1 Add the missing part of r400140
When the patch to add retry-on-forbidden-response was committed, part
of the patch for chan_sip was not committed which caused the feature to
be entirely nonfunctional. This corrects the code in question.

(closes issue ASTERISK-17138)
Review: https://reviewboard.asterisk.org/r/2874
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 21:19:22 +00:00
Joshua Colp
20e8368203 res_pjsip_acl: Fix another case of assuming a contact will always contain a URI.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405034 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 19:55:05 +00:00
Joshua Colp
5043f3bab1 res_pjsip_nat: Don't assume a Contact header will always contain a URI.
If the 'rewrite_contact' option was enabled and a Contact header was received
which contained a '*' a crash would occur.

This change makes the res_pjsip_nat module ignore the Contact header if it
contains only a '*'.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-07 14:55:26 +00:00
Richard Mudgett
5a3bc1609e app_voicemail: Explicitly set defaultenabled=yes
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@405006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 21:54:23 +00:00
Richard Mudgett
096974809f External MWI AMI support.
The external MWI AMI interface provides a thin wrapper around the core
external MWI resource.

The resource adds the following AMI actions:
MWIGet,
MWIDelete, and
MWIUpdate.

(closes issue AFS-46)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:48:14 +00:00
Richard Mudgett
f9f467b142 External MWI core support.
* The core external MWI resource provides for MWI message counts
persistence using sorcery.  With sorcery, the user is able to configure
which sorcery wizzard backend to use if the default astdb is not desired.

* The core external MWI resoruce provides some debugging CLI commands
enabled by defining MWI_DEBUG_CLI.

The debugging CLI commands are:
"mwi delete all",
"mwi delete like <regex>",
"mwi delete mailbox <mailbox>",
"mwi list all",
"mwi list like <regex>",
"mwi show mailbox <mailbox>", and
"mwi update mailbox <mailbox> [<new> [<old>]]".

(closes issue AFS-43)

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-06 17:43:32 +00:00
Joshua Colp
92caf5de28 res_pjsip_outbound_registration: Don't assume that a registration client will always exist.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-05 16:00:13 +00:00
Joshua Colp
87667af671 res_pjsip_outbound_registration: Create registration client in pj thread.
Depending on which threading was loading the outbound registration it was
possible for the registration client to be allocated outside of a pj thread.
This change moves the creation inside the synchronous task where it is
guaranteed it will occur in a pj thread.

Reported by: Rob Thomas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-05 01:29:56 +00:00
Tzafrir Cohen
1dee7855c3 asterisk.c: suppress live_dangerously warning on rasterisk
Even since the fixes of AST-2013-007, Asterisk prints the following
warning on startup if the user decided to live dangerously:

  Privilege escalation protection disabled!
  See https://wiki.asterisk.org/wiki/x/1gKfAQ for more details.

This message is intended for the logs and interactive startup. No need
for it to appear on a remote console. This commit removes it from there.

(closes issue ASTERISK-23084)
Review: https://reviewboard.asterisk.org/r/3101/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404911 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-04 10:42:18 +00:00
Kevin Harwell
d59759cf6a cel_pgsql: module not correctly reloading
Upon reload the module unconditionally "unloaded" the module (freeing memory
and setting pointers to NULL) and then when attempting a "load" if the config
file had not changed then nothing would be reinitialized.

By moving the "unload" to occur conditionally (reload only) after an attempted
configuration load, but before module "loading" alleviates the issue. The module
now loads/unloads/reloads correctly.

(closes issue ASTERISK-22871)
Reported by: Matteo
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404859 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 21:59:37 +00:00
Matthew Jordan
97985656e5 res_pjsip_logger: Add the ASTERISK_FILE_VERSION macro
Registering yourself with the Asterisk core is the nice thing to do, even
when you're a logging module.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 21:45:08 +00:00
Matthew Jordan
2f51fdb027 res_pjsip_authenticator_digest: Fix md5 hash buffer
An md5 hash is 32 bytes long. The char buffer must be at least 33 bytes to
avoid clobbering of the stack. This patch also fixes a potential clobbering
in test_utils.c.

Thanks to Andrew Nagy for reporting and testing this out in #asterisk-dev

Reported by: Andrew Nagy
Tested by: Andrew Nagy



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 21:09:59 +00:00
Kevin Harwell
923d05dbc2 chan_dahdi: dahdi show channels slices PRI channel dnid on output
dahdi show channels output slices the callerid (which is dnid copied over on
PRI channels). If the channel naming structures look like:

 'DAHDI/i1/1408409XXXX-6'

then the output slices 1408409XXXX down to 1408409XXX. This patch just opens
it up to 15 chars so you can see the whole thing.

(closes issue ASTERISK-22918)
Reported by: outtolunc
Patches:
     svn_chan_dahdi.c.format12_15.diff.txt uploaded by outtolunc (license 5198)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 19:00:32 +00:00
Kevin Harwell
b2db8672c5 app_meetme: compiler warning
Fixed a compiler warning (errors in 'dev-mode') given by gcc version 4.8.1.
The one in app_meetme involved the 'sizeof-pointer-memaccess'
(see: http://gcc.gnu.org/gcc-4.8/porting_to.html) warning. Fixed so
it would no longer issue a warning and can compile again in 'dev-mode'.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 18:29:46 +00:00
Richard Mudgett
f82bd54595 test_stasis.c: Fix ref leak in normal execution path.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 18:24:57 +00:00
Joshua Colp
68ecb5a171 res_pjsip: Ensure more URI validation happens in pj threads.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 17:25:46 +00:00
Joshua Colp
b5d88eecd4 res_pjsip_outbound_registration: Ensure URI validation happens in a pjlib thread.
This change moves outbound registration URI validation into the task executed
within a pjlib thread.

Reported by: Andrew Nagy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-03 17:09:17 +00:00
Scott Griepentrog
037620898a func_strings: use memmove to prevent overlapping memory on strcpy
When calling REPLACE() with an empty replace-char argument, strcpy
is used to overwrite the the matching <find-char>.  However as the
src and dest arguments to strcpy must not overlap, it causes other
parts of the string to be overwritten with adjacent characters and
the result is mangled.  Patch replaces call to strcpy with memmove
and adds a test suite case for REPLACE.

(closes issue ASTERISK-22910)
Reported by: Gareth Palmer
Review: https://reviewboard.asterisk.org/r/3083/
Patches:
    func_strings.patch uploaded by Gareth Palmer (license 5169)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404676 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-02 19:37:16 +00:00
Kevin Harwell
e99940111c res_pjsip: add 'set_var' support on endpoints
Added a new 'set_var' option for ast_sip_endpoint(s).  For each variable
specified that variable gets set upon creation of a pjsip channel involving
the endpoint.

(closes issue ASTERISK-22868)
Reported by: Joshua Colp
Review: https://reviewboard.asterisk.org/r/3095/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-02 19:06:28 +00:00
Joshua Colp
0c4b1ca477 chan_pjsip: Handle hanging up before calling.
Channel creation in Asterisk is broken up into two steps: requesting and calling.
In some cases a channel may be requested but never called. This happens in the
ChanIsAvail dialplan application for determining if something is reachable or
not. The PJSIP channel driver did not take this situation into account and
attempted to end a session that was never called out on.

The code now checks the session state to determine if the session has been
called out on and if not terminates it instead of ending it.

(closes issue ASTERISK-23074)
Reported by: Kilburn


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31 22:49:36 +00:00
Joshua Colp
2bca5b5285 res_pjsip_endpoint_identifier_ip: Accept hostnames in the 'match' field.
Hostnames specified in the 'match' field will be resolved and all addresses
returned. Each address will be added to the endpoint identifier for the
matching process.

Reported by: Rob Thomas


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31 22:19:03 +00:00
Kevin Harwell
cbe6ec4a63 cel_pgsql: deadlock on unload and core_event_dispatcher
A deadlock can happen between a thread unloading or reloading the cel_pgsql
module and the core_event_dispatcher taskprocessor thread. Description of
what is happening:

Thread 1 (for example, a netconsole thread):

    a "module reload cel_pgsql" is launched
    the thread enter the "my_unload_module" function (cel_pgsql.c)
    the thread acquire the write lock on psql_columns
    the thread enter the "ast_event_unsubscribe" function (event.c)
    the thread try to acquire the write lock on ast_event_subs[sub->type]

Thread 2 (core_event_dispatcher taskprocessor thread):

    the taskprocessor pop a CEL event
    the thread enter the "handle_event" function (event.c)
    the thread acquire the read lock on ast_event_subs[sub->type]
    the thread callback the "pgsql_log" function (cel_pgsql.c), since it's a subscriber of CEL events
    the thread try to acquire a read lock on psql_columns

(closes issue ASTERISK-22854)
Reported by: Etienne Lessard
Patches:
     cel_pgsql_fix_deadlock_event.patch uploaded by hexanol (license 6394)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404605 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31 21:38:48 +00:00
Joshua Colp
1b885946c1 res_pjsip_outbound_registration: Add validation for 'server_uri' and 'client_uri'.
When applying configuration for outbound registrations the 'server_uri' and
'client_uri' fields were not validated. The code will now confirm that they
exist and that they contain parseable SIP URIs.

Reported by: Andrew Nagy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-31 20:26:12 +00:00
Kevin Harwell
a64380721d channels.c: core show channeltypes slicing
'core show channeltypes' type column is being sliced, resulting in incomplete
type names.

(closes issue ASTERISK-22919)
Reported by: outtolunc
Patches:
     svn_channel.c.format_15.diff.txt uploaded by outtolunc (license 5198)
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404581 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-30 23:21:56 +00:00
David M. Lee
8d18c1c7f7 Added note to UPGRADE.txt about the default value of live_dangerously changing
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404568 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-24 17:10:28 +00:00
David M. Lee
c14689225d http: Properly reject requests with Transfer-Encoding set
Asterisk does not support any of the transfer encodings specified in
HTTP/1.1, other than the default "identity" encoding.

According to RFC 2616:

   A server which receives an entity-body with a transfer-coding it does
   not understand SHOULD return 501 (Unimplemented), and close the
   connection. A server MUST NOT send transfer-codings to an HTTP/1.0
   client.

This patch adds the 501 Unimplemented response, instead of the hard work
of actually implementing other recordings.

This behavior is especially problematic for Node.js clients, which use
chunked encoding by default.

(closes issue ASTERISK-22486)
Review: https://reviewboard.asterisk.org/r/3092/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-24 16:41:36 +00:00
Joshua Colp
176c3a143b res_pjsip_pubsub: Ensure dialog manipulation happens on proper thread.
When destroying a subscription we remove the serializer from its dialog
and decrease its reference count. Depending on which thread dropped the
subscription reference count to 0 it was possible for this to occur in
a thread where it is not possible.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404553 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-24 02:19:20 +00:00
Matthew Jordan
698fa67154 res_pjsip/pjsip_cli: fix compilation error caused by passing ast_free
When wanting to pass *free as a function pointer, ast_free_ptr has to be used
instead of ast_free. This allows it to be compiled with MALLOC_DEBUG enabled.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-21 03:34:00 +00:00
David M. Lee
5f48de6336 ari: Remove support for specifying channel vars during origination.
When we added support for specifying channel variables for an
origination, we didn't consider how that would interact with another
feature, namely specifying request parameters in a JSON request body.

The method of specifying channel variables (as a flat JSON object passed
in the JSON body) interferes with parsing parameters out of the request
body.

Unfortunately, fixing this would be a backward incompatible change. In
the interest of keeping the API sane and keeping our release schedule,
we're dropping the feature for specifying channel variables in the
origination request.

We will bring the feature back soon, as a backward compatible addition
to the API.

(closes issue ASTERISK-23051)
Review: https://reviewboard.asterisk.org/r/3088


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404509 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 22:02:11 +00:00
Matthew Jordan
0affe4c41a Remove automerge properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 21:25:38 +00:00
Matthew Jordan
b6aeb1b254 res_pjsip: Add PJSIP CLI commands
Implements the following cli commands:
pjsip list aors
pjsip list auths
pjsip list channels
pjsip list contacts
pjsip list endpoints
pjsip show aor(s)
pjsip show auth(s)
pjsip show channels
pjsip show endpoint(s)

Also...
Minor modifications made to the AMI command implementations to facilitate
reuse.
New function ast_variable_list_sort added to config.c and config.h to implement
variable list sorting.

(issue ASTERISK-22610)
patches:
  pjsip_cli_v2.patch uploaded by george.joseph (License 6322)


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 21:23:24 +00:00
Scott Griepentrog
50027152f7 say.c: correct time for polish
In ast_say_date_with_format_pl(), change ast_say_number() to
use tm_sec instead of tm_mn.

(closes issue ASTERISK-22856)
Reported by: Robert Mordec
Review: https://reviewboard.asterisk.org/r/3082/
Patches:
     say.c.patch uploaded by veilen (license 6555)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 21:16:47 +00:00
Mark Michelson
a151782a81 Fix issue where PJSIP blind transferer dialog may not complete as planned.
When transferring to a dialplan extension that will not place any outbound
calls, the only control frames that the PJSIP REFER framehook will receive
are inconsequential (such as unhold or srcchange). As such, we shouldn't
allow for the reception of those types of frames prevent us from signaling
to the transferring party that the transfer has completed successfully once
voice frames are read.

Thanks to Jonathan Rose for pointing this out.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404439 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 20:11:25 +00:00
Matthew Jordan
795d3542b6 res_stasis_device_state: Set resource type for subscriptions to deviceState
The documentation for ARI already specifies that the device state resource when
used for subscribing for events is "deviceState", not "device_state". The code,
however, used "device_state"; although this was inconsistent as well in doxygen
comments in resource_applications.

Because the actual resource being subscribed to is /deviceStates/{device}/, it
makes sense for the resource type specifier to be deviceState.

Note that the key value in the events is still "device_state".


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404437 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 20:04:41 +00:00
Richard Mudgett
4576cdc925 ao2_iterator: Mini-audit of the ao2_iterator loops in the new code files.
* Fixed several places where ao2_iterator_destroy() was not called.

* Fixed several iterator loop object variable reference problems.

* Fixed res_parking AMI actions returning non-zero.  Only the AMI logoff
action can return non-zero.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@404434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-20 19:52:43 +00:00