Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#include "asterisk.h"
#include "asterisk/res_pjsip_session.h"
#include "asterisk/utils.h"
#include "pjsip_session.h"
Go to the source code of this file.
Data Structures | |
struct | return_reason_data |
Macros | |
#define | RETURN_REASON_DATASTORE_NAME "pjsip_session_return_reason" |
Functions | |
int | ast_sip_session_add_reason_header (struct ast_sip_session *session, const char *protocol, int code, const char *text) |
Adds a Reason header in the next reponse to an incoming INVITE. More... | |
void | pjsip_reason_header_load (void) |
void | pjsip_reason_header_unload (void) |
static void | reason_header_outgoing_response (struct ast_sip_session *session, struct pjsip_tx_data *tdata) |
static void | return_reason_destructor (void *obj) |
Variables | |
static const pj_str_t | reason_hdr_str = { "Reason", 6} |
static struct ast_sip_session_supplement | reason_header_supplement |
static struct ast_datastore_info | return_reason_info |
#define RETURN_REASON_DATASTORE_NAME "pjsip_session_return_reason" |
Definition at line 43 of file pjsip_session_reason_header.c.
int ast_sip_session_add_reason_header | ( | struct ast_sip_session * | session, |
const char * | protocol, | ||
int | code, | ||
const char * | text | ||
) |
Adds a Reason header in the next reponse to an incoming INVITE.
session | The session |
protocol | Usually "SIP" but may be "STIR" for stir-shaken |
code | SIP response code |
text | Reason string |
0 | the header is accepted |
-1 | the header is rejected |
Definition at line 123 of file pjsip_session_reason_header.c.
References ao2_cleanup, ast_calloc, ast_sip_session_add_datastore(), ast_sip_session_alloc_datastore(), ast_sip_session_get_name(), ast_strdup, ast_strlen_zero(), NULL, return_reason_data::protocol, RAII_VAR, return_reason_data::response_code, return_reason_data::response_str, return_reason_info, S_OR, SCOPE_ENTER, SCOPE_EXIT_RTN_VALUE, session, text, and ast_datastore_info::type.
Referenced by process_failure().
void pjsip_reason_header_load | ( | void | ) |
Definition at line 165 of file pjsip_session_reason_header.c.
References ast_sip_session_register_supplement, and reason_header_supplement.
Referenced by load_module().
void pjsip_reason_header_unload | ( | void | ) |
Definition at line 160 of file pjsip_session_reason_header.c.
References ast_sip_session_unregister_supplement(), and reason_header_supplement.
Referenced by unload_module().
|
static |
Definition at line 49 of file pjsip_session_reason_header.c.
References return_reason_data::already_sent, ao2_cleanup, ast_asprintf, ast_free, ast_sip_session_get_datastore(), ast_sip_session_get_name(), ast_sip_session_remove_datastore(), ast_trace, NULL, PJSTR_PRINTF_SPEC, PJSTR_PRINTF_VAR, return_reason_data::protocol, RAII_VAR, reason_hdr_str, return_reason_data::response_code, return_reason_data::response_str, RETURN_REASON_DATASTORE_NAME, SCOPE_ENTER, SCOPE_EXIT_RTN, session, and status.
|
static |
Definition at line 33 of file pjsip_session_reason_header.c.
References ast_free, return_reason_data::protocol, return_reason_data::response_str, SCOPE_ENTER, and SCOPE_EXIT.
|
static |
Definition at line 24 of file pjsip_session_reason_header.c.
Referenced by reason_header_outgoing_response().
|
static |
Definition at line 154 of file pjsip_session_reason_header.c.
Referenced by pjsip_reason_header_load(), and pjsip_reason_header_unload().
|
static |
Definition at line 44 of file pjsip_session_reason_header.c.
Referenced by ast_sip_session_add_reason_header().