rpid.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * $Id$
  3. *
  4. * Copyright (C) 2001-2003 FhG Fokus
  5. *
  6. * This file is part of Kamailio, a free SIP server.
  7. *
  8. * Kamailio is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version
  12. *
  13. * Kamailio is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  21. *
  22. * History:
  23. * --------
  24. * 2003-04-28 rpid contributed by Juha Heinanen added (janakj)
  25. * 2005-05-31 general avp specification added for rpid (bogdan)
  26. */
  27. /*!
  28. * \file
  29. * \brief Remote-Party-ID related functions
  30. * \ingroup auth
  31. * - Module: \ref auth
  32. */
  33. #ifndef RPID_H
  34. #define RPID_H
  35. #include "../../parser/msg_parser.h"
  36. #include "../../str.h"
  37. #include "../../usr_avp.h"
  38. /*!
  39. * \brief Parse and set the RPID AVP specs
  40. * \param rpid_avp_param RPID AVP parameter
  41. * \return 0 on success, -1 on failure
  42. */
  43. int init_rpid_avp(char *rpid_avp_param);
  44. /*!
  45. * \brief Gets the RPID avp specs
  46. * \param rpid_avp_p AVP name
  47. * \param rpid_avp_type_p AVP type
  48. */
  49. void get_rpid_avp( int_str *rpid_avp_p, int *rpid_avp_type_p );
  50. /*!
  51. * \brief Append RPID header field to the message
  52. * \param _m SIP message
  53. * \param _s1 unused
  54. * \param _s2 unused
  55. * \return 1 on success, -1 on failure
  56. */
  57. int append_rpid_hf(struct sip_msg* _m, char* _s1, char* _s2);
  58. /*!
  59. * \brief Append RPID header field to the message with parameters
  60. * \param _m SIP message
  61. * \param _prefix prefix
  62. * \param _suffix suffix
  63. * \return 1 on success, -1 on failure
  64. */
  65. int append_rpid_hf_p(struct sip_msg* _m, char* _prefix, char* _suffix);
  66. /*!
  67. * \brief Check if URI in RPID AVP contains an E164 user part
  68. * \param _m SIP message
  69. * \param _s1 unused
  70. * \param _s2 unused
  71. * \return 1 if the URI contains an E164 user part, -1 if not
  72. */
  73. int is_rpid_user_e164(struct sip_msg* _m, char* _s1, char* _s2);
  74. #endif