00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef _OSP_MOD_SIPHEADER_H_
00037 #define _OSP_MOD_SIPHEADER_H_
00038
00039 #include <osp/osp.h>
00040 #include "../../parser/msg_parser.h"
00041
00042 #define OSP_TOKEN_HEADER "P-OSP-Auth-Token: "
00043 #define OSP_HEADER_SIZE strlen(OSP_TOKEN_HEADER)
00044
00045 void ospCopyStrToBuffer(str* source, char* buffer, int buffersize);
00046 int ospGetFromUserpart(struct sip_msg* msg, char* fromuser, int buffersize);
00047 int ospGetRpidUserpart(struct sip_msg* msg, char* fromuser, int buffersize);
00048 int ospGetToUserpart(struct sip_msg* msg, char* touser, int buffersize);
00049 int ospGetUriUserpart(struct sip_msg* msg, char* touser, int buffersize);
00050 int ospAddOspHeader(struct sip_msg* msg, unsigned char* token, unsigned int tokensize);
00051 int ospGetOspHeader(struct sip_msg* msg, unsigned char* token, unsigned int* tokensize);
00052 int ospGetSourceAddress(struct sip_msg* msg, char* sourceaddress, int buffersize);
00053 int ospGetCallId(struct sip_msg* msg, OSPTCALLID** callid);
00054 int ospGetRouteParameters(struct sip_msg* msg, char* routeparams, int buffersize);
00055 int ospRebuildDestionationUri(str* newuri, char* called, char* dest, char* port, int format);
00056 void ospGetNextHop(struct sip_msg* msg, char* nexthop, int buffersize);
00057 int ospGetDirection(struct sip_msg* msg);
00058
00059 #endif
00060