Commit Graph

25519 Commits

Author SHA1 Message Date
Asterisk Autobuilder
17d51b1125 Importing files for 12.5.0-rc1 release.
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/12.5.0-rc1@420813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:54:48 +00:00
Asterisk Autobuilder
fb7cf6e9a0 Creating tag for the release of asterisk-12.5.0-rc1
git-svn-id: https://origsvn.digium.com/svn/asterisk/tags/12.5.0-rc1@420812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:53:01 +00:00
Matthew Jordan
bf6ff88a20 AMI/ARI: Update version to 2.5.0/1.5.0 respectively
This is to support the backwards compatible changes made in the next version
of Asterisk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:48:18 +00:00
Kinsey Moore
f9720c0865 Stasis: Use the correct return value
Return the correct value instead of always returning 0 when setting
internal status on unreal channels.

Reported by: Richard Mudgett


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:45:11 +00:00
Kinsey Moore
18375d3f57 Stasis: Allow internal channels directly into bridges
The patch to catch channels being shoehorned into Stasis() via external
mechanisms also happens to catch Announcer and Recorder channels
because they aren't known to be stasis-controlled channels in the usual
sense. This marks those channels as Stasis()-internal channels and
allows them directly into bridges.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 18:35:27 +00:00
Walter Doekes
e3764ce6fb general: Fix memory Corruption in __ast_string_field_ptr_build_va.
If the space left in a stringfield is between 0 and
(alignof(ast_string_field_allocation)-1) adding new data would cause
memory corruption, because we would assume enough space (unsigned
underrun).

Thanks Arnd Schmitter for reporting and finding out the cause!

ASTERISK-23508 #close
Reported by: Arnd Schmitter
Tested by: Arnd Schmitter, JoshE

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420716 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 10:37:41 +00:00
Walter Doekes
da83b7860e tcptls: Avoid compiler warning on non-dev-mode.
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-11 09:53:29 +00:00
Matthew Jordan
c24551dc28 main/message: remove debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-08 12:31:25 +00:00
Kinsey Moore
b0064d1b3e CEL: Update unit tests for additional information
This updates the CEL unit tests for the new information contained in
the attended transfer CEL extra field.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-08 02:51:15 +00:00
Richard Mudgett
042bde635c chan_sip: Replace sip_tls_read() and resolve the large SDP poll issue.
Replace sip_tls_read() and sip_tcp_read() with a single function and
resolve the poll/wait issue with large SDP payloads.

