Asterisk - The Open Source Telephony Project  21.4.1
Macros | Functions | Variables
res_pjsip_send_to_voicemail.c File Reference

Module for managing send to voicemail requests in SIP REFER messages against PJSIP channels. More...

#include "asterisk.h"
#include <pjsip.h>
#include <pjsip_ua.h>
#include "asterisk/pbx.h"
#include "asterisk/res_pjsip.h"
#include "asterisk/res_pjsip_session.h"
#include "asterisk/module.h"

Go to the source code of this file.

Macros

#define DATASTORE_NAME   "call_feature_send_to_vm_datastore"
 
#define SEND_TO_VM_HEADER   "PJSIP_HEADER(add,X-Digium-Call-Feature)"
 
#define SEND_TO_VM_HEADER_VALUE   "feature_send_to_vm"
 
#define SEND_TO_VM_REDIRECT   "REDIRECTING(reason)"
 
#define SEND_TO_VM_REDIRECT_QUOTED_VALUE   "\"" SEND_TO_VM_REDIRECT_VALUE "\""
 
#define SEND_TO_VM_REDIRECT_VALUE   "send_to_vm"
 

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static void channel_cleanup_wrapper (void *data)
 
static pjsip_fromto_hdr * get_diversion_header (pjsip_rx_data *rdata)
 
static pjsip_param * get_diversion_reason (pjsip_fromto_hdr *hdr)
 
static int handle_incoming_request (struct ast_sip_session *session, struct pjsip_rx_data *rdata)
 
static void handle_outgoing_response (struct ast_sip_session *session, struct pjsip_tx_data *tdata)
 
static int has_call_feature (pjsip_rx_data *rdata)
 
static int has_diversion_reason (pjsip_rx_data *rdata)
 
static int load_module (void)
 
static void send_response (struct ast_sip_session *session, int code, struct pjsip_rx_data *rdata)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP REFER Send to Voicemail Support" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, .requires = "res_pjsip,res_pjsip_session", }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static struct ast_datastore_info call_feature_info
 
static struct ast_sip_session_supplement refer_supplement
 

Detailed Description

Module for managing send to voicemail requests in SIP REFER messages against PJSIP channels.

Author
Jonathan Rose jrose.nosp@m.@dig.nosp@m.ium.c.nosp@m.om

Definition in file res_pjsip_send_to_voicemail.c.

Variable Documentation

struct ast_datastore_info call_feature_info
static
Initial value:
= {
.type = "REFER call feature info",
.destroy = channel_cleanup_wrapper,
}

Definition at line 70 of file res_pjsip_send_to_voicemail.c.

struct ast_sip_session_supplement refer_supplement
static
Initial value:
= {
.method = "REFER",
.incoming_request = handle_incoming_request,
.outgoing_response = handle_outgoing_response,
}

Definition at line 210 of file res_pjsip_send_to_voicemail.c.