sip_utils.h 927 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef __COMMON_SIP_UTILS_H
  2. #define __COMMON_SIP_UTILS_H
  3. #ifdef SER /* SER only helper routines */
  4. #include <parser/msg_parser.h>
  5. /* returns negative value on error, positive when message contains
  6. * no Expires header and 0 if everything ok */
  7. int get_expiration_value(struct sip_msg *m, int *value);
  8. /* returns 1 if the message has Subscription-Status: terminated (hack!) */
  9. int is_terminating_notify(struct sip_msg *m);
  10. /* returns 1 if given extension is in Supported headers,
  11. * 0 if not or an error occured while parsing */
  12. int supports_extension(struct sip_msg *m, str *extension);
  13. /* returns 1 if given extension is in Require headers,
  14. * 0 if not or an error occured while parsing */
  15. int requires_extension(struct sip_msg *m, str *extension);
  16. /**
  17. * Verifies presence of the To-tag in message. Returns 1 if
  18. * the tag is present, 0 if not, -1 on error.
  19. */
  20. int has_to_tag(struct sip_msg *_m);
  21. #endif
  22. #endif