ASTERISK-18345 #close
Reported by: Stephane Chazelas
Patches:
      tcptls_pollv4.diff (license #5835) patch uploaded by Elazar Broad

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420436 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 21:48:58 +00:00
Kinsey Moore
e177b8cd63 Stasis: Correct blind transfer message generation
This fixes the json object creation format string and key name for the
BridgeBlindTransfer Stasis event allowing it to be published properly.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 21:16:11 +00:00
Kinsey Moore
a4cb4c800d Stasis: Ensure transfer messages follow validation rules
This makes Stasis() event generation for transfer messages follow
validation rules. Currently, ast_json_null() is being used in place of
omitting a key entirely which falls afoul of these validation rules.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420408 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 20:23:30 +00:00
Mark Michelson
5a33dd7284 Ensure bridges exist when trying to determine bridged parties when publishing transfer information.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420387 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 19:43:59 +00:00
Mark Michelson
23c7dff74e Revert previous patch since it had some unreviewed content in it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 19:42:43 +00:00
Mark Michelson
ae880e67dd Ensure bridges actually exist when trying to determine the bridged peer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 19:37:00 +00:00
Kinsey Moore
e0a94cc164 Stasis: Convey transfer information to applications
This fixes a class of issues where Stasis applications were not made
aware that their channels were being manipulated or replaced by
external entitiessuch as transfers, AMI commands, or dialplan
applications such as Bridge(). Inconsistent information such as
StasisEnd events with unknown channels as a result of masquerades has
also been corrected. To accomplish these fixes, several new fields
were added to blind and attended transfer messages as well as
StasisStart and BridgeAttendedTransfer Stasis events.

ASTERISK-23941 #close
Review: https://reviewboard.asterisk.org/r/3865/
Review: https://reviewboard.asterisk.org/r/3857/
Review: https://reviewboard.asterisk.org/r/3852/
Review: https://reviewboard.asterisk.org/r/3816/
Review: https://reviewboard.asterisk.org/r/3731/
Review: https://reviewboard.asterisk.org/r/3729/
Review: https://reviewboard.asterisk.org/r/3728/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-07 15:19:53 +00:00
Richard Mudgett
e41040965b Change comment.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 21:47:30 +00:00
Richard Mudgett
9fe67dfcb2 alembic: Adjust sippeers, queue_members, and voicemail_messages tables.
* Increased the sippeers useragent max string size to 255.

* Changed the queue_members uniqueid to an auto incremented integer
instead of a string.

* Increased the voicemail_messages BLOB size to LONGBLOB on mysql.

* Fixed the add_tables_for_pjsip config change version downgrade actions
to drop a table it created.

* Adjusted the sample alembic.ini files cdr.ini.sample, config.ini.sample,
and voicemail.ini.sample to give a mysql and postgres sqlalchemy.url
lines.

ASTERISK-23847 #close
Reported by: Stephen More

ASTERISK-23825 #close
Reported by: Stephen More

ASTERISK-23909 #close
Reported by: Stephen More

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 16:51:49 +00:00
George Joseph
8c5fa1c45d pbx_lua: fix regression with global sym export and context clash by pbx_config.
ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
set, was always force loaded before pbx_config.  Since I couldn't find any
reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
realize was that the symbols need to be exported not because Asterisk needs
them but because any external Lua modules like luasql.mysql need the base
Lua language APIs exported (ASTERISK-17279).

Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
context_merge was only merging includes, switches and ignore patterns if
the context was already existing AND has extensions, or if the context was
brand new.  If pbx_lua is loaded before pbx_config, the context will exist
BUT pbx_lua, being implemented as a switch, will never place extensions in
it, just the switch statement.  The result is that when pbx_config loads,
it never merges the switch statement created by pbx_lua into the final
context.

This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
an "else if" in context_merge that catches the case where an existing context
has includes, switchs or ingore patterns but no actual extensions.

ASTERISK-23818 #close
Reported by: Dennis Guse
Reported by: Timo Teräs
Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3891/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420148 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-06 16:10:01 +00:00
Matthew Jordan
85799f7886 stasis: Fix compilation issue with ao2 tagged objects
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 21:47:51 +00:00
Matthew Jordan
f38ed8b77b test_message: Fix strict-aliasing compilation issue
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420097 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 21:36:25 +00:00
Matthew Jordan
e7690019d5 Remove automerge properties :-(
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 20:16:37 +00:00
Matthew Jordan
a48e144492 ARI: Add channel technology agnostic out of call text messaging
This patch adds the ability to send and receive text messages from various
technology stacks in Asterisk through ARI. This includes chan_sip (sip),
res_pjsip_messaging (pjsip), and res_xmpp (xmpp). Messages are sent using the
endpoints resource, and can be sent directly through that resource, or to a
particular endpoint.

For example, the following would send the message "Hello there" to PJSIP
endpoint alice with a display URI of sip:asterisk@mycooldomain.org:

ari/endpoints/sendMessage?to=pjsip:alice&from=sip:asterisk@mycooldomain.org&body=Hello+There

This is equivalent to the following as well:

ari/endpoints/PJSIP/alice/sendMessage?from=sip:asterisk@mycooldomain.org&body=Hello+There

Both forms are available for message technologies that allow for arbitrary
destinations, such as chan_sip.

Inbound messages can now be received over ARI as well. An ARI application that
subscribes to endpoints will receive messages from those endpoints:

{
  "type": "TextMessageReceived",
  "timestamp": "2014-07-12T22:53:13.494-0500",
  "endpoint": {
    "technology": "PJSIP",
    "resource": "alice",
    "state": "online",
    "channel_ids": []
  },
  "message": {
    "from": "\"alice\" <sip:alice@127.0.0.1>",
    "to": "pjsip:asterisk@127.0.0.1",
    "body": "Watson, come here.",
    "variables": []
  },
  "application": "testsuite"
}

The above was made possible due to some rather major changes in the message
core. This includes (but is not limited to):
- Users of the message API can now register message handlers. A handler has
  two callbacks: one to determine if the handler has a destination for the
  message, and another to handle it.
- All dialplan functionality of handling a message was moved into a message
  handler provided by the message API.
- Messages can now have the technology/endpoint associated with them.
  Various other properties are also now more easily accessible.
- A number of ao2 containers that weren't really needed were replaced with
  vectors. Iteration over ao2_containers is expensive and pointless when
  the lifetime of things is well defined and the number of things is very
  small.

res_stasis now has a new file that makes up its structure, messaging. The
messaging functionality implements a message handler, and passes received
messages that match an interested endpoint over to the app for processing.

Note that inadvertently while testing this, I reproduced ASTERISK-23969.
res_pjsip_messaging was incorrectly parsing out the 'to' field, such that
arbitrary SIP URIs mangled the endpoint lookup. This patch includes the
fix for that as well.

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

ASTERISK-23692 #close
Reported by: Matt Jordan

ASTERISK-23969 #close
Reported by: Andrew Nagy


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 20:10:52 +00:00
Richard Mudgett
92b343c219 format.c: Add reason comments for the format_list ordering.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@420060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 19:12:40 +00:00
Rusty Newton
81f88c2010 Manager - Improve documentation for manager commands Getvar and Setvar.
The documentation for these commands did not make it clear that they could
accept expressions and functions. Modified to make this clear, but tried
not to be overly explicit.

ASTERISK-21178 #close
Reported by: Rusty Newton
Tested by: Rusty Newton

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-04 19:45:33 +00:00
Matthew Jordan
fc2d78f4bf Get rid of automerge properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31 11:57:11 +00:00
Matthew Jordan
e9c0528c5f res_hep_rtcp: Add module that sends RTCP information to a Homer Server
This patch adds a new module to Asterisk, res_hep_rtcp. The module subscribes
to the RTCP topics in Stasis and receives RTCP information back from the
message bus. It encodes into HEPv3 packets and sends the information to the
res_hep module for transmission.

Using this, someone with a Homer server can get live call quality monitoring
for all RTP-based channels in their Asterisk 12+ systems.

In addition, there were a few bugs in the RTP engine, res_rtp_asterisk, and
chan_pjsip that were uncovered by the tests written for the Asterisk Test
Suite. This patch fixes the following:
1) chan_pjsip failed to set its channel unique ids on its RTP instance on
   outbound calls. It now does this in the appropriate location, in the
   serialized call callback.
2) The rtp_engine was overflowing some values when packed into JSON.
   Specifically, some longs and unsigned ints can't be be packed into integer
   values, for obvious reasons. Since libjansson only supports integers,
   floats, strings, booleans, and objects, we print these values into strings.
