mrcp_sofiasip_client_agent.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*
  2. * Copyright 2008-2014 Arsen Chaloyan
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. *
  16. * $Id: mrcp_sofiasip_client_agent.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
  17. */
  18. #ifndef MRCP_SOFIASIP_CLIENT_AGENT_H
  19. #define MRCP_SOFIASIP_CLIENT_AGENT_H
  20. /**
  21. * @file mrcp_sofiasip_client_agent.h
  22. * @brief Implementation of MRCP Signaling Interface using Sofia-SIP
  23. */
  24. #include <apr_network_io.h>
  25. #include "mrcp_sig_agent.h"
  26. APT_BEGIN_EXTERN_C
  27. /** Sofia-SIP config declaration */
  28. typedef struct mrcp_sofia_client_config_t mrcp_sofia_client_config_t;
  29. /** Sofia-SIP config */
  30. struct mrcp_sofia_client_config_t {
  31. /** Local IP address */
  32. char *local_ip;
  33. /** External (NAT) IP address */
  34. char *ext_ip;
  35. /** Local SIP port */
  36. apr_port_t local_port;
  37. /** Local SIP user name */
  38. char *local_user_name;
  39. /** User agent name */
  40. char *user_agent_name;
  41. /** SDP origin */
  42. char *origin;
  43. /** SIP transport */
  44. char *transport;
  45. /** SIP T1 timer */
  46. apr_size_t sip_t1;
  47. /** SIP T2 timer */
  48. apr_size_t sip_t2;
  49. /** SIP T4 timer */
  50. apr_size_t sip_t4;
  51. /** SIP T1x64 timer */
  52. apr_size_t sip_t1x64;
  53. /** Print out SIP messages to the console */
  54. apt_bool_t tport_log;
  55. /** Dump SIP messages to the specified file */
  56. char *tport_dump_file;
  57. };
  58. /**
  59. * Create Sofia-SIP signaling agent.
  60. */
  61. MRCP_DECLARE(mrcp_sig_agent_t*) mrcp_sofiasip_client_agent_create(const char *id, mrcp_sofia_client_config_t *config, apr_pool_t *pool);
  62. /**
  63. * Allocate Sofia-SIP config.
  64. */
  65. MRCP_DECLARE(mrcp_sofia_client_config_t*) mrcp_sofiasip_client_config_alloc(apr_pool_t *pool);
  66. /**
  67. * Initialize Sofia-SIP logger.
  68. */
  69. MRCP_DECLARE(apt_bool_t) mrcp_sofiasip_client_logger_init(const char *name, const char *level_str, apt_bool_t redirect);
  70. APT_END_EXTERN_C
  71. #endif /* MRCP_SOFIASIP_CLIENT_AGENT_H */