#include "../../parser/msg_parser.h"


Go to the source code of this file.
Defines | |
| #define | DP_DDDS_RET_DNSERROR -2 |
| #define | DP_DDDS_RET_NEGATIVE -1 |
| #define | DP_DDDS_RET_NOTFOUND 2 |
| #define | DP_DDDS_RET_POSITIVE 1 |
| #define | MAX_DDDS_RECURSIONS 5 |
| #define | MAX_DOMAIN_SIZE 512 |
Functions | |
| int | domainpolicy_db_bind (const str *db_url) |
| Bind the database interface. | |
| void | domainpolicy_db_close (void) |
| Close the database connection. | |
| int | domainpolicy_db_init (const str *db_url) |
| Initialize the database connection. | |
| int | domainpolicy_db_ver (const str *db_url, const str *name) |
| Check the database table version. | |
| int | dp_apply_policy (struct sip_msg *_msg, char *_s1, char *_s2) |
| Apply DP-DDDS policy to current SIP message. | |
| int | dp_can_connect (struct sip_msg *_msg, char *_s1, char *_s2) |
| Check if host in Request URI has DP-DDDS NAPTRs and if we can connect to them. | |
Definition in file domainpolicy.h.
| #define DP_DDDS_RET_DNSERROR -2 |
return codes of dp_can_connect negative values means false, 0 stops execution and discards the SIP request
Definition at line 48 of file domainpolicy.h.
Referenced by dp_can_connect_str().
| #define DP_DDDS_RET_NEGATIVE -1 |
| #define DP_DDDS_RET_NOTFOUND 2 |
| #define DP_DDDS_RET_POSITIVE 1 |
| #define MAX_DDDS_RECURSIONS 5 |
how many indirect DDDS naptr are we going to follow?
Definition at line 40 of file domainpolicy.h.
Referenced by dp_can_connect_str().
| #define MAX_DOMAIN_SIZE 512 |
maximal length of a domain string
Definition at line 37 of file domainpolicy.h.
Referenced by dp_can_connect(), enum_pv_query_3(), enum_query_2(), i_enum_query_2(), and is_from_user_enum_2().
| int domainpolicy_db_bind | ( | const str * | db_url | ) |
Bind the database interface.
| db_url | database url |
Definition at line 209 of file domainpolicy.c.
References db_bind_mod(), and LM_CRIT.
Referenced by mod_init().
| void domainpolicy_db_close | ( | void | ) |
Close the database connection.
Definition at line 245 of file domainpolicy.c.
References db_func::close.
| int domainpolicy_db_init | ( | const str * | db_url | ) |
Initialize the database connection.
| db_url | database url |
Definition at line 225 of file domainpolicy.c.
References db_func::init, and LM_CRIT.
Referenced by child_init().
Check the database table version.
| db_url | database URL | |
| name | table name |
Definition at line 260 of file domainpolicy.c.
References db_func::close, db_table_version(), db_func::init, and LM_CRIT.
Referenced by mod_init().
| int dp_apply_policy | ( | struct sip_msg * | _msg, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) |
Apply DP-DDDS policy to current SIP message.
Apply DP-DDDS policy to current SIP message. This means build a new destination URI from the policy AVP and export it as AVP. Then in kamailio.cfg this new target AVP can be pushed into the destination URI $duri
| _msg | SIP message | |
| _s1 | unused | |
| _s2 | unused |
Definition at line 811 of file domainpolicy.c.
References AVP_VAL_STR, domain, domain_prefix_avp_name_str, domain_prefix_name, domain_replacement_avp_name_str, domain_replacement_name, domain_suffix_avp_name_str, domain_suffix_name, usr_avp::flags, sip_msg::force_send_socket, grep_sock_info(), sip_uri::host, _str::len, len, LM_DBG, LM_ERR, LM_WARN, MAX_URI_SIZE, parse_phostport(), parse_sip_msg_uri(), sip_msg::parsed_uri, sip_uri::port, port, port_override_avp_name_str, port_override_name, REQUEST_ROUTE, route_type, _str::s, int_str::s, search_first_avp(), send_socket_avp_name_str, send_socket_name, set_dst_uri(), sip_uri::transport, transport_override_avp_name_str, transport_override_name, and ZSW.
| int dp_can_connect | ( | struct sip_msg * | _msg, | |
| char * | _s1, | |||
| char * | _s2 | |||
| ) |
Check if host in Request URI has DP-DDDS NAPTRs and if we can connect to them.
| _msg | SIP message | |
| _s1 | unused | |
| _s2 | unused |
Definition at line 762 of file domainpolicy.c.
References domain, dp_can_connect_str(), sip_uri::host, _str::len, LM_DBG, LM_ERR, MAX_DOMAIN_SIZE, parse_sip_msg_uri(), sip_msg::parsed_uri, REQUEST_ROUTE, route_type, _str::s, and ZSW.
1.5.6