41 if (pjsip_dlg_create_response(
session->inv_session->dlg, rdata, code,
NULL, &tdata) == PJ_SUCCESS) {
42 struct pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata);
44 pjsip_dlg_send_response(
session->inv_session->dlg, tsx, tdata);
50 static const pj_str_t rec_str = {
"Record", 6 };
51 pjsip_generic_string_hdr *record;
57 record = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &rec_str,
NULL);
64 if (!pj_stricmp2(&record->hvalue,
"on")) {
65 feature =
session->endpoint->info.recording.onfeature;
66 }
else if (!pj_stricmp2(&record->hvalue,
"off")) {
67 feature =
session->endpoint->info.recording.offfeature;
127 .
requires =
"res_pjsip,res_pjsip_session",
Asterisk main include file. File version handling, generic pbx functions.
static struct ast_mansession session
#define ast_channel_lock(chan)
int ast_queue_frame(struct ast_channel *chan, struct ast_frame *f)
Queue one or more frames to a channel's frame queue.
#define ast_channel_unlock(chan)
Call Parking and Pickup API Includes code and algorithms from the Zapata library.
#define AST_FEATURE_MAX_LEN
int ast_get_feature(struct ast_channel *chan, const char *feature, char *buf, size_t len)
Get the DTMF code for a call feature.
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
@ AST_SIP_SUPPLEMENT_PRIORITY_FIRST
static void send_response(struct ast_sip_session *session, int code, struct pjsip_rx_data *rdata)
static int handle_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
static int load_module(void)
static int unload_module(void)
static struct ast_sip_session_supplement info_supplement
#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.
static force_inline int attribute_pure ast_strlen_zero(const char *s)
Data structure associated with a single frame of data.
A supplement to SIP message processing.
A structure describing a SIP session.