Asterisk - The Open Source Telephony Project GIT-master-7805f28
|
Motif Jingle Channel Driver. More...
#include "asterisk.h"
#include <sys/socket.h>
#include <fcntl.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include <iksemel.h>
#include <pthread.h>
#include "asterisk/lock.h"
#include "asterisk/channel.h"
#include "asterisk/config_options.h"
#include "asterisk/module.h"
#include "asterisk/pbx.h"
#include "asterisk/sched.h"
#include "asterisk/io.h"
#include "asterisk/rtp_engine.h"
#include "asterisk/acl.h"
#include "asterisk/callerid.h"
#include "asterisk/file.h"
#include "asterisk/cli.h"
#include "asterisk/app.h"
#include "asterisk/musiconhold.h"
#include "asterisk/manager.h"
#include "asterisk/stringfields.h"
#include "asterisk/utils.h"
#include "asterisk/causes.h"
#include "asterisk/abstract_jb.h"
#include "asterisk/xmpp.h"
#include "asterisk/endpoints.h"
#include "asterisk/stasis_channels.h"
#include "asterisk/format_cache.h"
Go to the source code of this file.
Data Structures | |
struct | jingle_action_handler |
Defined handlers for different Jingle actions. More... | |
struct | jingle_config |
struct | jingle_endpoint |
Endpoint which contains configuration information and active sessions. More... | |
struct | jingle_endpoint_state |
Endpoint state information. More... | |
struct | jingle_reason_mapping |
Reason text <-> cause code mapping. More... | |
struct | jingle_session |
Session which contains information about an active session. More... | |
Macros | |
#define | DEFAULT_MAX_ICE_CANDIDATES "10" |
Default maximum number of ICE candidates we will offer. More... | |
#define | DEFAULT_MAX_PAYLOADS "30" |
Default maximum number of payloads we will offer. More... | |
#define | ENDPOINT_BUCKETS 37 |
Number of buckets for endpoints. More... | |
#define | GOOGLE_PHONE_NS "http://www.google.com/session/phone" |
Namespace for Google Phone description. More... | |
#define | GOOGLE_SESSION_NS "http://www.google.com/session" |
Namespace for Google Session. More... | |
#define | GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p" |
Namespace for Google Talk ICE-UDP. More... | |
#define | GOOGLE_TRANSPORT_RAW_NS "http://www.google.com/transport/raw-udp" |
Namespace for Google Talk Raw UDP. More... | |
#define | GOOGLE_VIDEO_NS "http://www.google.com/session/video" |
Namespace for Google Video description. More... | |
#define | JINGLE_ICE_UDP_NS "urn:xmpp:jingle:transports:ice-udp:1" |
Namespace for Jingle ICE-UDP. More... | |
#define | JINGLE_NS "urn:xmpp:jingle:1" |
Namespace for Jingle itself. More... | |
#define | JINGLE_RTP_INFO_NS "urn:xmpp:jingle:apps:rtp:info:1" |
Namespace for Jingle RTP info. More... | |
#define | JINGLE_RTP_NS "urn:xmpp:jingle:apps:rtp:1" |
Namespace for Jingle RTP sessions. More... | |
#define | SESSION_BUCKETS 37 |
Number of buckets for sessions, on a per-endpoint basis. More... | |
#define | XMPP_STANZAS_NS "urn:ietf:params:xml:ns:xmpp-stanzas" |
Namespace for XMPP stanzas. More... | |
Enumerations | |
enum | jingle_transport { JINGLE_TRANSPORT_ICE_UDP = 3 , JINGLE_TRANSPORT_GOOGLE_V2 = 2 , JINGLE_TRANSPORT_GOOGLE_V1 = 1 , JINGLE_TRANSPORT_NONE = 0 } |
The various transport methods supported, from highest priority to lowest priority when doing fallback. More... | |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static | AO2_GLOBAL_OBJ_STATIC (globals) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
CONFIG_INFO_STANDARD (cfg_info, globals, jingle_config_alloc,.files=ACO_FILES(&jingle_conf),) | |
static int | custom_connection_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for connection. More... | |
static int | custom_group_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for groups. More... | |
static int | custom_transport_handler (const struct aco_option *opt, struct ast_variable *var, void *obj) |
Custom handler for transport. More... | |
static int | jingle_action_hook (void *data, ikspak *pak) |
Callback for when a Jingle action is received from an endpoint. More... | |
static void | jingle_action_session_accept (struct jingle_endpoint *endpoint, struct jingle_session *session, ikspak *pak) |
Handler function for the 'session-accept' action. More... | |
static void | jingle_action_session_info (struct jingle_endpoint *endpoint, struct jingle_session *session, ikspak *pak) |
Handler function for the 'session-info' action. More... | |
static void | jingle_action_session_initiate (struct jingle_endpoint *endpoint, struct jingle_session *session, ikspak *pak) |
Action handlers. More... | |
static void | jingle_action_session_terminate (struct jingle_endpoint *endpoint, struct jingle_session *session, ikspak *pak) |
Handler function for the 'session-terminate' action. More... | |
static void | jingle_action_transport_info (struct jingle_endpoint *endpoint, struct jingle_session *session, ikspak *pak) |
Handler function for the 'transport-info' action. More... | |
static int | jingle_add_content (struct jingle_session *session, iks *jingle, iks *content, iks *description, iks *transport, const char *name, enum ast_media_type type, struct ast_rtp_instance *rtp, iks **payloads) |
Helper function which adds content to a description. More... | |
static int | jingle_add_google_candidates_to_transport (struct ast_rtp_instance *rtp, iks *transport, iks **candidates, unsigned int video, enum jingle_transport transport_type, unsigned int maximum) |
Internal helper function which adds Google candidates to a transport node. More... | |
static int | jingle_add_ice_udp_candidates_to_transport (struct ast_rtp_instance *rtp, iks *transport, iks **candidates, unsigned int maximum) |
Internal helper function which adds ICE-UDP candidates to a transport node. More... | |
static int | jingle_add_payloads_to_description (struct jingle_session *session, struct ast_rtp_instance *rtp, iks *description, iks **payloads, enum ast_media_type type) |
Internal helper function which adds payloads to a description. More... | |
static struct jingle_session * | jingle_alloc (struct jingle_endpoint *endpoint, const char *from, const char *sid) |
Internal helper function used to allocate Jingle session on an endpoint. More... | |
static int | jingle_answer (struct ast_channel *ast) |
Function called by core when we should answer a Jingle session. More... | |
static int | jingle_call (struct ast_channel *ast, const char *dest, int timeout) |
Function called by core to actually start calling a remote party. More... | |
static void * | jingle_config_alloc (void) |
Allocator called when module configuration should appear. More... | |
static void | jingle_config_destructor (void *obj) |
Destructor called when module configuration goes away. More... | |
static int | jingle_digit_begin (struct ast_channel *chan, char digit) |
Function called by core to start a DTMF digit. More... | |
static int | jingle_digit_end (struct ast_channel *ast, char digit, unsigned int duration) |
Function called by core to stop a DTMF digit. More... | |
static void | jingle_enable_video (struct jingle_session *session) |
Internal helper function which enables video support on a session if possible. More... | |
static void * | jingle_endpoint_alloc (const char *cat) |
Allocator function for Jingle endpoints. More... | |
static int | jingle_endpoint_cmp (void *obj, void *arg, int flags) |
Comparator function for Jingle endpoints. More... | |
static void | jingle_endpoint_destructor (void *obj) |
Destructor for Jingle endpoints. More... | |
static void * | jingle_endpoint_find (struct ao2_container *tmp_container, const char *category) |
Find function for Jingle endpoints. More... | |
static int | jingle_endpoint_hash (const void *obj, const int flags) |
Hashing function for Jingle endpoints. More... | |
static struct jingle_endpoint_state * | jingle_endpoint_state_create (void) |
Allocator function for Jingle endpoint state. More... | |
static void | jingle_endpoint_state_destructor (void *obj) |
Destructor for Jingle endpoint state. More... | |
static struct jingle_endpoint_state * | jingle_endpoint_state_find_or_create (const char *category) |
State find/create function. More... | |
static int | jingle_fixup (struct ast_channel *oldchan, struct ast_channel *newchan) |
Function called by core to change the underlying owner channel. More... | |
static void | jingle_get_codec (struct ast_channel *chan, struct ast_format_cap *result) |
Function called by RTP engine to get peer capabilities. More... | |
static enum ast_rtp_glue_result | jingle_get_rtp_peer (struct ast_channel *chan, struct ast_rtp_instance **instance) |
Function called by RTP engine to get local RTP peer. More... | |
static int | jingle_hangup (struct ast_channel *ast) |
Function called by core to hang up a Jingle session. More... | |
static int | jingle_indicate (struct ast_channel *ast, int condition, const void *data, size_t datalen) |
Function called by core to ask the channel to indicate some sort of condition. More... | |
static int | jingle_interpret_content (struct jingle_session *session, ikspak *pak) |
Helper function which locates content stanzas and interprets them. More... | |
static int | jingle_interpret_description (struct jingle_session *session, iks *description, const char *name, struct ast_rtp_instance **rtp) |
Helper function which handles content descriptions. More... | |
static int | jingle_interpret_google_transport (struct jingle_session *session, iks *transport, struct ast_rtp_instance *rtp) |
Helper function which handles Google transport information. More... | |
static int | jingle_interpret_ice_udp_transport (struct jingle_session *session, iks *transport, struct ast_rtp_instance *rtp) |
Helper function which handles ICE-UDP transport information. More... | |
static struct ast_channel * | jingle_new (struct jingle_endpoint *endpoint, struct jingle_session *session, int state, const char *title, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *cid_name) |
Function called to create a new Jingle Asterisk channel. More... | |
static int | jingle_outgoing_hook (void *data, ikspak *pak) |
Callback for when a response is received for an outgoing session-initiate message. More... | |
static void | jingle_queue_hangup_with_cause (struct jingle_session *session, int cause) |
Helper function which queues a hangup frame with cause code. More... | |
static struct ast_frame * | jingle_read (struct ast_channel *ast) |
Function called by core to read any waiting frames. More... | |
static struct ast_channel * | jingle_request (const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause) |
Asterisk core interaction functions. More... | |
static void | jingle_send_error_response (struct ast_xmpp_client *connection, ikspak *pak, const char *type, const char *reasonstr, const char *reasonstr2) |
Internal helper function which sends an error response. More... | |
static void | jingle_send_response (struct ast_xmpp_client *connection, ikspak *pak) |
Internal helper function which sends a response. More... | |
static void | jingle_send_session_accept (struct jingle_session *session) |
Internal function which sends a session-accept message. More... | |
static void | jingle_send_session_action (struct jingle_session *session, const char *action) |
Internal function which sends a complete session message. More... | |
static void | jingle_send_session_info (struct jingle_session *session, const char *info) |
Internal function which sends a session-info message. More... | |
static void | jingle_send_session_initiate (struct jingle_session *session) |
Internal function which sends a session-initiate message. More... | |
static void | jingle_send_session_terminate (struct jingle_session *session, const char *reasontext) |
Internal function which sends a session-terminate message. More... | |
static void | jingle_send_transport_info (struct jingle_session *session, const char *from) |
Internal function which sends a transport-info message. More... | |
static int | jingle_sendtext (struct ast_channel *chan, const char *text) |
Function called by core to send text to the remote party of the Jingle session. More... | |
static int | jingle_session_cmp (void *obj, void *arg, int flags) |
Comparator function for Jingle sessions. More... | |
static void | jingle_session_destructor (void *obj) |
Destructor for Jingle sessions. More... | |
static int | jingle_session_hash (const void *obj, const int flags) |
Hashing function for Jingle sessions. More... | |
static struct ast_channel * | jingle_session_lock_full (struct jingle_session *pvt) |
static void | jingle_set_owner (struct jingle_session *session, struct ast_channel *chan) |
Set the channel owner on the jingle_session object and related objects. More... | |
static int | jingle_set_rtp_peer (struct ast_channel *chan, struct ast_rtp_instance *rtp, struct ast_rtp_instance *vrtp, struct ast_rtp_instance *tpeer, const struct ast_format_cap *cap, int nat_active) |
Function called by RTP engine to change where the remote party should send media. More... | |
static int | jingle_write (struct ast_channel *ast, struct ast_frame *frame) |
Function called by core to write frames. More... | |
static int | load_module (void) |
Load the module. More... | |
static int | reload (void) |
Reload module. More... | |
static int | unload_module (void) |
Unload the jingle channel from Asterisk. More... | |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "Motif Jingle Channel Driver" , .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, .reload = reload, .load_pri = AST_MODPRI_CHANNEL_DRIVER, .requires = "res_xmpp", } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char | channel_type [] = "Motif" |
static struct aco_type | endpoint_option |
struct aco_type * | endpoint_options [] = ACO_TYPES(&endpoint_option) |
static const struct jingle_action_handler | jingle_action_handlers [] |
struct aco_file | jingle_conf |
static const struct jingle_reason_mapping | jingle_reason_mappings [] |
static struct ast_rtp_glue | jingle_rtp_glue |
Local glue for interacting with the RTP engine core. More... | |
static struct ast_channel_tech | jingle_tech |
PBX interface structure for channel registration. More... | |
static struct ast_sched_context * | sched |
Motif Jingle Channel Driver.
Iksemel http://iksemel.jabberstudio.org/
Definition in file chan_motif.c.
#define DEFAULT_MAX_ICE_CANDIDATES "10" |
Default maximum number of ICE candidates we will offer.
Definition at line 262 of file chan_motif.c.
#define DEFAULT_MAX_PAYLOADS "30" |
Default maximum number of payloads we will offer.
Definition at line 265 of file chan_motif.c.
#define ENDPOINT_BUCKETS 37 |
Number of buckets for endpoints.
Definition at line 268 of file chan_motif.c.
Namespace for Google Phone description.
Definition at line 295 of file chan_motif.c.
#define GOOGLE_SESSION_NS "http://www.google.com/session" |
Namespace for Google Session.
Definition at line 292 of file chan_motif.c.
#define GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p" |
Namespace for Google Talk ICE-UDP.
Definition at line 286 of file chan_motif.c.
#define GOOGLE_TRANSPORT_RAW_NS "http://www.google.com/transport/raw-udp" |
Namespace for Google Talk Raw UDP.
Definition at line 289 of file chan_motif.c.
#define GOOGLE_VIDEO_NS "http://www.google.com/session/video" |
Namespace for Google Video description.
Definition at line 298 of file chan_motif.c.
#define JINGLE_ICE_UDP_NS "urn:xmpp:jingle:transports:ice-udp:1" |
Namespace for Jingle ICE-UDP.
Definition at line 283 of file chan_motif.c.
#define JINGLE_NS "urn:xmpp:jingle:1" |
Namespace for Jingle itself.
Definition at line 274 of file chan_motif.c.
#define JINGLE_RTP_INFO_NS "urn:xmpp:jingle:apps:rtp:info:1" |
Namespace for Jingle RTP info.
Definition at line 280 of file chan_motif.c.
#define JINGLE_RTP_NS "urn:xmpp:jingle:apps:rtp:1" |
Namespace for Jingle RTP sessions.
Definition at line 277 of file chan_motif.c.
#define SESSION_BUCKETS 37 |
Number of buckets for sessions, on a per-endpoint basis.
Definition at line 271 of file chan_motif.c.
#define XMPP_STANZAS_NS "urn:ietf:params:xml:ns:xmpp-stanzas" |
Namespace for XMPP stanzas.
Definition at line 301 of file chan_motif.c.
enum jingle_transport |
The various transport methods supported, from highest priority to lowest priority when doing fallback.
Enumerator | |
---|---|
JINGLE_TRANSPORT_ICE_UDP | XEP-0176 |
JINGLE_TRANSPORT_GOOGLE_V2 | |
JINGLE_TRANSPORT_GOOGLE_V1 | Undocumented initial Google specification |
JINGLE_TRANSPORT_NONE | No transport specified |
Definition at line 304 of file chan_motif.c.
|
static |
Definition at line 2872 of file chan_motif.c.
|
static |
Definition at line 2872 of file chan_motif.c.
|
static |
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 2872 of file chan_motif.c.
CONFIG_INFO_STANDARD | ( | cfg_info | , |
globals | , | ||
jingle_config_alloc | , | ||
. | files = ACO_FILES(&jingle_conf) |
||
) |
|
static |
Custom handler for connection.
Definition at line 2716 of file chan_motif.c.
References ast_log, ast_xmpp_client_find(), jingle_endpoint::connection, ast_xmpp_client::filter, GOOGLE_SESSION_NS, jingle_action_hook(), JINGLE_NS, LOG_ERROR, jingle_endpoint::name, jingle_endpoint::rule, and var.
Referenced by load_module().
|
static |
Custom handler for groups.
Definition at line 2700 of file chan_motif.c.
References ast_get_group(), jingle_endpoint::callgroup, jingle_endpoint::pickupgroup, and var.
Referenced by load_module().
|
static |
Custom handler for transport.
Definition at line 2741 of file chan_motif.c.
References ast_log, JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, JINGLE_TRANSPORT_ICE_UDP, LOG_WARNING, jingle_endpoint::name, jingle_endpoint::transport, and var.
Referenced by load_module().
|
static |
Callback for when a Jingle action is received from an endpoint.
Definition at line 2637 of file chan_motif.c.
References ao2_find, ao2_ref, ARRAY_LEN, ast_callid_threadassoc_add(), ast_callid_threadassoc_remove(), ast_log, ast_strlen_zero(), jingle_action_handler::handler, jingle_action_handlers, LOG_NOTICE, NULL, OBJ_KEY, session, jingle_endpoint_state::sessions, and jingle_endpoint::state.
Referenced by custom_connection_handler().
|
static |
Handler function for the 'session-accept' action.
Definition at line 2516 of file chan_motif.c.
References ao2_unlock, ast_channel_unlock, ast_channel_unref, AST_CONTROL_ANSWER, ast_queue_control(), jingle_endpoint::connection, jingle_interpret_content(), jingle_send_error_response(), jingle_send_response(), jingle_session_lock_full(), and session.
|
static |
Handler function for the 'session-info' action.
Definition at line 2540 of file chan_motif.c.
References ao2_unlock, ast_channel_unlock, ast_channel_unref, AST_CONTROL_RINGING, ast_queue_control(), ast_queue_hold(), ast_queue_unhold(), ast_setstate(), AST_STATE_RINGING, AST_STATE_UP, jingle_endpoint::connection, JINGLE_RTP_INFO_NS, jingle_send_error_response(), jingle_send_response(), jingle_session_lock_full(), NULL, and session.
|
static |
Action handlers.
Handler function for the 'session-initiate' action.
Definition at line 2432 of file chan_motif.c.
References ao2_link, ao2_ref, ast_channel_lock, ast_channel_unlock, ast_hangup(), ast_log, AST_PBX_CALL_LIMIT, AST_PBX_FAILED, ast_pbx_start(), AST_PBX_SUCCESS, ast_setstate(), AST_STATE_DOWN, AST_STATE_RING, jingle_endpoint::connection, jingle_alloc(), jingle_interpret_content(), jingle_new(), jingle_send_error_response(), jingle_send_response(), jingle_send_transport_info(), JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_NONE, LOG_WARNING, NULL, session, jingle_endpoint_state::sessions, and jingle_endpoint::state.
|
static |
Handler function for the 'session-terminate' action.
Definition at line 2575 of file chan_motif.c.
References ao2_unlock, ARRAY_LEN, ast_alloca, ast_control_pvt_cause_code::ast_cause, AST_CAUSE_NORMAL, ast_channel_hangupcause_hash_set(), AST_CHANNEL_NAME, ast_channel_name(), ast_channel_unlock, ast_channel_unref, AST_CONTROL_PVT_CAUSE_CODE, ast_copy_string(), ast_debug, ast_queue_control_data(), ast_queue_hangup_with_cause(), jingle_reason_mapping::cause, ast_control_pvt_cause_code::chan_name, ast_control_pvt_cause_code::code, jingle_endpoint::connection, jingle_reason_mappings, jingle_send_error_response(), jingle_send_response(), jingle_session_lock_full(), session, and text.
|
static |
Handler function for the 'transport-info' action.
Definition at line 2503 of file chan_motif.c.
References jingle_endpoint::connection, jingle_interpret_content(), jingle_send_error_response(), jingle_send_response(), and session.
|
static |
Helper function which adds content to a description.
Definition at line 1434 of file chan_motif.c.
References AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, GOOGLE_PHONE_NS, GOOGLE_TRANSPORT_NS, jingle_add_payloads_to_description(), JINGLE_ICE_UDP_NS, JINGLE_RTP_NS, JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, JINGLE_TRANSPORT_ICE_UDP, name, session, and type.
Referenced by jingle_send_session_action().
|
static |
Internal helper function which adds Google candidates to a transport node.
Definition at line 1022 of file chan_motif.c.
References ast_rtp_engine_ice_candidate::address, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_log, AST_RTP_ICE_CANDIDATE_TYPE_HOST, AST_RTP_ICE_CANDIDATE_TYPE_SRFLX, ast_rtp_instance_get_ice(), ast_sockaddr_stringify_host(), ast_sockaddr_stringify_port(), ast_rtp_engine_ice::get_local_candidates, ast_rtp_engine_ice::get_password, ast_rtp_engine_ice::get_ufrag, GOOGLE_TRANSPORT_NS, ast_rtp_engine_ice_candidate::id, JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, ast_rtp_engine_ice_candidate::transport, and ast_rtp_engine_ice_candidate::type.
Referenced by jingle_send_transport_info().
|
static |
Internal helper function which adds ICE-UDP candidates to a transport node.
Definition at line 960 of file chan_motif.c.
References ast_rtp_engine_ice_candidate::address, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_ref, ast_log, ast_random(), AST_RTP_ICE_CANDIDATE_TYPE_HOST, AST_RTP_ICE_CANDIDATE_TYPE_RELAYED, AST_RTP_ICE_CANDIDATE_TYPE_SRFLX, ast_rtp_instance_get_ice(), ast_sockaddr_stringify_host(), ast_sockaddr_stringify_port(), ast_str_hash(), ast_rtp_engine_ice_candidate::foundation, ast_rtp_engine_ice::get_local_candidates, ast_rtp_engine_ice::get_password, ast_rtp_engine_ice::get_ufrag, ast_rtp_engine_ice_candidate::id, JINGLE_ICE_UDP_NS, LOG_ERROR, ast_rtp_engine_ice_candidate::priority, ast_rtp_engine_ice_candidate::transport, and ast_rtp_engine_ice_candidate::type.
Referenced by jingle_send_transport_info().
|
static |
Internal helper function which adds payloads to a description.
Definition at line 1348 of file chan_motif.c.
References ao2_ref, ast_format_cap_count(), ast_format_cap_get_format(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_g722, ast_format_get_type(), AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_rtp_codecs_payload_code(), ast_rtp_instance_get_codecs(), ast_rtp_lookup_mime_subtype2(), ast_rtp_lookup_sample_rate2(), GOOGLE_PHONE_NS, JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, session, type, and ast_channel::x.
Referenced by jingle_add_content().
|
static |
Internal helper function used to allocate Jingle session on an endpoint.
Definition at line 743 of file chan_motif.c.
References ao2_alloc, ao2_ref, ast_copy_string(), ast_create_callid(), ast_format_cap_alloc, ast_format_cap_append_from_cap(), AST_FORMAT_CAP_FLAG_DEFAULT, AST_MEDIA_TYPE_UNKNOWN, ast_random(), ast_read_threadstorage_callid(), ast_rtp_instance_new(), ast_rtp_instance_set_prop(), AST_RTP_PROPERTY_DTMF, AST_RTP_PROPERTY_RTCP, ast_sockaddr_parse(), ast_string_field_build, ast_string_field_init, ast_string_field_set, ast_strlen_zero(), jingle_session::callid, jingle_endpoint::cap, jingle_endpoint::connection, jingle_session_destructor(), jingle_endpoint::maxicecandidates, jingle_endpoint::maxpayloads, NULL, session, jingle_endpoint::state, and jingle_endpoint::transport.
Referenced by jingle_action_session_initiate(), and jingle_request().
|
static |
Function called by core when we should answer a Jingle session.
Definition at line 1667 of file chan_motif.c.
References ast_channel_tech_pvt(), AST_STATE_UP, jingle_send_session_accept(), and session.
|
static |
Function called by core to actually start calling a remote party.
Definition at line 1892 of file chan_motif.c.
References ast_channel_tech_pvt(), ast_format_cap_append_from_cap(), AST_MEDIA_TYPE_UNKNOWN, ast_setstate(), AST_STATE_RING, jingle_outgoing_hook(), jingle_send_session_initiate(), and session.
|
static |
Allocator called when module configuration should appear.
Definition at line 640 of file chan_motif.c.
References ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, ENDPOINT_BUCKETS, jingle_config::endpoints, jingle_config_destructor(), jingle_endpoint_cmp(), jingle_endpoint_hash(), and NULL.
|
static |
Destructor called when module configuration goes away.
Definition at line 633 of file chan_motif.c.
References ao2_cleanup, and jingle_config::endpoints.
Referenced by jingle_config_alloc().
|
static |
Function called by core to start a DTMF digit.
Definition at line 1868 of file chan_motif.c.
References ast_channel_tech_pvt(), ast_rtp_instance_dtmf_begin(), digit, and session.
|
static |
Function called by core to stop a DTMF digit.
Definition at line 1880 of file chan_motif.c.
References ast_channel_tech_pvt(), ast_rtp_instance_dtmf_end_with_duration(), digit, and session.
|
static |
Internal helper function which enables video support on a session if possible.
Definition at line 710 of file chan_motif.c.
References ast_channel_set_fd(), ast_channel_uniqueid(), ast_format_cap_get_framing(), ast_format_cap_has_type(), AST_MEDIA_TYPE_VIDEO, ast_rtp_codecs_set_framing(), ast_rtp_instance_fd(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_ice(), ast_rtp_instance_new(), ast_rtp_instance_set_channel_id(), ast_rtp_instance_set_prop(), AST_RTP_PROPERTY_RTCP, ast_sockaddr_parse(), JINGLE_TRANSPORT_GOOGLE_V2, NULL, session, and ast_rtp_engine_ice::stop.
Referenced by jingle_interpret_description(), and jingle_request().
|
static |
Allocator function for Jingle endpoints.
Definition at line 541 of file chan_motif.c.
References ao2_alloc, ao2_ref, ast_format_cap_alloc, AST_FORMAT_CAP_FLAG_DEFAULT, ast_string_field_init, ast_string_field_set, jingle_endpoint::cap, jingle_endpoint_destructor(), jingle_endpoint_state_find_or_create(), JINGLE_TRANSPORT_ICE_UDP, name, NULL, jingle_endpoint::state, and jingle_endpoint::transport.
|
static |
Comparator function for Jingle endpoints.
Definition at line 577 of file chan_motif.c.
References CMP_MATCH, CMP_STOP, name, jingle_endpoint::name, and OBJ_KEY.
Referenced by jingle_config_alloc().
|
static |
Destructor for Jingle endpoints.
Definition at line 483 of file chan_motif.c.
References ao2_cleanup, ao2_ref, ast_string_field_free_memory, ast_xmpp_client_unref(), jingle_endpoint::cap, jingle_endpoint::connection, ast_xmpp_client::filter, jingle_endpoint::rule, and jingle_endpoint::state.
Referenced by jingle_endpoint_alloc().
|
static |
Find function for Jingle endpoints.
Definition at line 502 of file chan_motif.c.
References ao2_find, and OBJ_KEY.
Referenced by jingle_endpoint_state_find_or_create(), and jingle_request().
|
static |
Hashing function for Jingle endpoints.
Definition at line 568 of file chan_motif.c.
References ast_str_hash(), name, jingle_endpoint::name, and OBJ_KEY.
Referenced by jingle_config_alloc().
|
static |
Allocator function for Jingle endpoint state.
Definition at line 508 of file chan_motif.c.
References ao2_alloc, AO2_ALLOC_OPT_LOCK_MUTEX, ao2_container_alloc_hash, ao2_ref, jingle_endpoint_state_destructor(), jingle_session_cmp(), jingle_session_hash(), NULL, SESSION_BUCKETS, and state.
Referenced by jingle_endpoint_state_find_or_create().
|
static |
Destructor for Jingle endpoint state.
Definition at line 475 of file chan_motif.c.
References ao2_ref.
Referenced by jingle_endpoint_state_create().
|
static |
State find/create function.
Definition at line 527 of file chan_motif.c.
References ao2_cleanup, ao2_global_obj_ref, ao2_ref, globals, jingle_endpoint_find(), jingle_endpoint_state_create(), NULL, and RAII_VAR.
Referenced by jingle_endpoint_alloc().
|
static |
Function called by core to change the underlying owner channel.
Definition at line 1777 of file chan_motif.c.
References ao2_lock, ao2_unlock, ast_channel_tech_pvt(), jingle_set_owner(), and session.
|
static |
Function called by RTP engine to get peer capabilities.
Definition at line 679 of file chan_motif.c.
|
static |
Function called by RTP engine to get local RTP peer.
Definition at line 663 of file chan_motif.c.
References ao2_ref, ast_channel_tech_pvt(), AST_RTP_GLUE_RESULT_FORBID, AST_RTP_GLUE_RESULT_LOCAL, and session.
|
static |
Function called by core to hang up a Jingle session.
Definition at line 1911 of file chan_motif.c.
References ao2_lock, ao2_ref, ao2_unlink, ao2_unlock, ARRAY_LEN, AST_CAUSE_CONGESTION, ast_channel_hangupcause(), ast_channel_tech_pvt(), ast_channel_tech_pvt_set(), AST_STATE_DOWN, jingle_reason_mappings, jingle_send_session_terminate(), jingle_set_owner(), NULL, jingle_reason_mapping::reason, and session.
|
static |
Function called by core to ask the channel to indicate some sort of condition.
Definition at line 1791 of file chan_motif.c.
References AST_CAUSE_BUSY, AST_CAUSE_CONGESTION, ast_channel_hangupcause_set(), ast_channel_tech_pvt(), AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_CONNECTED_LINE, AST_CONTROL_HOLD, AST_CONTROL_INCOMPLETE, AST_CONTROL_MASQUERADE_NOTIFY, AST_CONTROL_PVT_CAUSE_CODE, AST_CONTROL_RINGING, AST_CONTROL_SRCCHANGE, AST_CONTROL_SRCUPDATE, AST_CONTROL_UNHOLD, AST_CONTROL_UPDATE_RTP_PEER, AST_CONTROL_VIDUPDATE, ast_log, ast_moh_start(), ast_moh_stop(), ast_rtp_instance_change_source(), ast_rtp_instance_update_source(), AST_SOFTHANGUP_DEV, ast_softhangup_nolock(), AST_STATE_RING, AST_STATE_UP, jingle_send_session_info(), LOG_NOTICE, NULL, and session.
|
static |
Helper function which locates content stanzas and interprets them.
Definition at line 2321 of file chan_motif.c.
References ao2_ref, ao2_unlock, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_FACILITY_NOT_IMPLEMENTED, AST_CAUSE_SWITCH_CONGESTION, ast_channel_nativeformats_set(), ast_channel_unlock, ast_channel_unref, ast_format_cap_alloc, ast_format_cap_append_from_cap(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_log, AST_MEDIA_TYPE_UNKNOWN, ast_set_read_format(), ast_set_write_format(), ast_strlen_zero(), GOOGLE_PHONE_NS, GOOGLE_SESSION_NS, GOOGLE_TRANSPORT_NS, GOOGLE_VIDEO_NS, JINGLE_ICE_UDP_NS, jingle_interpret_description(), jingle_interpret_google_transport(), jingle_interpret_ice_udp_transport(), jingle_queue_hangup_with_cause(), JINGLE_RTP_NS, jingle_session_lock_full(), JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, name, NULL, and session.
Referenced by jingle_action_session_accept(), jingle_action_session_initiate(), and jingle_action_transport_info().
|
static |
Helper function which handles content descriptions.
Definition at line 2075 of file chan_motif.c.
References AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, ast_format_cap_count(), ast_format_cap_get_compatible(), ast_format_cap_remove_by_type(), ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_rtp_codecs_payload_formats(), ast_rtp_codecs_payloads_copy(), ast_rtp_codecs_payloads_destroy(), ast_rtp_codecs_payloads_initialize(), ast_rtp_codecs_payloads_set_rtpmap_type(), ast_rtp_codecs_payloads_set_rtpmap_type_rate(), ast_rtp_instance_get_codecs(), ast_string_field_set, ast_strlen_zero(), codecs, ast_xmpp_resource::description, jingle_enable_video(), jingle_queue_hangup_with_cause(), JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, name, NULL, and session.
Referenced by jingle_interpret_content().
|
static |
Helper function which handles Google transport information.
Definition at line 2243 of file chan_motif.c.
References AST_CAUSE_PROTOCOL_ERROR, AST_CAUSE_SWITCH_CONGESTION, ast_log, ast_rtp_instance_get_ice(), ast_rtp_instance_stun_request(), ast_sockaddr_parse(), ast_sockaddr_set_port, ast_strlen_zero(), ast_rtp_engine_ice::get_ufrag, jingle_queue_hangup_with_cause(), JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, LOG_ERROR, name, PARSE_PORT_FORBID, session, and ast_rtp_engine_ice::stop.
Referenced by jingle_interpret_content().
|
static |
Helper function which handles ICE-UDP transport information.
Definition at line 2162 of file chan_motif.c.
References ast_rtp_engine_ice::add_remote_candidate, ast_rtp_engine_ice_candidate::address, AST_CAUSE_PROTOCOL_ERROR, AST_CAUSE_SWITCH_CONGESTION, ast_log, AST_RTP_ICE_CANDIDATE_TYPE_HOST, AST_RTP_ICE_CANDIDATE_TYPE_RELAYED, AST_RTP_ICE_CANDIDATE_TYPE_SRFLX, ast_rtp_instance_get_ice(), ast_rtp_instance_get_remote_address, ast_rtp_instance_set_remote_address, ast_sockaddr_is_ipv4(), ast_sockaddr_isnull(), ast_sockaddr_parse(), ast_sockaddr_set_port, ast_strlen_zero(), ast_rtp_engine_ice_candidate::foundation, ast_rtp_engine_ice_candidate::id, jingle_queue_hangup_with_cause(), LOG_ERROR, PARSE_PORT_FORBID, priority, ast_rtp_engine_ice_candidate::priority, session, ast_rtp_engine_ice::set_authentication, ast_rtp_engine_ice::start, ast_rtp_engine_ice_candidate::transport, type, and ast_rtp_engine_ice_candidate::type.
Referenced by jingle_interpret_content().
|
static |
Function called to create a new Jingle Asterisk channel.
Definition at line 810 of file chan_motif.c.
References jingle_endpoint::accountcode, ao2_lock, ao2_ref, ao2_unlock, AST_ADSI_UNAVAILABLE, ast_channel_adsicpe_set(), ast_channel_alloc_with_endpoint, ast_channel_callgroup_set(), ast_channel_callid_set(), ast_channel_context_set(), ast_channel_exten_set(), ast_channel_nativeformats_set(), ast_channel_pickupgroup_set(), ast_channel_priority_set(), ast_channel_rings_set(), ast_channel_set_fd(), ast_channel_set_rawreadformat(), ast_channel_set_rawwriteformat(), ast_channel_set_readformat(), ast_channel_set_writeformat(), ast_channel_stage_snapshot(), ast_channel_stage_snapshot_done(), ast_channel_tech_pvt_set(), ast_channel_tech_set(), ast_channel_unlock, ast_exists_extension(), ast_format_cap_alloc, ast_format_cap_append_from_cap(), ast_format_cap_count(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_get_format(), ast_format_cap_get_framing(), AST_MEDIA_TYPE_UNKNOWN, ast_random(), ast_rtp_codecs_set_framing(), ast_rtp_instance_fd(), ast_rtp_instance_get_codecs(), ast_rtp_instance_get_ice(), AST_STATE_RING, ast_strlen_zero(), jingle_endpoint::callgroup, jingle_endpoint::connection, jingle_endpoint::context, ast_xmpp_client::endpoint, jingle_set_owner(), jingle_tech, JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, jingle_endpoint::language, jingle_endpoint::musicclass, jingle_endpoint::name, NULL, jingle_endpoint::pickupgroup, S_OR, session, ast_rtp_engine_ice::stop, and str.
Referenced by jingle_action_session_initiate(), and jingle_request().
|
static |
Callback for when a response is received for an outgoing session-initiate message.
Definition at line 1566 of file chan_motif.c.
References ao2_unlock, ast_callid_threadassoc_add(), ast_callid_threadassoc_remove(), AST_CAUSE_CONGESTION, AST_CAUSE_FACILITY_NOT_IMPLEMENTED, AST_CAUSE_NO_ROUTE_DESTINATION, AST_CAUSE_PROTOCOL_ERROR, AST_CAUSE_REQUESTED_CHAN_UNAVAIL, ast_channel_unlock, ast_channel_unref, AST_CONTROL_PROCEEDING, ast_copy_string(), ast_queue_control(), ast_rtp_instance_get_ice(), ast_strlen_zero(), end, error(), jingle_outgoing_hook(), jingle_queue_hangup_with_cause(), jingle_send_session_initiate(), jingle_send_transport_info(), jingle_session_lock_full(), JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, JINGLE_TRANSPORT_NONE, NULL, session, ast_rtp_engine_ice::stop, and XMPP_STANZAS_NS.
Referenced by jingle_call(), and jingle_outgoing_hook().
|
static |
Helper function which queues a hangup frame with cause code.
Definition at line 1239 of file chan_motif.c.
References ao2_unlock, ast_channel_name(), ast_channel_unlock, ast_channel_unref, ast_debug, ast_queue_hangup_with_cause(), jingle_session_lock_full(), and session.
Referenced by jingle_interpret_content(), jingle_interpret_description(), jingle_interpret_google_transport(), jingle_interpret_ice_udp_transport(), jingle_outgoing_hook(), jingle_send_session_action(), and jingle_send_transport_info().
|
static |
Function called by core to read any waiting frames.
Definition at line 1682 of file chan_motif.c.
References ao2_ref, ast_channel_fdno(), ast_channel_name(), ast_channel_nativeformats(), ast_channel_nativeformats_set(), ast_channel_readformat(), ast_channel_tech_pvt(), ast_channel_writeformat(), ast_debug, ast_format_cap_alloc, ast_format_cap_append, AST_FORMAT_CAP_FLAG_DEFAULT, ast_format_cap_iscompatible_format(), AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_VOICE, ast_frfree, ast_null_frame, ast_rtp_instance_read(), ast_set_read_format(), ast_set_write_format(), ast_frame_subclass::format, ast_frame::frametype, session, and ast_frame::subclass.
|
static |
Asterisk core interaction functions.
Function called by core to create a new outgoing Jingle session.
Definition at line 1946 of file chan_motif.c.
References ao2_cleanup, ao2_find, ao2_global_obj_ref, ao2_iterator_destroy(), ao2_iterator_init(), ao2_iterator_next, ao2_link, ao2_lock, ao2_ref, ao2_unlock, args, AST_APP_ARG, AST_CAUSE_BEARERCAPABILITY_NOTAVAIL, AST_CAUSE_CHANNEL_UNACCEPTABLE, AST_CAUSE_SWITCH_CONGESTION, ast_copy_string(), AST_DECLARE_APP_ARGS, ast_format_cap_has_type(), ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, AST_NONSTANDARD_APP_ARGS, ast_rtp_instance_get_ice(), AST_STATE_DOWN, ast_strdupa, ast_strlen_zero(), ast_channel::dialed, globals, ast_rtp_engine_ice::ice_lite, jingle_alloc(), jingle_enable_video(), jingle_endpoint_find(), jingle_new(), JINGLE_TRANSPORT_GOOGLE_V2, JINGLE_TRANSPORT_ICE_UDP, JINGLE_TRANSPORT_NONE, LOG_ERROR, name, NULL, OBJ_KEY, RAII_VAR, ast_xmpp_resource::resource, ast_xmpp_buddy::resources, and session.
|
static |
Internal helper function which sends an error response.
Definition at line 926 of file chan_motif.c.
References ast_log, ast_strlen_zero(), ast_xmpp_client_send(), end, error(), ast_xmpp_client::jid, LOG_ERROR, NULL, and type.
Referenced by jingle_action_session_accept(), jingle_action_session_info(), jingle_action_session_initiate(), jingle_action_session_terminate(), and jingle_action_transport_info().
|
static |
Internal helper function which sends a response.
Definition at line 906 of file chan_motif.c.
References ast_log, ast_xmpp_client_send(), ast_xmpp_client::jid, and LOG_ERROR.
Referenced by jingle_action_session_accept(), jingle_action_session_info(), jingle_action_session_initiate(), jingle_action_session_terminate(), and jingle_action_transport_info().
|
static |
Internal function which sends a session-accept message.
Definition at line 1560 of file chan_motif.c.
References jingle_send_session_action(), JINGLE_TRANSPORT_GOOGLE_V1, and session.
Referenced by jingle_answer().
|
static |
Internal function which sends a complete session message.
Definition at line 1472 of file chan_motif.c.
References AST_CAUSE_SWITCH_CONGESTION, ast_log, AST_MEDIA_TYPE_AUDIO, AST_MEDIA_TYPE_VIDEO, ast_xmpp_client_send(), ast_xmpp_increment_mid(), GOOGLE_SESSION_NS, jingle_add_content(), JINGLE_NS, jingle_queue_hangup_with_cause(), JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, NULL, and session.
Referenced by jingle_send_session_accept(), and jingle_send_session_initiate().
|
static |
Internal function which sends a session-info message.
Definition at line 1140 of file chan_motif.c.
References ast_log, ast_xmpp_client_send(), ast_xmpp_increment_mid(), end, sip_to_pjsip::info(), JINGLE_NS, JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, NULL, session, and text.
Referenced by jingle_indicate().
|
static |
Internal function which sends a session-initiate message.
Definition at line 1554 of file chan_motif.c.
References jingle_send_session_action(), JINGLE_TRANSPORT_GOOGLE_V1, and session.
Referenced by jingle_call(), and jingle_outgoing_hook().
|
static |
Internal function which sends a session-terminate message.
Definition at line 1100 of file chan_motif.c.
References ast_log, ast_xmpp_client_send(), ast_xmpp_increment_mid(), end, GOOGLE_SESSION_NS, JINGLE_NS, JINGLE_TRANSPORT_GOOGLE_V1, LOG_ERROR, NULL, session, and text.
Referenced by jingle_hangup().
|
static |
Internal function which sends a transport-info message.
Definition at line 1253 of file chan_motif.c.
References AST_CAUSE_SWITCH_CONGESTION, ast_log, ast_xmpp_client_send(), ast_xmpp_increment_mid(), GOOGLE_SESSION_NS, jingle_add_google_candidates_to_transport(), jingle_add_ice_udp_candidates_to_transport(), JINGLE_NS, jingle_queue_hangup_with_cause(), JINGLE_TRANSPORT_GOOGLE_V1, JINGLE_TRANSPORT_GOOGLE_V2, JINGLE_TRANSPORT_ICE_UDP, LOG_ERROR, NULL, and session.
Referenced by jingle_action_session_initiate(), and jingle_outgoing_hook().
|
static |
Function called by core to send text to the remote party of the Jingle session.
Definition at line 1860 of file chan_motif.c.
References ast_channel_tech_pvt(), ast_xmpp_client_send_message(), session, and text.
|
static |
Comparator function for Jingle sessions.
Definition at line 466 of file chan_motif.c.
References CMP_MATCH, CMP_STOP, OBJ_KEY, and jingle_session::sid.
Referenced by jingle_endpoint_state_create().
|
static |
Destructor for Jingle sessions.
Definition at line 603 of file chan_motif.c.
References ao2_cleanup, ast_rtp_instance_destroy(), ast_rtp_instance_stop(), ast_string_field_free_memory, ast_xmpp_client_unref(), and session.
Referenced by jingle_alloc().
|
static |
Hashing function for Jingle sessions.
Definition at line 457 of file chan_motif.c.
References ast_str_hash(), OBJ_KEY, session, and jingle_session::sid.
Referenced by jingle_endpoint_state_create().
|
static |
Definition at line 1190 of file chan_motif.c.
References ao2_lock, ao2_unlock, ast_channel_lock, ast_channel_ref, ast_channel_unlock, ast_channel_unref, NULL, and jingle_session::owner.
Referenced by jingle_action_session_accept(), jingle_action_session_info(), jingle_action_session_terminate(), jingle_interpret_content(), jingle_outgoing_hook(), and jingle_queue_hangup_with_cause().
|
static |
Set the channel owner on the jingle_session object and related objects.
Definition at line 698 of file chan_motif.c.
References ast_channel_uniqueid(), ast_rtp_instance_set_channel_id(), and session.
Referenced by jingle_fixup(), jingle_hangup(), and jingle_new().
|
static |
Function called by RTP engine to change where the remote party should send media.
Definition at line 684 of file chan_motif.c.
|
static |
Function called by core to write frames.
Definition at line 1740 of file chan_motif.c.
References ast_channel_nativeformats(), ast_channel_readformat(), ast_channel_tech_pvt(), ast_channel_writeformat(), ast_format_cap_get_names(), ast_format_cap_iscompatible_format(), AST_FORMAT_CAP_NAMES_LEN, AST_FORMAT_CMP_NOT_EQUAL, ast_format_get_name(), AST_FRAME_VIDEO, AST_FRAME_VOICE, ast_log, ast_rtp_instance_write(), ast_str_alloca, ast_frame_subclass::format, ast_frame::frametype, LOG_WARNING, session, and ast_frame::subclass.
|
static |
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 2769 of file chan_motif.c.
References accountcode, ACO_EXACT, aco_info_destroy(), aco_info_init(), aco_option_register, aco_option_register_custom, aco_process_config(), ao2_cleanup, ao2_global_obj_release, ast_channel_register(), ast_format_cap_alloc, ast_format_cap_append_by_type(), AST_FORMAT_CAP_FLAG_DEFAULT, ast_log, AST_MEDIA_TYPE_AUDIO, AST_MODULE_LOAD_DECLINE, ast_rtp_glue_register, ast_rtp_glue_unregister(), ast_sched_context_create(), ast_sched_context_destroy(), ast_sched_start_thread(), jingle_endpoint::cap, ast_channel_tech::capabilities, channel_type, voicemailpwcheck::context, custom_connection_handler(), custom_group_handler(), custom_transport_handler(), DEFAULT_MAX_ICE_CANDIDATES, DEFAULT_MAX_PAYLOADS, end, endpoint_options, FLDSET, globals, jingle_rtp_glue, jingle_tech, language, LOG_ERROR, jingle_endpoint::maxicecandidates, jingle_endpoint::maxpayloads, jingle_endpoint::musicclass, NULL, OPT_CODEC_T, OPT_STRINGFIELD_T, OPT_UINT_T, jingle_endpoint::parkinglot, PARSE_DEFAULT, and STRFLDSET.
|
static |
Reload module.
Definition at line 2842 of file chan_motif.c.
References aco_process_config(), and ACO_PROCESS_ERROR.
|
static |
Unload the jingle channel from Asterisk.
Definition at line 2852 of file chan_motif.c.
References aco_info_destroy(), ao2_cleanup, ao2_global_obj_release, ast_channel_unregister(), ast_rtp_glue_unregister(), ast_sched_context_destroy(), ast_channel_tech::capabilities, globals, jingle_rtp_glue, jingle_tech, and NULL.
|
static |
Definition at line 2872 of file chan_motif.c.
|
static |
Definition at line 2872 of file chan_motif.c.
|
static |
Definition at line 363 of file chan_motif.c.
Referenced by load_module().
|
static |
Definition at line 585 of file chan_motif.c.
struct aco_type* endpoint_options[] = ACO_TYPES(&endpoint_option) |
Definition at line 595 of file chan_motif.c.
Referenced by load_module().
|
static |
Referenced by jingle_action_hook().
struct aco_file jingle_conf |
Definition at line 597 of file chan_motif.c.
|
static |
Referenced by jingle_action_session_terminate(), and jingle_hangup().
|
static |
Local glue for interacting with the RTP engine core.
Definition at line 690 of file chan_motif.c.
Referenced by load_module(), and unload_module().
|
static |
PBX interface structure for channel registration.
Definition at line 395 of file chan_motif.c.
Referenced by jingle_new(), load_module(), and unload_module().
|
static |
Scheduling context for RTCP
Definition at line 371 of file chan_motif.c.