monitor.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Asterisk -- An open source telephony toolkit.
  3. *
  4. * Copyright (C) 1999 - 2005, Digium, Inc.
  5. *
  6. * Mark Spencer <markster@digium.com>
  7. *
  8. * See http://www.asterisk.org for more information about
  9. * the Asterisk project. Please do not directly contact
  10. * any of the maintainers of this project for assistance;
  11. * the project provides a web site, mailing lists and IRC
  12. * channels for your use.
  13. *
  14. * This program is free software, distributed under the terms of
  15. * the GNU General Public License Version 2. See the LICENSE file
  16. * at the top of the source tree.
  17. */
  18. /*! \file
  19. * \brief Channel monitoring
  20. */
  21. #ifndef _ASTERISK_MONITOR_H
  22. #define _ASTERISK_MONITOR_H
  23. #include "asterisk/channel.h"
  24. #include "asterisk/optional_api.h"
  25. /* Streams recording control */
  26. #define X_REC_IN 1
  27. #define X_REC_OUT 2
  28. #define X_JOIN 4
  29. /* Start monitoring a channel */
  30. AST_OPTIONAL_API(int, ast_monitor_start,
  31. (struct ast_channel *chan, const char *format_spec,
  32. const char *fname_base, int need_lock, int stream_action,
  33. const char *beep_id),
  34. { return -1; });
  35. /* Stop monitoring a channel */
  36. AST_OPTIONAL_API(int, ast_monitor_stop,
  37. (struct ast_channel *chan, int need_lock),
  38. { return -1; });
  39. /* Change monitoring filename of a channel */
  40. AST_OPTIONAL_API(int, ast_monitor_change_fname,
  41. (struct ast_channel *chan, const char *fname_base,
  42. int need_lock),
  43. { return -1; });
  44. AST_OPTIONAL_API(void, ast_monitor_setjoinfiles,
  45. (struct ast_channel *chan, int turnon),
  46. { return; });
  47. /* Pause monitoring of a channel */
  48. AST_OPTIONAL_API(int, ast_monitor_pause,
  49. (struct ast_channel *chan),
  50. { return -1; });
  51. /* Unpause monitoring of a channel */
  52. AST_OPTIONAL_API(int, ast_monitor_unpause,
  53. (struct ast_channel *chan),
  54. { return -1; });
  55. #endif /* _ASTERISK_MONITOR_H */