enum.h

Go to the documentation of this file.
00001 /*
00002  * $Id: enum.h 4518 2008-07-28 15:39:28Z henningw $
00003  *
00004  * Header file for Enum and E164 related functions
00005  *
00006  * Copyright (C) 2002-2008 Juha Heinanen
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  */
00024 
00025 
00026 #ifndef ENUM_H
00027 #define ENUM_H
00028 
00029 
00030 #include "../../parser/msg_parser.h"
00031 
00032 
00033 #define MAX_DOMAIN_SIZE 256
00034 #define MAX_COMPONENT_SIZE 32  /* separator, apex, ... This simplifies checks */
00035       
00036 
00037 /*
00038  * Check if from user is an e164 number and has a naptr record
00039  */
00040 int is_from_user_enum_0(struct sip_msg* _msg, char* _str1, char* _str2);
00041 int is_from_user_enum_1(struct sip_msg* _msg, char* _suffix, char* _str2);
00042 int is_from_user_enum_2(struct sip_msg* _msg, char* _suffix, char* _service);
00043 
00044 /*
00045  * do source number destination routing.
00046  * that is, make the ruri based on the from number
00047  * this is like source ip policy routing
00048  */
00049 int enum_pv_query_1(struct sip_msg* _msg, char* _sp);
00050 int enum_pv_query_2(struct sip_msg* _msg, char* _sp, char* _suffix);
00051 int enum_pv_query_3(struct sip_msg* _msg, char* _sp, char* _suffix,
00052           char* _service);
00053 
00054 /*
00055  * Make enum query and if query succeeds, replace current uri with the
00056  * result of the query
00057  */
00058 int enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
00059 int enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
00060 int enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
00061 
00062 /*
00063  * Infrastructure ENUM versions.
00064  */
00065 int i_enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2);
00066 int i_enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2);
00067 int i_enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service);
00068 
00069 
00070 #endif /* ENUM_H */

Generated on Wed May 23 06:00:45 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6