35 pjsip_uri *from = rdata->msg_info.from->uri;
46 pjsip_rx_data *rdata = arg;
48 if (transport_state->
transport == rdata->tp_info.transport
50 && !pj_strcmp(&transport_state->
factory->addr_name.host, &rdata->tp_info.transport->local_name.host)
51 && transport_state->
factory->addr_name.port == rdata->tp_info.transport->local_name.port)) {
58#define DOMAIN_NAME_LEN 255
77 snprintf(
id,
sizeof(
id),
"anonymous@%s", domain_name);
87 snprintf(
id,
sizeof(
id),
"anonymous@%s", alias->
domain);
100 snprintf(
id,
sizeof(
id),
"anonymous@%s", transport->
domain);
141 .
requires =
"res_pjsip",
Asterisk main include file. File version handling, generic pbx functions.
#define ao2_callback(c, flags, cb_fn, arg)
ao2_callback() is a generic function that applies cb_fn() to all objects in a container,...
#define ao2_ref(o, delta)
Reference/unreference an object and return the old refcount.
static struct ao2_container * transport_states
#define ast_debug(level,...)
Log a DEBUG message.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
struct ao2_container * ast_sip_get_transport_states(void)
Retrieves all transport states.
int ast_sip_is_uri_sip_sips(pjsip_uri *uri)
Check whether a pjsip_uri is SIP/SIPS or not.
void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *identifier)
Unregister a SIP endpoint identifier.
void ast_copy_pj_str(char *dest, const pj_str_t *src, size_t size)
Copy a pj_str_t into a standard character buffer.
unsigned int ast_sip_get_disable_multi_domain(void)
Retrieve the system setting 'disable multi domain'.
int ast_sip_register_endpoint_identifier_with_name(struct ast_sip_endpoint_identifier *identifier, const char *name)
Register a SIP endpoint identifier with a name.
struct ast_sorcery * ast_sip_get_sorcery(void)
Get a pointer to the SIP sorcery structure.
const pj_str_t * ast_sip_pjsip_uri_get_hostname(pjsip_uri *uri)
Get the host portion of the pjsip_uri.
static struct ast_sip_endpoint * anonymous_identify(pjsip_rx_data *rdata)
static int get_endpoint_details(pjsip_rx_data *rdata, char *domain, size_t domain_size)
static struct ast_sip_endpoint_identifier anonymous_identifier
static int load_module(void)
static int find_transport_state_in_use(void *obj, void *arg, int flags)
static int unload_module(void)
const char * ast_sorcery_object_get_id(const void *object)
Get the unique identifier of a sorcery object.
void * ast_sorcery_retrieve_by_id(const struct ast_sorcery *sorcery, const char *type, const char *id)
Retrieve an object using its unique identifier.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
const ast_string_field domain
An entity responsible for identifying the source of a SIP message.
struct ast_sip_endpoint *(* identify_endpoint)(pjsip_rx_data *rdata)
Callback used to identify the source of a message. See ast_sip_identify_endpoint for more details.
An entity with which Asterisk communicates.
Structure for SIP transport information.
struct pjsip_tpfactory * factory
Transport factory.
struct pjsip_transport * transport
Transport itself.
const ast_string_field domain