sip_utils.h

00001 #ifndef __COMMON_SIP_UTILS_H
00002 #define __COMMON_SIP_UTILS_H
00003 
00004 #ifdef SER /* SER only helper routines */
00005 
00006 #include <parser/msg_parser.h>
00007 
00008 /* returns negative value on error, positive when message contains 
00009  * no Expires header and 0 if everything ok */
00010 int get_expiration_value(struct sip_msg *m, int *value);
00011 
00012 /* returns 1 if the message has Subscription-Status: terminated (hack!) */
00013 int is_terminating_notify(struct sip_msg *m);
00014 
00015 /* returns 1 if given extension is in Supported headers, 
00016  * 0 if not or an error occured while parsing */
00017 int supports_extension(struct sip_msg *m, str *extension);
00018 
00019 /* returns 1 if given extension is in Require headers, 
00020  * 0 if not or an error occured while parsing */
00021 int requires_extension(struct sip_msg *m, str *extension);
00022 
00027 int has_to_tag(struct sip_msg *_m);
00028 
00029 #endif
00030 
00031 #endif