3) res_rtp_asterisk had a few problems:
   (a) it would emit a source IP address of 0.0.0.0 if bound to that IP
       address. We now use ast_find_ourip to get a better IP address, and
       properly marshal the result into an ast_strdupa'd string.
   (b) Reports can be generated with no report bodies. In particular, this
       occurs when a sender is transmitting information to a receiver (who
       will send no RTP back to the sender). As such, the sender has no report
       body for what it received. We now properly handle this case, and the
       sender will emit SR reports with no body. Likewise, if we receive an
       RTCP packet with no report body, we will still generate the appropriate
       events.

ASTERISK-24119 #close


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419823 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-31 11:55:19 +00:00
Joshua Colp
f9faeef5b8 res_pjsip_session: Fix race condition where redirecting information may not be set.
Since the PJSIP INVITE session module is invoked before any session supplements it was
possible for it to handle a redirect before the res_pjsip_diversion module interpreted
and set redirecting information on the channel. This would cause the redirecting
information to get lost.

This patch ensures that session supplements are *always* invoked before a redirect occurs
by explicitly calling them in the redirect handler.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419764 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-29 10:52:25 +00:00
Joshua Colp
5fdfcf47b3 res_pjsip_pidf_body_generator / res_pjsip_xpidf_body_generator: Ensure local entity is unquoted.
The local entity as provided by PJSIP is quoted within '<' and '>'. As a result placing
this value into XML will result in malformed XML being produced. This patch now unquotes
the local entity so it can go safely into the XML.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-29 09:50:13 +00:00
Richard Mudgett
094e227f78 datastores: Audit ast_channel_datastore_remove usage.
Audit of v1.8 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leaks in app_speech_utils and func_frame_trace.

