Functions

cr_func.h File Reference

Routing and balancing functions. More...

#include "../../parser/msg_parser.h"
#include "../../pvar.h"
#include "../../mod_fix.h"
#include "prime_hash.h"
Include dependency graph for cr_func.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions


Detailed Description

Definition in file cr_func.h.


Function Documentation

int cr_load_next_domain ( struct sip_msg _msg,
gparam_t *  _carrier,
gparam_t *  _domain,
gparam_t *  _prefix_matching,
gparam_t *  _host,
gparam_t *  _reply_code,
gparam_t *  _dstavp 
)
Parameters:
_msg the current SIP message
_carrier the requested carrier
_domain the requested routing domain
_prefix_matching the user to be used for prefix matching
_host the host name to be used for rule matching
_reply_code the reply code to be used for rule matching
_dstavp the name of the destination AVP
Returns:
1 on success, -1 on failure

Definition at line 731 of file cr_func.c.

References route_data_t::carrier_map, route_data_t::carrier_num, cr_gp2id(), route_data_t::domain_map, route_data_t::domain_num, domain_data_t::failure_tree, fixup_get_svalue, get_carrier_data(), get_data(), get_domain_data(), _str::len, release_data(), _str::s, and set_next_domain_recursor().

Here is the call graph for this function:

int cr_load_user_carrier ( struct sip_msg _msg,
gparam_t *  _user,
gparam_t *  _domain,
gparam_t *  _dstavp 
)
Parameters:
_msg the current SIP message
_user the user to determine the carrier data
_domain the domain to determine the domain data
_dstavp the name of the AVP where to store the carrier id
Returns:
1 on success, -1 on failure

Definition at line 623 of file cr_func.c.

References fixup_get_svalue.

int cr_nofallback_route ( struct sip_msg _msg,
gparam_t *  _carrier,
gparam_t *  _domain,
gparam_t *  _prefix_matching,
gparam_t *  _rewrite_user,
enum hash_source  _hsrc,
gparam_t *  _dstavp 
)

The difference to cr_route is that no fallback rule is chosen if there is something wrong (behaves like now obselete cr_prime_route)

Parameters:
_msg the current SIP message
_carrier the requested carrier
_domain the requested routing domain
_prefix_matching the user to be used for prefix matching
_rewrite_user the localpart of the URI to be rewritten
_hsrc the SIP header used for hashing
_dstavp the name of the destination AVP where the used host name is stored
Returns:
1 on success, -1 on failure

The difference to cr_route is that no fallback rule is chosen if there is something wrong (like now obselete cr_prime_route)

Parameters:
_msg the current SIP message
_carrier the requested carrier
_domain the requested routing domain
_prefix_matching the user to be used for prefix matching
_rewrite_user the localpart of the URI to be rewritten
_hsrc the SIP header used for hashing
_dstavp the name of the destination AVP where the used host name is stored
Returns:
1 on success, -1 on failure

Definition at line 700 of file cr_func.c.

References alg_crc32_nofallback, and cr_do_route().

Here is the call graph for this function:

int cr_route ( struct sip_msg _msg,
gparam_t *  _carrier,
gparam_t *  _domain,
gparam_t *  _prefix_matching,
gparam_t *  _rewrite_user,
enum hash_source  _hsrc,
gparam_t *  _descavp 
)
Parameters:
_msg the current SIP message
_carrier the requested carrier
_domain the requested routing domain
_prefix_matching the user to be used for prefix matching
_rewrite_user the localpart of the URI to be rewritten
_hsrc the SIP header used for hashing
_descavp the name of the AVP where the description is stored
Returns:
1 on success, -1 on failure

rewrites the request URI of msg after determining the new destination URI

Parameters:
_msg the current SIP message
_carrier the requested carrier
_domain the requested routing domain
_prefix_matching the user to be used for prefix matching
_rewrite_user the localpart of the URI to be rewritten
_hsrc the SIP header used for hashing
_descavp the name of the AVP where the description is stored
Returns:
1 on success, -1 on failure

Definition at line 666 of file cr_func.c.

References alg_crc32, and cr_do_route().

Here is the call graph for this function: