35 pjsip_uri *from = rdata->msg_info.from->uri;
36 pjsip_sip_uri *sip_from;
37 if (!PJSIP_URI_SCHEME_IS_SIP(from) && !PJSIP_URI_SCHEME_IS_SIPS(from)) {
40 sip_from = (pjsip_sip_uri *) pjsip_uri_get_uri(from);
48 pjsip_rx_data *rdata = arg;
50 if (transport_state->
transport == rdata->tp_info.transport
52 && !pj_strcmp(&transport_state->
factory->addr_name.host, &rdata->tp_info.transport->local_name.host)
53 && transport_state->
factory->addr_name.port == rdata->tp_info.transport->local_name.port)) {
60 #define DOMAIN_NAME_LEN 255 79 snprintf(
id,
sizeof(
id),
"anonymous@%s", domain_name);
89 snprintf(
id,
sizeof(
id),
"anonymous@%s", alias->
domain);
102 snprintf(
id,
sizeof(
id),
"anonymous@%s", transport->
domain);
143 .requires =
"res_pjsip",
Asterisk main include file. File version handling, generic pbx functions.
#define ao2_callback(c, flags, cb_fn, arg)
static struct ast_sip_endpoint * anonymous_identify(pjsip_rx_data *rdata)
static struct ao2_container * transport_states
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.
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...
#define ast_strlen_zero(foo)
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 struct ast_sip_endpoint_identifier anonymous_identifier
#define ast_debug(level,...)
Log a DEBUG message.
Structure for SIP transport information.
struct pjsip_transport * transport
Transport itself.
#define ao2_ref(o, delta)
const char * ast_sorcery_object_get_id(const void *object)
Get the unique identifier of a sorcery object.
unsigned int ast_sip_get_disable_multi_domain(void)
Retrieve the system setting 'disable multi domain'.
An entity with which Asterisk communicates.
static int load_module(void)
struct ao2_container * ast_sip_get_transport_states(void)
Retrieves all transport states.
static int find_transport_state_in_use(void *obj, void *arg, int flags)
struct pjsip_tpfactory * factory
Transport factory.
const ast_string_field domain
static int unload_module(void)
An entity responsible for identifying the source of a SIP message.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
static int get_endpoint_details(pjsip_rx_data *rdata, char *domain, size_t domain_size)
const ast_string_field domain
struct ast_sorcery * ast_sip_get_sorcery(void)
Get a pointer to the SIP sorcery structure.
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.
void ast_sip_unregister_endpoint_identifier(struct ast_sip_endpoint_identifier *identifier)
Unregister a SIP endpoint identifier.
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.