asterisk/tests
Matthew Jordan 47bf7efc4d Multiple revisions 420089-420090,420097
........
  r420089 | mjordan | 2014-08-05 15:10:52 -0500 (Tue, 05 Aug 2014) | 72 lines
  
  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
........
  r420090 | mjordan | 2014-08-05 15:16:37 -0500 (Tue, 05 Aug 2014) | 2 lines
  
  Remove automerge properties :-(
........
  r420097 | mjordan | 2014-08-05 16:36:25 -0500 (Tue, 05 Aug 2014) | 2 lines
  
  test_message: Fix strict-aliasing compilation issue
........

Merged revisions 420089-420090,420097 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-08-05 21:44:09 +00:00
..
Makefile Title update 2012-10-14 21:56:13 +00:00
test_abstract_jb.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_acl.c Silence a warning message from older versions of GCC. 2012-07-24 19:12:09 +00:00
test_ami_security_events.sh Add an API for reporting security events, and a security event logging module. 2009-07-11 19:15:03 +00:00
test_amihooks.c Merged revisions 338556 via svnmerge from 2011-09-29 21:16:07 +00:00
test_aoc.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_app.c uniqueid: channel linkedid, ami, ari object creation with id's 2014-03-07 15:47:55 +00:00
test_ari.c ari:Add application/json parameter support 2013-11-27 15:48:39 +00:00
test_ari_model.c Fix module load errors for test_ari_model.so. 2013-09-16 18:36:22 +00:00
test_ast_format_str_reduce.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_astobj2.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_astobj2_thrash.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_bucket.c Fix bucket unit tests 2013-08-25 18:12:42 +00:00
test_cdr.c uniqueid: Fix chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler errors. 2014-03-07 19:19:04 +00:00
test_cel.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
test_channel_feature_hooks.c Bridging: Allow channels to define bridging hooks 2014-06-26 12:43:47 +00:00
test_config.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_core_codec.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
test_core_format.c Fix build in dev-mode 2014-07-21 17:01:05 +00:00
test_db.c app_queue: Support persisting and loading of long member lists. 2012-10-01 20:36:25 +00:00
test_devicestate.c stasis cache: Enhance to keep track of an item from different entities. 2014-03-07 20:41:13 +00:00
test_dlinklists.c memory leaks: Memory leak cleanup patch by Corey Farrell (first set) 2013-10-23 20:10:30 +00:00
test_endpoints.c Few more menuselect fixes missed in r392777 2013-06-24 22:05:28 +00:00
test_event.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_expr.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_format_cache.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
test_format_cap.c media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
test_func_file.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_gosub.c Doxygen Updates Janitor Work 2012-09-22 20:43:30 +00:00
test_hashtab_thrash.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_heap.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_jitterbuf.c Doxygen comment tweaks. 2013-08-16 17:33:21 +00:00
test_json.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_linkedlists.c test_linkedlists: Fix memory leak 2013-10-24 19:57:04 +00:00
test_locale.c Merged revisions 338556 via svnmerge from 2011-09-29 21:16:07 +00:00
test_logger.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_message.c Multiple revisions 420089-420090,420097 2014-08-05 21:44:09 +00:00
test_netsock2.c Add a unit test for ast_sockaddr_split_hostport 2011-11-09 19:31:27 +00:00
test_optional_api.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_pbx.c Merged revisions 337062 via svnmerge from 2011-09-20 21:05:42 +00:00
test_poll.c Add leading and trailing backslashes 2012-04-19 21:14:35 +00:00
test_res_stasis.c Update events to use Swagger 1.3 subtyping, and related aftermath 2013-07-03 16:32:41 +00:00
test_sched.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_scoped_lock.c ao2_iterator: Mini-audit of the ao2_iterator loops in the new code files. 2013-12-20 20:00:50 +00:00
test_security_events.c Stasis: Update security events to use Stasis 2013-05-17 17:36:10 +00:00
test_skel.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_sorcery.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_sorcery_astdb.c Prevent duplicate sorcery wizards from being applied to sorcery object types. 2014-04-02 18:57:29 +00:00
test_sorcery_realtime.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_stasis.c stasis cache: Enhance to keep track of an item from different entities. 2014-03-07 20:41:13 +00:00
test_stasis_channels.c uniqueid: channel linkedid, ami, ari object creation with id's 2014-03-07 15:47:55 +00:00
test_stasis_endpoints.c endpoints: Fix failing unit tests from r419196 2014-07-23 16:46:13 +00:00
test_stringfields.c Add aggregate operations for stuctures with string fields 2013-02-07 15:16:44 +00:00
test_strings.c This patch adds a RESTful HTTP interface to Asterisk. 2013-04-22 14:58:53 +00:00
test_substitution.c uniqueid: channel linkedid, ami, ari object creation with id's 2014-03-07 15:47:55 +00:00
test_taskprocessor.c Multiple revisions 399887,400138,400178,400180-400181 2013-09-30 18:55:27 +00:00
test_threadpool.c Add a serializer interface to the threadpool 2013-02-12 21:45:59 +00:00
test_time.c Merged revisions 332177 via svnmerge from 2011-08-16 20:15:23 +00:00
test_uri.c res_http_websocket: Create a websocket client 2014-06-05 17:22:35 +00:00
test_utils.c res_pjsip_authenticator_digest: Fix md5 hash buffer 2014-01-03 21:13:30 +00:00
test_uuid.c Add uuid wrapper API call ast_uuid_generate_str(). 2013-03-28 23:59:20 +00:00
test_voicemail_api.c Fix more dev-mode build issues 2014-07-22 14:22:00 +00:00
test_websocket_client.c res_http_websocket: read/write string fixup 2014-06-16 16:22:33 +00:00
test_xml_escape.c Merged revisions 378935 via svnmerge from 2013-01-12 07:21:01 +00:00