67 *path_str = pj_strdup3(pool, contact->
path);
73 pjsip_supported_hdr *hdr;
76 hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_SUPPORTED,
NULL);
79 hdr = pjsip_supported_hdr_create(tdata->pool);
84 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr *)hdr);
88 for (i = 0; i < hdr->count; ++i) {
94 if (hdr->count >= PJSIP_GENERIC_ARRAY_MAX_COUNT) {
122 if (!aor || !aor->support_path) {
150 struct pjsip_status_line
status = tdata->msg->line.status;
152 pjsip_generic_string_hdr *path_hdr;
154 pjsip_cseq_hdr *cseq = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CSEQ,
NULL);
155 const pj_str_t REGISTER_METHOD = {
"REGISTER", 8};
158 || !pj_stristr(®ISTER_METHOD, &cseq->method.name)
159 || !PJSIP_IS_STATUS_IN_CLASS(
status.code, 200)) {
169 path_hdr = pjsip_generic_string_hdr_create(tdata->pool, &
PATH_NAME, &path_dup);
174 pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)path_hdr);
214 .
requires =
"res_pjsip,res_pjsip_session",
Asterisk main include file. File version handling, generic pbx functions.
static struct ast_mansession session
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
void ast_sip_unregister_supplement(struct ast_sip_supplement *supplement)
Unregister a an supplement to SIP out of dialog processing.
struct ast_sip_aor * ast_sip_location_retrieve_aor(const char *aor_name)
Retrieve a named AOR.
void ast_sip_register_supplement(struct ast_sip_supplement *supplement)
Register a supplement to SIP out of dialog processing.
@ AST_SIP_SUPPLEMENT_PRIORITY_CHANNEL
int ast_sip_set_outbound_proxy(pjsip_tx_data *tdata, const char *proxy)
Set the outbound proxy for an outbound SIP message.
static void path_outgoing_response(struct ast_sip_endpoint *endpoint, struct ast_sip_contact *contact, pjsip_tx_data *tdata)
static void path_session_outgoing_response(struct ast_sip_session *session, pjsip_tx_data *tdata)
static struct ast_sip_aor * find_aor(struct ast_sip_contact *contact)
static struct ast_sip_supplement path_supplement
static int path_get_string(pj_pool_t *pool, struct ast_sip_contact *contact, pj_str_t *path_str)
Get the path string associated with this contact and tdata.
static int add_supported(pjsip_tx_data *tdata)
static void path_session_outgoing_request(struct ast_sip_session *session, pjsip_tx_data *tdata)
static void path_outgoing_request(struct ast_sip_endpoint *endpoint, struct ast_sip_contact *contact, pjsip_tx_data *tdata)
static const pj_str_t PATH_NAME
static pj_str_t PATH_SUPPORTED_NAME
static struct ast_sip_session_supplement path_session_supplement
static int load_module(void)
static int unload_module(void)
#define ast_sip_session_register_supplement(supplement)
void ast_sip_session_unregister_supplement(struct ast_sip_session_supplement *supplement)
Unregister a an supplement to SIP session processing.
String manipulation functions.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
An entity with which Asterisk communicates.
A supplement to SIP message processing.
enum ast_sip_supplement_priority priority
A structure describing a SIP session.
A supplement to SIP message processing.
enum ast_sip_supplement_priority priority
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.