* Fixed app_speech_utils not locking the channel when accessing the
channel datastore list.

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

Audit of v11 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leak in func_jitterbuffer.  (Was not in v12)

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

Audit of v12 usage of ast_channel_datastore_remove() for datastore memory
leaks.

* Fixed leaks in abstract_jb.

* Fixed leak in ast_channel_unsuppress().  Used by ARI mute control and
res_mutestream.

* Fixed ref leak in ast_channel_suppress().  Used by ARI mute control and
res_mutestream.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419686 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-28 18:50:14 +00:00
Richard Mudgett
54e19bf490 Blocked revisions 419631
........
features.c: Allow appliationmap to use Gosub.

Using DYNAMIC_FEATURES with a Gosub application as the mapped application
does not work.  It does not work because Gosub just pushes the current
dialplan context, exten, and priority onto a stack and sets the specified
Gosub location.  Gosub does not have a dialplan execution loop to run
dialplan like Macro.

* Made the DYNAMIC_FEATURES application mapping feature call
ast_app_exec_macro() and ast_app_exec_sub() for the Macro and Gosub
applications respectively.

* Backported ast_app_exec_macro() and ast_app_exec_sub() from v11 to
execute dialplan routines from the DYNAMIC_FEATURES application mapping
feature.

NOTE: This issue does not affect v12+ because it already does what this
patch implements.

AST-1391 #close
Reported by: Guenther Kelleter

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 23:15:30 +00:00
Matthew Jordan
9385222ce9 Update CHANGES for r419565
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 14:46:15 +00:00
Matthew Jordan
3795fc53dc ARI: report duration values in LiveRecording objects
This patch adds three new fields to the LiveRecording model:
 - total_duration: the total length of the live recording
 - talking_duration: optional. The duration of talking energy that was
   detected while the recording was made.
 - silence_duration: optional. The duration of silence that was detected while
   the recording was made.

These values are reported in the RecordingFinished ARI event.

When a DSP is enabled on the channel during the recording - which occurs when
the recording is created with max_silence_seconds (indicating that the user
actually cares about how much silence is in the file), we will report the
talking_duration and silence_duration in addition to the total_duration.

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

ASTERISK-24037 #close
Reported by: Samuel Galarneau


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 14:41:23 +00:00
Joshua Colp
787b4c9c99 app_bridgewait: Remove possibility of race condition between channels leaving/joining.
Bridges created by app_bridgewait previously had the "dissolve when empty" flag set.
This caused the bridge core to destroy them when the last channel had left. This
introduced a race condition where we may have a reference to the bridge but it is
not actually joinable when we try to join it. This flag has now been removed and the
bridge is guaranteed to be joinable at all times.

