michael@12: /* michael@12: * $Id: enum.h 5901 2009-07-21 07:45:05Z bogdan_iancu $ michael@12: * michael@12: * Header file for Enum and E164 related functions michael@12: * michael@12: * Copyright (C) 2002-2008 Juha Heinanen michael@12: * michael@12: * This file is part of opensips, a free SIP server. michael@12: * michael@12: * opensips is free software; you can redistribute it and/or modify michael@12: * it under the terms of the GNU General Public License as published by michael@12: * the Free Software Foundation; either version 2 of the License, or michael@12: * (at your option) any later version michael@12: * michael@12: * opensips is distributed in the hope that it will be useful, michael@12: * but WITHOUT ANY WARRANTY; without even the implied warranty of michael@12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the michael@12: * GNU General Public License for more details. michael@12: * michael@12: * You should have received a copy of the GNU General Public License michael@12: * along with this program; if not, write to the Free Software michael@12: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA michael@12: */ michael@12: michael@12: michael@12: #ifndef ENUM_H michael@12: #define ENUM_H michael@12: michael@12: michael@12: #include "../../parser/msg_parser.h" michael@12: michael@12: michael@12: #define MAX_DOMAIN_SIZE 256 michael@12: #define MAX_COMPONENT_SIZE 32 /* separator, apex, ... This simplifies checks */ michael@12: michael@12: michael@12: /* michael@12: * Check if from user is an e164 number and has a naptr record michael@12: */ michael@12: int is_from_user_enum_0(struct sip_msg* _msg, char* _str1, char* _str2); michael@12: int is_from_user_enum_1(struct sip_msg* _msg, char* _suffix, char* _str2); michael@12: int is_from_user_enum_2(struct sip_msg* _msg, char* _suffix, char* _service); michael@12: michael@12: /* michael@12: * do source number destination routing. michael@12: * that is, make the ruri based on the from number michael@12: * this is like source ip policy routing michael@12: */ michael@12: int enum_pv_query_1(struct sip_msg* _msg, char* _sp); michael@12: int enum_pv_query_2(struct sip_msg* _msg, char* _sp, char* _suffix); michael@12: int enum_pv_query_3(struct sip_msg* _msg, char* _sp, char* _suffix, michael@12: char* _service); michael@12: michael@12: /* michael@12: * Make enum query and if query succeeds, replace current uri with the michael@12: * result of the query michael@12: */ michael@12: int enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2); michael@12: int enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2); michael@12: int enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service); michael@12: michael@12: /* michael@12: * Infrastructure ENUM versions. michael@12: */ michael@12: int i_enum_query_0(struct sip_msg* _msg, char* _str1, char* _str2); michael@12: int i_enum_query_1(struct sip_msg* _msg, char* _suffix, char* _str2); michael@12: int i_enum_query_2(struct sip_msg* _msg, char* _suffix, char* _service); michael@12: michael@13: /* michael@13: * Make ISN query and if query succeeds, replace current uri with the michael@13: * result of the query michael@13: */ michael@13: int isn_query_0(struct sip_msg* _msg, char* _str1, char* _str2); michael@13: int isn_query_1(struct sip_msg* _msg, char* _suffix, char* _str2); michael@13: int isn_query_2(struct sip_msg* _msg, char* _suffix, char* _service); michael@13: michael@12: michael@12: #endif /* ENUM_H */