Asterisk - The Open Source Telephony Project GIT-master-d856a3e
|
#include "asterisk.h"
#include <pjsip.h>
#include <pjsip_ua.h>
#include "asterisk/res_pjsip.h"
#include "asterisk/res_pjsip_session.h"
#include "asterisk/channel.h"
#include "asterisk/module.h"
#include "asterisk/callerid.h"
#include "asterisk/conversions.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static void | add_id_headers (const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id) |
static void | add_pai_header (const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id) |
static void | add_party_param (pjsip_tx_data *tdata, pjsip_fromto_hdr *hdr, const struct ast_sip_session *session) |
static void | add_privacy_header (pjsip_tx_data *tdata, const struct ast_party_id *id) |
static void | add_privacy_params (pjsip_tx_data *tdata, pjsip_fromto_hdr *hdr, const struct ast_party_id *id) |
static void | add_rpid_header (const struct ast_sip_session *session, pjsip_tx_data *tdata, const struct ast_party_id *id) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
static int | caller_id_incoming_request (struct ast_sip_session *session, pjsip_rx_data *rdata) |
static void | caller_id_incoming_response (struct ast_sip_session *session, pjsip_rx_data *rdata) |
static void | caller_id_outgoing_request (struct ast_sip_session *session, pjsip_tx_data *tdata) |
static void | caller_id_outgoing_response (struct ast_sip_session *session, pjsip_tx_data *tdata) |
static pjsip_fromto_hdr * | create_new_id_hdr (const pj_str_t *hdr_name, pjsip_fromto_hdr *base, pjsip_tx_data *tdata, const struct ast_party_id *id) |
static int | load_module (void) |
static void | queue_connected_line_update (struct ast_sip_session *session, const struct ast_party_id *id) |
static int | set_id_from_oli (pjsip_rx_data *rdata, int *ani2) |
static int | should_queue_connected_line_update (const struct ast_sip_session *session, const struct ast_party_id *id) |
static int | unload_module (void) |
static void | update_incoming_connected_line (struct ast_sip_session *session, pjsip_rx_data *rdata) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP Caller ID 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 = AST_BUILDOPT_SUM, .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_info * | ast_module_info = &__mod_info |
static struct ast_sip_session_supplement | caller_id_supplement |
|
static |
Definition at line 625 of file res_pjsip_caller_id.c.
|
static |
Definition at line 625 of file res_pjsip_caller_id.c.
|
static |
Definition at line 522 of file res_pjsip_caller_id.c.
References add_pai_header(), add_rpid_header(), ast_sip_can_present_connected_id(), and session.
Referenced by caller_id_outgoing_request(), and caller_id_outgoing_response().
|
static |
Definition at line 328 of file res_pjsip_caller_id.c.
References add_privacy_header(), ast_sip_modify_id_header(), create_new_id_hdr(), NULL, and session.
Referenced by add_id_headers().
|
static |
Definition at line 381 of file res_pjsip_caller_id.c.
References session.
Referenced by add_rpid_header().
|
static |
Definition at line 302 of file res_pjsip_caller_id.c.
References ast_party_id_presentation(), AST_PRES_ALLOWED, AST_PRES_RESTRICTION, and NULL.
Referenced by add_pai_header().
|
static |
Definition at line 412 of file res_pjsip_caller_id.c.
References ast_party_id_presentation(), AST_PRES_ALLOWED, AST_PRES_NUMBER_TYPE, AST_PRES_RESTRICTION, and AST_PRES_USER_NUMBER_PASSED_SCREEN.
Referenced by add_rpid_header().
|
static |
Definition at line 465 of file res_pjsip_caller_id.c.
References add_party_param(), add_privacy_params(), ast_sip_modify_id_header(), create_new_id_hdr(), NULL, and session.
Referenced by add_id_headers().
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 625 of file res_pjsip_caller_id.c.
|
static |
Definition at line 204 of file res_pjsip_caller_id.c.
References ast_sip_set_id_from_invite(), session, set_id_from_oli(), and update_incoming_connected_line().
|
static |
Definition at line 234 of file res_pjsip_caller_id.c.
References session, and update_incoming_connected_line().
|
static |
Definition at line 546 of file res_pjsip_caller_id.c.
References add_id_headers(), ast_channel_connected_effective_id(), ast_channel_lock, ast_channel_unlock, ast_party_id_copy(), ast_party_id_free(), ast_party_id_init(), and session.
|
static |
Definition at line 574 of file res_pjsip_caller_id.c.
References add_id_headers(), ast_channel_connected_effective_id(), ast_channel_lock, ast_channel_unlock, ast_party_id_copy(), ast_party_id_free(), ast_party_id_init(), and session.
|
static |
Definition at line 252 of file res_pjsip_caller_id.c.
References ast_alloca, ast_escape_quoted(), ast_strlen_zero(), id, and NULL.
Referenced by add_pai_header(), and add_rpid_header().
|
static |
Definition at line 606 of file res_pjsip_caller_id.c.
References AST_MODULE_LOAD_SUCCESS, ast_module_shutdown_ref, ast_sip_session_register_supplement, and caller_id_supplement.
|
static |
Definition at line 138 of file res_pjsip_caller_id.c.
References ast_party_caller::ani, ast_party_caller::ani2, ast_channel_caller(), ast_channel_queue_connected_line_update(), ast_channel_set_caller_event(), AST_CONNECTED_LINE_UPDATE_SOURCE_ANSWER, ast_party_caller_init(), ast_party_connected_line_init(), ast_party_id_copy(), connected, id, ast_party_caller::id, NULL, and session.
Referenced by update_incoming_connected_line().
|
static |
Definition at line 49 of file res_pjsip_caller_id.c.
References AST_CHANNEL_NAME, ast_copy_pj_str(), and ast_str_to_int().
Referenced by caller_id_incoming_request().
|
static |
Definition at line 92 of file res_pjsip_caller_id.c.
References ast_strlen_zero(), id, and session.
Referenced by update_incoming_connected_line().
|
static |
Definition at line 613 of file res_pjsip_caller_id.c.
References ast_sip_session_unregister_supplement(), and caller_id_supplement.
|
static |
Definition at line 174 of file res_pjsip_caller_id.c.
References ast_party_id_free(), ast_party_id_init(), ast_sip_set_id_connected_line(), id, queue_connected_line_update(), session, and should_queue_connected_line_update().
Referenced by caller_id_incoming_request(), and caller_id_incoming_response().
|
static |
Definition at line 625 of file res_pjsip_caller_id.c.
|
static |
Definition at line 625 of file res_pjsip_caller_id.c.
|
static |
Definition at line 597 of file res_pjsip_caller_id.c.
Referenced by load_module(), and unload_module().