19#ifndef _RES_PJSIP_REDIRECT_H
20#define _RES_PJSIP_REDIRECT_H
27#define AST_SIP_MAX_REDIRECT_HOPS 5
32#define AST_SIP_MAX_REDIRECT_CONTACTS 20
56 const char *initial_uri);
int ast_sip_should_redirect(struct ast_sip_endpoint *endpoint, pjsip_rx_data *rdata)
Check if redirect should be followed based on endpoint configuration.
int ast_sip_redirect_parse_3xx(pjsip_rx_data *rdata, struct ast_sip_redirect_state *state)
Parse a 3xx redirect response and extract contacts.
int ast_sip_redirect_check_loop(const struct ast_sip_redirect_state *state, const char *uri)
Check if a URI would create a redirect loop.
int ast_sip_redirect_get_next_uri(struct ast_sip_redirect_state *state, char **uri_out)
Get the next redirect URI to try.
struct ast_sip_endpoint * ast_sip_redirect_get_endpoint(const struct ast_sip_redirect_state *state)
Get the endpoint from the redirect state.
int ast_sip_redirect_get_hop_count(const struct ast_sip_redirect_state *state)
Get the current hop count.
void ast_sip_redirect_state_destroy(struct ast_sip_redirect_state *state)
Destroy a redirect state and free all resources.
struct ast_sip_redirect_state * ast_sip_redirect_state_create(struct ast_sip_endpoint *endpoint, const char *initial_uri)
Create a new redirect state.
An entity with which Asterisk communicates.
Redirect state structure.
struct ast_sip_endpoint * endpoint