81 .name = {
"REFER Progress", 14 },
95 pjsip_evsub_state
state)
144 pjsip_tx_data *tdata;
146 pjsip_dlg_inc_lock(notification->progress->dlg);
149 if (!(sub = notification->progress->sub)) {
150 ast_debug(3,
"Not sending NOTIFY of response '%d' and state '%u' on progress monitor '%p' as subscription has been terminated\n",
151 notification->response, notification->state, notification->progress);
152 pjsip_dlg_dec_lock(notification->progress->dlg);
157 if (!notification->progress->sent_100) {
158 notification->progress->sent_100 = 1;
159 if (notification->response != 100) {
160 ast_debug(3,
"Sending initial 100 Trying NOTIFY for progress monitor '%p'\n",
161 notification->progress);
162 if (pjsip_xfer_notify(sub, PJSIP_EVSUB_STATE_ACTIVE, 100,
NULL, &tdata) == PJ_SUCCESS) {
163 pjsip_xfer_send_request(sub, tdata);
168 ast_debug(3,
"Sending NOTIFY with response '%d' and state '%u' on subscription '%p' and progress monitor '%p'\n",
169 notification->response, notification->state, sub, notification->progress);
172 if (pjsip_xfer_notify(sub, notification->state, notification->response,
NULL, &tdata) == PJ_SUCCESS) {
173 pjsip_xfer_send_request(sub, tdata);
176 pjsip_dlg_dec_lock(notification->progress->dlg);
227 ast_debug(3,
"Detaching REFER progress monitoring hook from '%s' as it has joined a bridge\n",
282 if (notification->
state == PJSIP_EVSUB_STATE_TERMINATED) {
283 ast_debug(3,
"Detaching REFER progress monitoring hook from '%s' as subscription is being terminated\n",
331 if (progress && (pjsip_evsub_get_state(sub) == PJSIP_EVSUB_STATE_TERMINATED)) {
384 const pj_str_t str_refer_sub = {
"Refer-Sub", 9 };
385 pjsip_generic_string_hdr *refer_sub =
NULL;
386 const pj_str_t str_true = {
"true", 4 };
393 refer_sub = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_sub,
NULL);
394 if ((refer_sub && pj_strnicmp(&refer_sub->hvalue, &str_true, 4))) {
402 ast_debug(3,
"Created progress monitor '%p' for transfer occurring from channel '%s' and endpoint '%s'\n",
407 (*progress)->framehook = -1;
432 pj_list_init(&hdr_list);
434 pjsip_hdr *hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(session->
inv_session->dlg->pool, &str_refer_sub, &str_true);
436 pj_list_push_back(&hdr_list, hdr);
440 ast_debug(3,
"Accepting REFER request for progress monitor '%p'\n", *progress);
441 pjsip_xfer_accept((*progress)->sub, rdata, 202, &hdr_list);
491 ao2_ref(transferer_second, +1);
557 int (*task_cb)(
void *data);
560 ast_debug(3,
"Performing a REFER attended transfer - Transferer #1: %s Transferer #2: %s\n",
568 ast_debug(3,
"Final response for REFER attended transfer - Transferer #1: %s Transferer #2: %s is '%d'\n",
573 ast_debug(3,
"Received REFER request on channel '%s' but other channel has gone.\n",
582 PJSIP_EVSUB_STATE_TERMINATED);
590 if (response == 200) {
629 pjsip_generic_string_hdr *referred_by;
631 static const pj_str_t str_referred_by = {
"Referred-By", 11 };
632 static const pj_str_t str_referred_by_s = {
"b", 1 };
639 PJSIP_EVSUB_STATE_TERMINATED);
653 .disable_inheritance = 1,
659 PJSIP_EVSUB_STATE_TERMINATED);
661 ast_log(
LOG_WARNING,
"Could not copy channel name '%s' during transfer - assuming success\n",
672 ao2_ref(user_data_wrapper, +1);
684 PJSIP_EVSUB_STATE_TERMINATED);
686 ast_log(
LOG_WARNING,
"Could not attach REFER transfer progress monitoring hook to channel '%s' - assuming success\n",
706 PJSIP_EVSUB_STATE_TERMINATED);
708 ast_log(
LOG_WARNING,
"Could not create bridge stasis subscription for monitoring progress on transfer of channel '%s' - assuming success\n",
731 referred_by = pjsip_msg_find_hdr_by_names(refer->
rdata->msg_info.msg,
732 &str_referred_by, &str_referred_by_s,
NULL);
734 size_t uri_size = pj_strlen(&referred_by->hvalue) + 1;
745 char *replaces_val =
NULL;
748 len = pjsip_hdr_print_on(refer->
replaces, replaces,
sizeof(replaces) - 1);
751 replaces[
len] =
'\0';
752 replaces_val = replaces +
sizeof(
"Replaces:");
760 char refer_to[PJSIP_MAX_URL_SIZE];
762 pjsip_uri_print(PJSIP_URI_IN_REQ_URI, refer->
refer_to, refer_to,
sizeof(refer_to));
777 #define DETERMINE_TRANSFER_CONTEXT(context, session) \ 779 ast_channel_lock((session)->channel); \ 780 context = pbx_builtin_getvar_helper((session)->channel, "TRANSFER_CONTEXT"); \ 781 if (ast_strlen_zero(context)) { \ 782 context = (session)->endpoint->context; \ 784 context = ast_strdupa(context); \ 786 ast_channel_unlock((session)->channel); \ 792 const pj_str_t str_replaces = {
"Replaces", 8 };
793 pj_str_t replaces_content;
794 pjsip_replaces_hdr *replaces;
798 pj_strdup_with_null(rdata->tp_info.pool, &replaces_content, &replaces_param->value);
801 if (!(replaces = pjsip_parse_hdr(rdata->tp_info.pool, &str_replaces, replaces_content.ptr,
802 pj_strlen(&replaces_content), &parsed_len))) {
803 ast_log(
LOG_ERROR,
"Received REFER request on channel '%s' from endpoint '%s' with invalid Replaces header, rejecting\n",
809 if ((dlg = pjsip_ua_find_dialog(&replaces->call_id, &replaces->to_tag, &replaces->from_tag, PJ_TRUE))) {
813 pjsip_dlg_dec_lock(dlg);
815 if (!other_session) {
816 ast_debug(3,
"Received REFER request on channel '%s' from endpoint '%s' for local dialog but no session exists on it\n",
823 ast_log(
LOG_ERROR,
"Received REFER request on channel '%s' from endpoint '%s' for local dialog but could not allocate structure to complete, rejecting\n",
829 ast_log(
LOG_ERROR,
"Received REFER request on channel '%s' from endpoint '%s' for local dialog but could not defer termination, rejecting\n",
843 ast_debug(3,
"Attended transfer from '%s' pushed to second channel serializer\n",
855 ast_log(
LOG_ERROR,
"Received REFER for remote session on channel '%s' from endpoint '%s' but 'external_replaces' extension not found in context %s\n",
868 ast_log(
LOG_ERROR,
"Received REFER for remote session on channel '%s' from endpoint '%s' but could not defer termination, rejecting\n",
878 if (response != 200) {
909 ast_debug(3,
"Channel '%s' from endpoint '%s' attempted blind transfer to a target without extension. Target was set to 's@%s'\n",
914 ast_log(
LOG_ERROR,
"Channel '%s' from endpoint '%s' attempted blind transfer to '%s@%s' but target does not exist\n",
926 ast_log(
LOG_ERROR,
"Channel '%s' from endpoint '%s' attempted blind transfer but could not defer termination, rejecting\n",
936 if (response != 200) {
971 pjsip_dialog *other_dlg =
NULL;
972 pjsip_tx_data *packet;
978 if (pjsip_replaces_verify_request(rdata, &other_dlg, PJ_TRUE, &packet) != PJ_SUCCESS) {
979 response = packet->msg->line.status.code;
981 pjsip_tx_data_dec_ref(packet);
982 goto inv_replace_failed;
991 pjsip_dlg_dec_lock(other_dlg);
994 if (session->
inv_session->dlg->state == PJSIP_DIALOG_STATE_ESTABLISHED) {
996 goto inv_replace_failed;
999 if (!other_session) {
1000 ast_debug(3,
"INVITE with Replaces received on channel '%s' from endpoint '%s', but requested session does not exist\n",
1003 goto inv_replace_failed;
1006 invite.
session = other_session;
1011 goto inv_replace_failed;
1019 ast_debug(3,
"INVITE with Replaces being attempted. '%s' --> '%s'\n",
1056 ast_debug(3,
"INVITE with Replaces successfully completed.\n");
1058 ast_debug(3,
"INVITE with Replaces failed on channel '%s', hanging up with cause '%d'\n",
1069 if (session->
inv_session->dlg->state != PJSIP_DIALOG_STATE_ESTABLISHED) {
1070 ast_debug(3,
"INVITE with Replaces failed on channel '%s', sending response of '%d'\n",
1075 if (pjsip_inv_end_session(session->
inv_session, response,
NULL, &packet) == PJ_SUCCESS
1080 ast_debug(3,
"INVITE with Replaces in-dialog on channel '%s', hanging up\n",
1090 pjsip_generic_string_hdr *refer_to;
1094 pjsip_sip_uri *target_uri;
1096 pjsip_param *replaces;
1099 static const pj_str_t str_refer_to = {
"Refer-To", 8 };
1100 static const pj_str_t str_refer_to_s = {
"r", 1 };
1101 static const pj_str_t str_replaces = {
"Replaces", 8 };
1106 ast_debug(3,
"Received a REFER on a session with no channel from endpoint '%s'.\n",
1119 refer_to = pjsip_msg_find_hdr_by_names(rdata->msg_info.msg, &str_refer_to, &str_refer_to_s,
NULL);
1122 ast_debug(3,
"Received a REFER without Refer-To on channel '%s' from endpoint '%s'\n",
1131 uri_size = pj_strlen(&refer_to->hvalue) + 1;
1135 target = pjsip_parse_uri(rdata->tp_info.pool, uri, uri_size - 1, 0);
1138 || (!PJSIP_URI_SCHEME_IS_SIP(target)
1139 && !PJSIP_URI_SCHEME_IS_SIPS(target))) {
1142 ast_debug(3,
"Received a REFER without a parseable Refer-To ('%s') on channel '%s' from endpoint '%s'\n",
1146 target_uri = pjsip_uri_get_uri(target);
1151 ast_debug(3,
"Could not set up subscription for REFER on channel '%s' from endpoint '%s'\n",
1157 if ((replaces = pjsip_param_find(&target_uri->header_param, &str_replaces)) ||
1158 (replaces = pjsip_param_find(&target_uri->other_param, &str_replaces))) {
1166 pjsip_tx_data *tdata;
1167 const pj_str_t str_refer_sub = {
"Refer-Sub", 9 };
1168 const pj_str_t str_false = {
"false", 5 };
1171 ast_debug(3,
"Progress monitoring not requested for REFER on channel '%s' from endpoint '%s', sending immediate response of '%d'\n",
1174 if (pjsip_dlg_create_response(session->
inv_session->dlg, rdata, response,
NULL, &tdata) != PJ_SUCCESS) {
1179 hdr = (pjsip_hdr*)pjsip_generic_string_hdr_create(tdata->pool, &str_refer_sub, &str_false);
1180 pjsip_msg_add_hdr(tdata->msg, hdr);
1182 pjsip_dlg_send_response(session->
inv_session->dlg, pjsip_rdata_get_tsx(rdata), tdata);
1183 }
else if (response != 200) {
1200 if (!pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, pjsip_get_refer_method())) {
1202 }
else if (!pjsip_method_cmp(&rdata->msg_info.msg->line.req.method, &pjsip_invite_method)) {
1225 const char *var_value;
1226 pj_str_t pj_header_name;
1234 pj_cstr(&pj_header_name, header_name);
1235 header = pjsip_msg_find_hdr_by_name(tdata->msg, &pj_header_name,
NULL);
1244 if (pjsip_method_cmp(&tdata->msg->line.req.method, &pjsip_invite_method)
1246 || session->
inv_session->state != PJSIP_INV_STATE_NULL) {
1264 const pj_str_t str_norefersub = {
"norefersub", 10 };
1294 .requires =
"res_pjsip,res_pjsip_session,res_pjsip_pubsub",
int ast_queue_hangup(struct ast_channel *chan)
Queue a hangup frame.
pjsip_rx_data * rdata
Received packet, used to construct final response in case no subscription exists. ...
enum sip_cc_notify_state state
#define ast_channel_lock(chan)
static char exten[AST_MAX_EXTENSION]
Main Channel structure associated with a channel.
struct ast_sip_endpoint * endpoint
#define AST_SIP_USER_OPTIONS_TRUNCATE_CHECK(str)
Truncate the URI user field options string if enabled.
void ast_taskprocessor_build_name(char *buf, unsigned int size, const char *format,...)
Build a taskprocessor name with a sequence number on the end.
struct refer_progress * progress
Refer progress structure to send notification on.
int subclass
Last received subclass in frame hook.
struct ast_channel_snapshot_base * base
Asterisk main include file. File version handling, generic pbx functions.
enum ast_transfer_result ast_bridge_transfer_attended(struct ast_channel *to_transferee, struct ast_channel *to_transfer_target)
Attended transfer.
struct refer_progress * progress
Optional refer progress structure.
struct ast_sip_session * transferer
Transferer session.
struct ast_sip_session * transferer_second
Second transferer session.
struct stasis_message_type * ast_channel_entered_bridge_type(void)
Message type for channel enter bridge blob messages.
struct ast_channel_snapshot * channel
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_taskprocessor * serializer
Serializer for notifications.
static struct ast_sip_session_supplement refer_supplement
void ast_channel_hangupcause_set(struct ast_channel *chan, int value)
unsigned int defer_terminate
pjsip_evsub * sub
Subscription to provide updates on.
struct stasis_subscription * bridge_sub
Stasis subscription for bridge events.
static void refer_progress_notification_destroy(void *obj)
Destructor for REFER Progress notification structure.
static struct ast_frame * refer_progress_framehook(struct ast_channel *chan, struct ast_frame *f, enum ast_framehook_event event, void *data)
Progress monitoring frame hook - examines frames to determine state of transfer.
struct transfer_channel_data * transfer_data
Reference to transfer_channel_data related to the refer.
ast_framehook_event
These are the types of events that the framehook's event callback can receive.
Structure used to retrieve channel from another session.
static int load_module(void)
Structure for blind transfer callback details.
static int refer_incoming_attended_request(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_sip_uri *target_uri, pjsip_param *replaces_param, struct refer_progress *progress)
unsigned int ast_sip_get_norefersub(void)
Retrieve the global setting 'norefersub'.
static int dlg_releaser_task(void *data)
int ast_framehook_detach(struct ast_channel *chan, int framehook_id)
Detach an framehook from a channel.
static int refer_incoming_refer_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
Structure for attended transfer task.
static void refer_progress_bridge(void *data, struct stasis_subscription *sub, struct stasis_message *message)
static int refer_incoming_invite_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
struct stasis_message_type * stasis_message_type(const struct stasis_message *msg)
Get the message type for a stasis_message.
int framehook
Frame hook for monitoring REFER progress.
int stasis_subscription_set_filter(struct stasis_subscription *subscription, enum stasis_subscription_message_filter filter)
Set the message type filtering level on a subscription.
REFER Progress notification structure.
static int defer_termination_cancel_task(void *data)
const ast_string_field uniqueid
#define ao2_alloc_options(data_size, destructor_fn, options)
unsigned int refer_blind_progress
Whether to notifies all the progress details on blind transfer.
#define ast_strdup(str)
A wrapper for strdup()
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.
void ast_sip_session_unregister_supplement(struct ast_sip_session_supplement *supplement)
Unregister a an supplement to SIP session processing.
static void refer_attended_destroy(void *obj)
Destructor for attended transfer task.
int ast_channel_move(struct ast_channel *dest, struct ast_channel *source)
Move a channel from its current location to a new location.
#define AST_TASKPROCESSOR_MAX_NAME
Suggested maximum taskprocessor name length (less null terminator).
struct pjsip_inv_session * inv_session
static int refer_attended_task(void *data)
Task for attended transfer executed by attended->transferer_second serializer.
static void refer_blind_callback(struct ast_channel *chan, struct transfer_channel_data *user_data_wrapper, enum ast_transfer_type transfer_type)
Blind transfer callback function.
static int refer_incoming_request(struct ast_sip_session *session, pjsip_rx_data *rdata)
A structure describing a SIP session.
struct refer_progress * progress
Optional progress structure.
int ast_raw_answer(struct ast_channel *chan)
Answer a channel.
unsigned int attended
Attended transfer flag.
int ast_sip_add_header(pjsip_tx_data *tdata, const char *name, const char *value)
Add a header to an outbound SIP message.
const char * pbx_builtin_getvar_helper(struct ast_channel *chan, const char *name)
Return a pointer to the value of the corresponding channel variable.
struct ast_frame_subclass subclass
struct ast_bridge * bridge
Bridge the channel is in.
char * transferee
Uniqueid of transferee channel.
#define ast_strlen_zero(foo)
int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i)
Attach an framehook onto a channel for frame interception.
static pjsip_module refer_progress_module
REFER Progress module, used to attach REFER progress structure to subscriptions.
static int xfer_response_code2sip(enum ast_transfer_result xfer_code)
static int session_end_if_deferred_task(void *data)
#define ast_debug(level,...)
Log a DEBUG message.
struct ast_bridge * ast_bridge_transfer_acquire_bridge(struct ast_channel *chan)
Acquire the channel's bridge for transfer purposes.
const char * context
Context being used for transfer.
pjsip_sip_uri * refer_to
Optional Refer-To header.
enum ast_transfer_result ast_bridge_transfer_blind(int is_external, struct ast_channel *transferer, const char *exten, const char *context, transfer_channel_cb new_channel_cb, void *user_data)
Blind transfer target to the extension and context provided.
int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features, enum ast_bridge_impart_flags flags) attribute_warn_unused_result
Impart a channel to a bridge (non-blocking)
#define RAII_VAR(vartype, varname, initval, dtor)
Declare a variable that will call a destructor function when it goes out of scope.
static struct ast_mansession session
int ast_sip_push_task_wait_serializer(struct ast_taskprocessor *serializer, int(*sip_task)(void *), void *task_data)
Push a task to the serializer and wait for it to complete.
static struct refer_attended * refer_attended_alloc(struct ast_sip_session *transferer, struct ast_sip_session *transferer_second, struct refer_progress *progress)
Allocator for attended transfer task.
#define AST_MAX_EXTENSION
#define ast_channel_cleanup(c)
Cleanup a channel reference.
void ast_sip_session_defer_termination_cancel(struct ast_sip_session *session)
Cancel a pending deferred termination.
#define ao2_ref(o, delta)
const char * ast_sorcery_object_get_id(const void *object)
Get the unique identifier of a sorcery object.
struct ast_channel * channel
int ast_exists_extension(struct ast_channel *c, const char *context, const char *exten, int priority, const char *callerid)
Determine whether an extension exists.
Blob of data associated with a bridge.
#define DETERMINE_TRANSFER_CONTEXT(context, session)
void ast_sip_session_send_response(struct ast_sip_session *session, pjsip_tx_data *tdata)
Send a SIP response.
int ast_sip_register_service(pjsip_module *module)
Register a SIP service in Asterisk.
static void refer_progress_destroy(void *obj)
Destructor for REFER progress sutrcture.
static void refer_outgoing_request(struct ast_sip_session *session, struct pjsip_tx_data *tdata)
Core PBX routines and definitions.
static int invite_replaces(void *data)
Task for invite replaces.
struct ast_taskprocessor * serializer
struct ast_sip_session * session
Session we want the channel from.
#define ast_alloca(size)
call __builtin_alloca to ensure we get gcc builtin semantics
const char * ast_channel_uniqueid(const struct ast_channel *chan)
#define AST_CAUSE_FAILURE
Structure that contains information about a bridge.
static void add_header_from_channel_var(struct ast_channel *chan, const char *var_name, const char *header_name, pjsip_tx_data *tdata)
Use the value of a channel variable as the value of a SIP header.
static void refer_progress_on_evsub_state(pjsip_evsub *sub, pjsip_event *event)
Callback for REFER subscription state changes.
int ast_sip_thread_is_servant(void)
Determine if the current thread is a SIP servant thread.
int ast_sip_push_task(struct ast_taskprocessor *serializer, int(*sip_task)(void *), void *task_data)
Pushes a task to SIP servants.
void * stasis_message_data(const struct stasis_message *msg)
Get the data contained in a message.
#define AST_FRAMEHOOK_INTERFACE_VERSION
#define ast_module_shutdown_ref(mod)
Prevent unload of the module before shutdown.
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
pjsip_replaces_hdr * replaces
Optional Replaces header.
#define stasis_subscribe_pool(topic, callback, data)
enum ast_sip_supplement_priority priority
struct ast_taskprocessor * ast_sip_create_serializer(const char *name)
Create a new serializer for SIP tasks.
struct stasis_subscription * stasis_unsubscribe(struct stasis_subscription *subscription)
Cancel a subscription.
#define ao2_alloc(data_size, destructor_fn)
int stasis_subscription_final_message(struct stasis_subscription *sub, struct stasis_message *msg)
Determine whether a message is the final message to be received on a subscription.
int ast_sip_session_defer_termination(struct ast_sip_session *session)
Defer local termination of a session until remote side terminates, or an amount of time passes...
#define ast_channel_unlock(chan)
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
unsigned int refer_blind_progress
static struct refer_progress_notification * refer_progress_notification_alloc(struct refer_progress *progress, int response, pjsip_evsub_state state)
Allocator for REFER Progress notification structure.
unsigned int allowtransfer
int response
SIP response code to send.
An API for managing task processing threads that can be shared across modules.
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",)
struct stasis_topic * ast_bridge_topic_all(void)
A topic which publishes the events for all bridges.
A supplement to SIP message processing.
int pbx_builtin_setvar_helper(struct ast_channel *chan, const char *name, const char *value)
Add a variable to the channel variable stack, removing the most recently set value for the same name...
pjsip_endpoint * ast_sip_get_pjsip_endpoint(void)
Get a pointer to the PJSIP endpoint.
static void refer_progress_framehook_destroy(void *data)
Destroy callback for monitoring framehook.
static pjsip_evsub_user refer_progress_evsub_cb
Callback structure for subscription.
pjsip_rx_data * rdata
REFER message.
A ast_taskprocessor structure is a singleton by name.
static int unload_module(void)
static int refer_progress_notify(void *data)
Serialized callback for subscription notification.
#define ast_channel_ref(c)
Increase channel reference count.
void ast_sip_session_end_if_deferred(struct ast_sip_session *session)
End the session if it had been previously deferred.
void ast_copy_string(char *dst, const char *src, size_t size)
Size-limited null-terminating string copy.
#define S_OR(a, b)
returns the equivalent of logic or for strings: first one if not empty, otherwise second one...
void * ast_taskprocessor_unreference(struct ast_taskprocessor *tps)
Unreference the specified taskprocessor and its reference count will decrement.
const char * ast_channel_name(const struct ast_channel *chan)
static int refer_incoming_blind_request(struct ast_sip_session *session, pjsip_rx_data *rdata, pjsip_sip_uri *target, struct refer_progress *progress)
void ast_sip_unregister_service(pjsip_module *module)
int ast_setstate(struct ast_channel *chan, enum ast_channel_state)
Change the state of a channel.
AO2 object that wraps data for transfer_channel_cb.
int stasis_subscription_accept_message_type(struct stasis_subscription *subscription, const struct stasis_message_type *type)
Indicate to a subscription that we are interested in a message type.
Data structure associated with a single frame of data.
Internal Asterisk hangup causes.
pjsip_dialog * dlg
Dialog for subscription.
int error(const char *format,...)
int sent_100
Non-zero if the 100 notify has been sent.
struct stasis_message_type * stasis_subscription_change_type(void)
Gets the message type for subscription change notices.
union ast_frame::@263 data
enum ast_frame_type frametype
struct ast_channel * transferer_chan
Transferer channel.
static char context[AST_MAX_CONTEXT]
pjsip_evsub_state state
Subscription state.
#define ASTERISK_GPL_KEY
The text the key() function should return.
struct ast_channel * ast_channel_get_by_name(const char *name)
Find a channel by name.
Asterisk module definitions.
REFER Progress structure.
struct ast_sip_session * ast_sip_dialog_get_session(pjsip_dialog *dlg)
Retrieves a session from a dialog.
struct ast_channel * channel
Channel from the session (with reference)
static int refer_progress_alloc(struct ast_sip_session *session, pjsip_rx_data *rdata, struct refer_progress **progress)
Internal helper function which sets up a refer progress structure if needed.
#define ast_sip_session_register_supplement(supplement)