Changes for Asterisk UniMRCP Modules 1.7.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * N/A.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Added a new option 'plt' allowing to have persistent session lifetime, where an MRCP session is created on demand, reused and destroyed on hang-up.
	* Added a new option 'dse' allowing to specify a particular datastore entry. A datastore entry is associated to an MRCP session.
      There can be multiple datastore entries used in the scope of the same call. If the parameter is not set, then the default datastore entry is used.
	* Added a new option 'sbs' indicating whether or not to always stop barged synthesis request. Thanks @sfgeorge. (Pull request #36)

  2.2. MRCPRecog()

    * Added a new option 'plt' allowing to have persistent session lifetime, where an MRCP session is created on demand, reused and destroyed on hang-up.
	* Added a new option 'dse' allowing to specify a particular datastore entry. A datastore entry is associated to an MRCP session.
      There can be multiple datastore entries used in the scope of the same call. If the parameter is not set, then the default datastore entry is used.

  2.3. SynthAndRecog()

    * Added a new option 'plt' allowing to have persistent session lifetime, where an MRCP session is created on demand, reused and destroyed on hang-up.
	* Added a new option 'dse' allowing to specify a particular datastore entry. A datastore entry is associated to an MRCP session.
      There can be multiple datastore entries used in the scope of the same call. If the parameter is not set, then the default datastore entry is used.
    * Set end_of_prompt when audio file complete on Asterisk >= 11. Thanks @sfgeorge.
	* Added a new log statement "File is over" for Asterisk >= 11. Thanks @sfgeorge.
	* Added a new option 'sbs' indicating whether or not to always stop barged synthesis request. Thanks @sfgeorge. (Pull request #36)

  2.4. Framework

    * Load max-shared-count and feature tags from mrcp.conf.

3. Miscellaneous

    * Added support for Asterisk 17.


Changes for Asterisk UniMRCP Modules 1.5.2

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * Use ast_strdup() instead of strdup() to address compilation error while building against Asterisk 16. Issue #27.

2. Dialplan Applications (app_unimrcp.so)

    * N/A.

3. Miscellaneous

    * Added support for Asterisk 16.


Changes for Asterisk UniMRCP Modules 1.5.1

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * N/A.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * N/A.

  2.2. MRCPRecog()

    * When recognition fails, set RECOG_COMPLETION_CAUSE variable, if available. Issue #19.
    * Skip voice frames with zero length fed by Asterisk under certain circumstances.
    * When recognition completes, make sure to stop the ongoing prompt, if any. This problem was encountered when
      START-OF-INPUT and RECOGNITION-COMPLETE events were received almost instantaneously.

  2.3. SynthAndRecog()

    * When recognition fails, set RECOG_COMPLETION_CAUSE variable, if available. Issue #19.
    * Skip voice frames with zero length fed by Asterisk under certain circumstances.
    * Allow different profiles be specified for synthesis and recognition. Merged a pull request submitted by Mihail. Thanks.
    * When recognition completes, make sure to stop the ongoing prompt, if any. This problem was encountered when
      START-OF-INPUT and RECOGNITION-COMPLETE events were received almost instantaneously.

  2.4. Framework

    * N/A.

3. Miscellaneous

    * Added support for Asterisk 15.


Changes for Asterisk UniMRCP Modules 1.5.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * Allow built-in and HTTP grammars be specified with SpeechActivateGrammar().
    * Fixed a crash in processing of on_terminate_event() occurred when the MRCP server unexpectedly disconnects
      while recognition is in progress. Issue #13.
    * Fixed a compilation warning by taking out an unused variable.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Initialized all the dispatcher event handlers to prevent an unconditional move reported by valgrind,
      which could occur on an unexpected session termination initiated by the MRCP server.
    * Instead of calculating bytes per sample on every written frame, do it once per speech channel creation.

  2.2. MRCPRecog()

    * Fixed a possible invalid read attempt reported by valgrind, which could occur as a result of mrcp_application_session_id_get()
      being called after mrcp_application_channel_add() completed with an error.
    * Initialized all the dispatcher event handlers to prevent an unconditional move reported by valgrind,
      which could occur on an unexpected session termination initiated by the MRCP server.
    * Fixed the name of grammar delimiters option in documentation (not a functional change).
    * Improved the detection of end of file play by using ast_channel_streamid() and ast_channel_timingfunc(), when available.
      Fixed issue #14. Thanks scgm11.

  2.3. SynthAndRecog()

    * Fixed a possible invalid read attempt reported by valgrind, which could occur as a result of mrcp_application_session_id_get()
      being called after mrcp_application_channel_add() completed with an error.
    * Initialized all the dispatcher event handlers to prevent an unconditional move reported by valgrind,
      which could occur on an unexpected session termination initiated by the MRCP server.
    * Improved the detection of end of file play by using ast_channel_streamid() and ast_channel_timingfunc(), when available.
      Fixed issue #14. Thanks scgm11.

  2.4. Framework

    * Fixed the application options bitmasks. Issue #7. Thanks Borja.
    * Replaced hard-coded SPEECH_CHANNEL_TIMEOUT by a new configuration parameter speech-channel-timeout, which can be set from mrcp.conf.
      Merged pull request #9. Thanks Userator.
    * Added support for 16 kHz sampling rate.
    * Use UniMRCP var directory instead of data for SPEECH_CHANNEL_DUMP_DIR.
    * Fixed a transcoding issue when Asterisk 13 and above is used with a native format being neither PCMU, PCMA or Linear PCM.
    * Added support for a new grammar type "application/xml" used to dynamically load an XML-based speech context for the Google SR plugin.

3. Miscellaneous

    * Enhanced the version detection routine in asterisk.m4 by stripping off additional trailing characters, if present.
    * Added a test for Asterisk include directory in asterisk.m4 by returning an error, if not found.
    * Added a new configure option --with-asterisk-doc, which allows to explicitly specify the location of Asterisk XML documentation
      directory. If not set, the directory is implicitly determined as before.
    * Added support for Asterisk 14. Fixed issue #15.


Changes for Asterisk UniMRCP Modules 1.4.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * N/A.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Added a new dialplan variable SYNTH_COMPLETION_CAUSE to get the Completion-Cause header field value received with the SPEAK-COMPLETE event.
      Merged pull request #3. Thanks kkocaerkek.
    * Fixed support for the option "f" (Issue-4).

  2.2. MRCPRecog()

    * Added a new dialplan variable RECOG_SID set upon application termination, when available.

  2.3. SynthAndRecog()

    * Added a new dialplan variable RECOG_SID set upon application termination, when available.

  2.4. Framework

    * Added a new function speech_channel_get_id() to retrieve an associated MRCP session identifier, when available.
    * Allow sip-t1, sip-t2, sip-t4 and sip-t1x64 timeouts be specified via mrcp.conf.
    * Allow NTATAG_TIMER_C be specified via mrcp.conf.
    * Encapsulated the function ast_write() into the speech channel interface.

3. Miscellaneous

    * N/A.


Changes for Asterisk UniMRCP Modules 1.3.1

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * N/A.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Re-factored the application to feed synthesized speech to Asterisk directly from MPF callback.

  2.2. MRCPRecog()

    * Fixed support for the option i=any (Issue-168).

3. Miscellaneous

    * Updated README of Asterisk modules to include references to GitHub.


Changes for Asterisk UniMRCP Modules 1.3.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * Fixed compilation against Asterisk 1.6.0 and 1.6.1 branches. Thanks Javier (issue-174).
    * Adapted to the change in UniMRCP dir_layout interface.
    * Made res_speech_unimrcp compatible with Asterisk 12.
    * Added support for Asterisk 13.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Fixed a Coverity issue: a variable was declared and assigned to itself because of a typo.

  2.2. MRCPRecog()

    * Reincarnated the old or added a new option 'sit', which allows to specify a policy for the use of input timers.
    * Set channel status to INTERRUPTED when user hangs up on a none-bargeinable prompt. Thanks Tony.
    * Fixed a Coverity issue: a variable was declared and assigned to itself because of a type.
    * Added support for multiple prompts.
    * Individual options passed to MRCPRecog can now be quoted with <> (r2263).

  2.3. SynthAndRecog()

    * Corrected a misspelled option name ("dt" -> "gd") in the XML documentation.
    * Added support for multiple prompts.
    * Filter out silence and write only audio frames to Asterisk channel.
    * Added support for native audio file play.
    * Use the same synth channel for consecutive TTS prompts and destroy it on an audio file prompt.
    * Reincarnated the old or added a new option 'sit', which allows to specify a policy for the use of input timers.
    * Set channel status to INTERRUPTED when user hangs up on a none-bargeinable prompt. Thanks Tony.

  2.4. Framework

    * Fixed a regression in loading of MRCPv1 profiles introduced since 1.2.0 release (issue-173).
    * Print out the associated Asterisk channel name while creating a new speech channel.
    * Retrieve and print out status and response code in case of an error in on_channel_add().
    * Took out unused handler on_channel_remove().
    * Fixed a potential race condition issue, where the applications could get stuck indefinitely in speech_channel_open() (r2168).
    * Fixed compilation against Asterisk 1.6.0 and 1.6.1 branches. Thanks Javier (issue-174).
    * Fixed a Coverity issue: dereference after NULL check.
    * Added support for Asterisk 13.

3. Miscellaneous

    * Use AM_CPPFLAGS instead of deprecated INCLUDES.
    * Fixed support for out of source build.
    * Test and create asterisk conf and xmldoc dirs on make install, if needed.


Changes for Asterisk UniMRCP Modules 1.2.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * Take into consideration CONFIG_STATUS_FILEINVALID, which ast_config_load() may return since Asterisk 1.6 and above.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * If ast_write() fails, store such an occurrence in the logs but do not set the SYNTHSTATUS to ERROR.

  2.2. MRCPRecog()

    * Fixed the detection of file play complete event.

  2.3. SynthAndRecog()

    * Added missing </para> tag in XML documentation.

  2.4. Framework

    * Pass along loaded request-timeout to the RTSP client stack too.
    * Added telephone-event to the list of supported codecs in the default configuration file mrcp.conf.
    * Provided more comments in the default configuration file mrcp.conf.
    * Encapsulated ast_config routine in the function load_mrcp_config().
    * Took out local functions from header file and declare them static.
    * Hand over file and line markers received from unimrcp logger to ast_log().
    * Simplified speech_channel_read() and speech_channel_write() a bit. All the sanity checks are performed down the road, anyway (Issue-172).
    * Added debugging capabilities to speech_channel.
    * Mapped APT_PRIO_INFO (UniMRCP log level) to __LOG_NOTICE (Asterisk log level) to help rule out common configuration mistakes faster.

3. Miscellaneous

    * Added/fixed support for DESTDIR.
    * Enable silent build rules (--enable-silent-rules)and use silent build by default.
    * Set ac_macro_dir variable manually, since newer versions of autoconf don't do that.
    * Take into consideration m4 macro files generated for libtool 2.
    * Fixed help string displayed for the option --with-asterisk-version.
    * Pass no-define to AM_INIT_AUTOMAKE in order not to define PACKAGE and VERSION.
    * Do not use autoconf generated compiler DEFS by replacing confdefs.h after AC_INIT, AM_INIT_AUTOMAKE and AC_PROG_LIBTOLL getting called.
    * Updated definition of the macro AX_COMPILER_VENDOR and moved it out from configure.ac to a separate m4 file.
    * Disabled DEFAULT_INCLUDES provided by automake.
    * Added generic apr_common.m4 in order to use helper m4 macros APR_ADDTO() and APR_CONFIG_NICE().
    * Generate ./config.nice to reuse ./configure command-line.
    * Turn off the build of static libraries for Asterisk modules.
    * Moved the target install-data-local to module specific Makefiles to install the default config file only when the corresponding module is enabled.
    * Enhanced ./configure report.


Changes for Asterisk UniMRCP Modules 1.1.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

    * Use the new NLSML parser interface to build ast_speech_result based on the parsed nlsml_result_t structure.
    * Added support for alternate interpretations (N-Best-List) as well as multiple instances per interpretation.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Added support for prompts referenced by a URI.
    * Differentiate the cases when synthesis is terminated due to an error or caller hang-up. In the latter case, the variable "SYNTHSTATUS" is set to the new status "INTERRUPTED".
    * Fixed a possible file handle leak.

  2.2. MRCPRecog()

    * Modified the default value of the option "i" (interrupt) in order to enable the DTMF support by default. In order to disable DTMFs, use the option i=disable. The other settings/values remain intact.
    * Added a new option "uer" (URI-encoded results). By default, this option is disabled (uer=0). If the option is enabled (uer=1), the variable "RECOG_RESULT" holds URI-encoded results. This matters in case of the AMI use.
    * If the application creation fails on start-up, set the corresponding variable "mrcprecog" to NULL.
    * Differentiate the cases when recognition is terminated due to an error or caller hang-up. In the latter case, the variable "RECOGSTATUS" is set to the new status "INTERRUPTED".
    * Dropped support for the barge-in handled on/by Asterisk (bargein=2). The option bargein can now simply be enabled (1) or disabled (0).
    * Set the dialplan variables "RECOG_COMPLETION_CAUSE", "RECOG_RESULT", and optionally "RECOG_WAVEFORM_URI" in accordance with the application SynthAndRecog().
    * Added support for the method "Start-Input-Timers".
    * Took out the input option "sit", since the header field "START-INPUT-TIMERS" is now set and controlled implicitly by the application.

  2.3. SynthAndRecog()

    * Added support for prompts referenced by a URI.
    * Added a new option "uer" (URI-encoded results). By default, this option is disabled (uer=0). If the option is enabled (uer=1), the variable "RECOG_RESULT" holds URI-encoded results. This matters in case of the AMI use.
    * Differentiate the cases when recognition is terminated due to an error or caller hang-up. In the latter case, the variable "RECOG_STATUS" is set to the new status "INTERRUPTED".

3. Miscellaneous

    * Terminate the MRCP session when negotiated codec descriptor cannot be retrieved by a user application.
    * Prevent a possible segfault of Asterisk caused by malformed input parameters (Issue-157).
    * Added a new enumeration speech_channel_status_t used by the applications to set the corresponding status variable on exit.
    * Fixed possible memory leaks in the processing of ast_frames.
    * Added new dialplan functions RECOG_CONFIDENCE(), RECOG_GRAMMAR(), RECOG_INPUT(), and RECOG_INSTANCE() to retrieve recognition results set by the applications MRCPRecog() and SynthAndRecog().
    * Updated the XML documentation of the dialplan applications and custom functions.
    * Improved the log statements.
    * Added more usage examples and helper macros which output recognition results by using the new dialplan functions.
    * Normalize application input arguments by stripping any leading and trailing whitespaces and skipping the quotes.


Changes for Asterisk UniMRCP Modules 1.0.0

1. Generic Speech Recognition API (res_speech_unimrcp.so)

  * Handled change to the apt_log_file_open() function. Thanks J.W.F. Thirion.
  * Added the ability to implicitly stop an in-progress recognition request. Applied a reworked patch submitted to Issue-105. Thanks Borja.
  * Added support for loading and activating multiple grammars for a recognition request. Applied a reworked patch submitted to Issue-105. Thanks Borja.
  * Enhanced parsing of NLSML results. Applied a patch submitted to Issue-105. Thanks Borja.
  * Fixed support for built-in grammars. Thanks Renato.

2. Dialplan Applications (app_unimrcp.so)

  2.1. MRCPSynth()

    * Fixed a DTMF generator issue. Thanks J.W.F. Thirion.
    * Added the ability to load a plain text or an SSML content from the specified file. Applied a reworked patch submitted to Issue-151. Thanks Borja.

  2.2. MRCPRecog()

    * Fixed a misspelled name of the header field "Input-Waveform-URI".
    * Use the option "sl" for the header field "Sensitivity-Level" and "spl" for "Speech-Language".
    * Fixed a crash in speech_channel_destroy(). Thanks Evan, Stephen, and Rodolfo.
    * Fixed a memory leak in processing of recognition results. A recognition result is now allocated from the channel memory pool using apr_pstrdup(). Otherwise, the duplicated string should have been explicitly freed.
    * Fixed the grammar type detection routine.
    * Added the ability to load a prompt and/or a grammar from the specified files.
    * Added support for loading and activating multiple grammars for a recognition request. The grammars can be specified as a comma-separated list of input parameters.
    * Added a new application option: exit-on-play-error "epe". If the option is enabled and the specified prompt file cannot be played, the application exits with the "RECOGSTATUS" variable set to "ERROR".

  2.3. SynthAndRecog()

    This is a new diaplan application which plays a synthesized prompt to the user and waits for speech to be recognized. The application supports the following features:

    * Plain text and SSML prompts.
    * Inline (SRGS XML, SRGS ABNF, JSGF), built-in, and URI grammars. Inline grammars can be loaded from a file. A list of comma-separated grammars can be used for a recognition request.
    * Barge-in, and an option for non-bargeinable prompts.
    * Recognition timers.
    * Recognition results.

3. Miscellaneous

  * Enhanced the version detection routine of Asterisk (asterisk.m4).
  * Added a new optional parameter to the configure script --with-asterisk-version, which allows to explicitly specify a version string in case the version cannot be determined or retrieved implicitly.
  * Included asterisk.m4 from acinclude.m4.
  * Added a new header file ast_compat_def.h, which provides backward compatible macros, definitions, and utility functions for Asterisk.
  * Added support for Asterisk 1.8, 10, and 11 to the modules res_speech-unimrcp and app_unimrcp. The former versions are also supported.
  * Added support for auto-generated XML doc files introduced since Asterisk 1.6. The XML doc files are generated from the corresponding tags declared in source files.
  * Split the module app_unimrcp into several integral parts. The source file app_unimrcp.c is now the entry point of the module, and the applications reside in separate source files.
  * Fixed loading of the configuration parameter "offer-new-connection" to accept both boolean "true" or "false" and integer "1" or "0" values.
  * Added a checking for pkg-config to the configure script.
  * Added a new sample dialplan applications file mrcp_sample_apps.conf which provides numerous usage examples. Removed the old file say-digit.conf.
  * For logging purposes, set the name of a UniMRCP session object to schannel->name.
  * Using transparent header fields to apply application options.
  * Retained backward compatibility with UniMRCP 1.0.0 and above, but dropped the support for earlier versions.
  * Updated the README file to include the statement for the GPLv2 license. Added the INSTALL and COPYING files.