ASTERISK-23987 #close
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419538 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 10:53:42 +00:00
Joshua Colp
bbefe3bc65 bridge: Make "bridge destroy" only available in developer mode and add "all" to "bridge kick".
The "bridge destroy" CLI command is invasive to bridges and can leave them in an unexpected
state for the users of them. Since this command may be useful for developers it is now
only available when developer mode is available. To take its place "all" has been added
as a valid option to the "bridge kick" CLI command. It will kick all of the channels
in the bridge out.

ASTERISK-23987
Reported by: Matt Jordan

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-25 10:49:06 +00:00
Corey Farrell
c1eb1b0712 chan_sip: sip_subscribe_mwi_destroy should not call sip_destroy
sip_subscribe_mwi_destroy calls sip_destroy on the reference counted
mwi->call.  This results in the fields of mwi->call being freed, but
mwi->call itself it leaked.  If other code is still using mwi->call
it can cause problems.  This change uses dialog_unref instead, to
balance the ref provided by sip_alloc().

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 17:57:46 +00:00
Jason Parker
3ded0141ec Don't cause Asterisk to exit if ooh323.conf not found.
(closes issue ASTERISK-23814)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-24 16:50:41 +00:00
Matthew Jordan
429724a166 endpoints: Fix failing unit tests from r419196
This patch does two things:
(1) It updates the unit tests to expect additional stasis messages. More
    messages are now sent to the endpoint topic, due to forwarding all
    channel messages and the forwarding relationship set up between
    endpoints themselves.
(2) Remove the technology forwarding subscription during
    ast_endpoint_shutdown. This prevents an improper double shutdown of
    an endpoint from occurring.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-23 16:45:15 +00:00
Matthew Jordan
0470766999 res_pjsip_refer: remove stray debugging line
How'd those @ symbols get in there...


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-23 16:41:27 +00:00
Scott Griepentrog
5e36a9b847 app_voicemail: use a consistent generator string
When updating voicemail.conf when a user changes
their pin, change the generator string to be the
same as the module name when reading so that the
same config_hook will be called.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-23 13:58:57 +00:00
Matthew Jordan
60a67b96f5 ARI: Fix endpoint/channel subscription issues; allow for subscriptions to tech
This patch serves two purposes:
(1) It fixes some bugs with endpoint subscriptions not reporting all of the
    channel events
(2) It serves as the preliminary work needed for ASTERISK-23692, which allows
    for sending/receiving arbitrary out of call text messages through ARI in a
    technology agnostic fashion.

The messaging functionality described on ASTERISK-23692 requires two things:
(1) The ability to send/receive messages associated with an endpoint. This is
    relatively straight forwards with the endpoint core in Asterisk now.
(2) The ability to send/receive messages associated with a technology and an
    arbitrary technology defined URI. This is less straight forward, as
    endpoints are formed from a tech + resource pair. We don't have a
    mechanism to note that a technology that *may* have endpoints exists.

This patch provides such a mechanism, and fixes a few bugs along the way.

The first major bug this patch fixes is the forwarding of channel messages
to their respective endpoints. Prior to this patch, there were two problems:
(1) Channel caching messages weren't forwarded. Thus, the endpoints missed
    most of the interesting bits (such as channel creation, destruction, state
    changes, etc.)
(2) Channels weren't associated with their endpoint until after creation.
    This resulted in endpoints missing the channel creation message, which
    limited the usefulness of the subscription in the first place (a major use
    case being 'tell me when this endpoint has a channel'). Unfortunately,
    this meant another parameter to ast_channel_alloc. Since not all channel
    technologies support an ast_endpoint, this patch makes such a call
    optional and opts for a new function, ast_channel_alloc_with_endpoint.

When endpoints are created, they will implicitly create a technology endpoint
for their technology (if one does not already exist). A technology endpoint is
special in that it has no state, cannot have channels created for it, cannot
be created explicitly, and cannot be destroyed except on shutdown. It does,
however, have all messages from other endpoints in its technology forwarded to
it.

Combined with the bug fixes, we now have Stasis messages being properly
forwarded. Consider the following scenario: two PJSIP endpoints (foo and bar),
where bar has a single channel associated with it and foo has two channels
associated with it. The messages would be forwarded as follows:

