Asterisk - The Open Source Telephony Project GIT-master-7805f28
|
#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 | extract_oli (const pjsip_param *param_list, char *buf, size_t len) |
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 639 of file res_pjsip_caller_id.c.
|
static |
Definition at line 639 of file res_pjsip_caller_id.c.
|
static |
Definition at line 536 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 342 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 395 of file res_pjsip_caller_id.c.
References session.
Referenced by add_rpid_header().
|
static |
Definition at line 316 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 426 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 479 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 639 of file res_pjsip_caller_id.c.
|
static |
Definition at line 218 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 248 of file res_pjsip_caller_id.c.
References session, and update_incoming_connected_line().
|
static |
Definition at line 560 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 588 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 266 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 38 of file res_pjsip_caller_id.c.
References ast_copy_pj_str(), buf, and len().
Referenced by set_id_from_oli().
|
static |
Definition at line 620 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 152 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 65 of file res_pjsip_caller_id.c.
References AST_CHANNEL_NAME, ast_sip_is_uri_sip_sips(), ast_str_to_int(), extract_oli(), and if().
Referenced by caller_id_incoming_request().
|
static |
Definition at line 106 of file res_pjsip_caller_id.c.
References ast_strlen_zero(), id, and session.
Referenced by update_incoming_connected_line().
|
static |
Definition at line 627 of file res_pjsip_caller_id.c.
References ast_sip_session_unregister_supplement(), and caller_id_supplement.
|
static |
Definition at line 188 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 639 of file res_pjsip_caller_id.c.
|
static |
Definition at line 639 of file res_pjsip_caller_id.c.
|
static |
Definition at line 611 of file res_pjsip_caller_id.c.
Referenced by load_module(), and unload_module().