channel PJSIP/foo-1 --
                      \
                       --> endpoint PJSIP/foo --
                      /                         \
channel PJSIP/foo-2 --                           \
                                                  ---- > endpoint PJSIP
                                                /
channel PJSIP/bar-1 -----> endpoint PJSIP/bar --

ARI, through the applications resource, can:
 - subscribe to endpoint:PJSIP/foo and get notifications for channels
   PJSIP/foo-1,PJSIP/foo-2 and endpoint PJSIP/foo
 - subscribe to endpoint:PJSIP/bar and get notifications for channels
   PJSIP/bar-1 and endpoint PJSIP/bar
 - subscribe to endpoint:PJSIP and get notifications for channels
   PJSIP/foo-1,PJSIP/foo-2,PJSIP/bar-1 and endpoints PJSIP/foo,PJSIP/bar

Note that since endpoint PJSIP never changes, it never has events itself. It
merely provides an aggregation point for all other endpoints in its technology
(which in turn aggregate all channel messages associated with that endpoint).

This patch also adds endpoints to res_xmpp and chan_motif, because the actual
messaging work will need it (messaging without XMPP is just sad).

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

ASTERISK-23692



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419196 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22 16:12:49 +00:00
Kinsey Moore
838b0014f9 Fix more dev-mode build issues
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419163 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-22 14:13:14 +00:00
Matthew Jordan
29ca8a873b ari: Add a copy operation for stored recordings
This patch adds a new operation for stored recordings, copy. It takes an
existing stored recording and makes a copy of it in the same directory
or a relative directory under the stored recording directory.

/ari/recordings/stored/{recordingName}/copy?destinationRecordingName={copy_name}

This is particularly useful for voicemail-esque applications, which may need to
copy or move recordings around a directory structure.

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

ASTERISK-24036 #close
Reported by: Sam Galarneau
Tested by: Sam Galarneau


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419021 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 21:25:59 +00:00
Corey Farrell
5fa7c03f07 stasis: fix call to ao2_t_alloc for stasis_message_router_create
This fixes a build failure introduced by r3821.  struct stasis_topic is
opaque, so topic->name is unavailable.  Switch to using stasis_topic_name().


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@419019 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 21:24:03 +00:00
Corey Farrell
f4d21fb97e stasis: use ao2_t_alloc for certain object allocators
Add tags to stasis objects using the name.  This makes it
easier to track the source of certain stasis ref leaks.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418996 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 19:53:31 +00:00
Richard Mudgett
6da297cfc3 func_audiohookinherit.c: Fixup some XML documentation wording.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418937 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 16:46:35 +00:00
Jonathan Rose
9ef593f706 Channels: Masquerades to automatically move frame/audio hooks
Whenever possible, audiohooks and framehooks will now be copied over
to the channel that the masquerading channel gets cloned into. This
should occur for all audiohooks and most framehooks. As a result,
in Asterisk 12.5 and up, the AUDIOHOOK_INHERIT function is now
deprecated and its behavior is essentially the new default for all
audiohooks, plus some additional audiohooks/framehooks.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 16:01:57 +00:00
Scott Griepentrog
412484525b feature_config: insure featuregroups and applicationmaps are initialized
If the features.conf is missing, the cfg->featurgroups
and cfg->applicationmaps is not initialized, resulting
in assert on ao2_find of a null container.  This patch
changes the initialization call and adds asserts for a
safeguard.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 22:17:33 +00:00
Kinsey Moore
bb25de5b0a TEST_FRAMEWORK: Fix threewaytransfer reporting
Ensure that three-way transfers can be reported even if featuremap is
non-NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 14:27:40 +00:00
Corey Farrell
cf49205a9b Remove include of astobj.h from channels/dahdi/bridge_native_dahdi.c.
The include was unneeded, this is split off from r3758 as it applies to 12.


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@418787 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-16 23:06:06 +00:00