diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/_private.h | 1 | ||||
-rw-r--r-- | include/asterisk/autoconfig.h.in | 21 | ||||
-rw-r--r-- | include/asterisk/bridge_channel.h | 2 | ||||
-rw-r--r-- | include/asterisk/bridge_channel_internal.h | 23 | ||||
-rw-r--r-- | include/asterisk/channel.h | 36 | ||||
-rw-r--r-- | include/asterisk/core_local.h | 32 | ||||
-rw-r--r-- | include/asterisk/res_pjsip.h | 24 | ||||
-rw-r--r-- | include/asterisk/rtp_engine.h | 6 |
8 files changed, 130 insertions, 15 deletions
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h index 7963f3121..a4a4f1bea 100644 --- a/include/asterisk/_private.h +++ b/include/asterisk/_private.h @@ -53,6 +53,7 @@ void ast_stun_init(void); /*!< Provided by stun.c */ int ast_cel_engine_init(void); /*!< Provided by cel.c */ int ast_cel_engine_reload(void); /*!< Provided by cel.c */ int ast_ssl_init(void); /*!< Provided by ssl.c */ +int ast_pj_init(void); /*!< Provided by libasteriskpj.c */ int ast_test_init(void); /*!< Provided by test.c */ int ast_msg_init(void); /*!< Provided by message.c */ void ast_msg_shutdown(void); /*!< Provided by message.c */ diff --git a/include/asterisk/autoconfig.h.in b/include/asterisk/autoconfig.h.in index 6ed96ccb5..43f86b088 100644 --- a/include/asterisk/autoconfig.h.in +++ b/include/asterisk/autoconfig.h.in @@ -154,13 +154,13 @@ /* Define to 1 if you have the `cosl' function. */ #undef HAVE_COSL -/* Define to 1 if you have the `crypt' function. */ +/* Define to 1 if you have the 'crypt' function. */ #undef HAVE_CRYPT /* Define to 1 if you have the OpenSSL Cryptography library. */ #undef HAVE_CRYPTO -/* Define to 1 if you have the `crypt_r' function. */ +/* Define to 1 if you have the 'crypt_r' function. */ #undef HAVE_CRYPT_R /* Define to 1 if you have a functional curl library. */ @@ -580,26 +580,25 @@ /* Define if your system has the PJPROJECT libraries. */ #undef HAVE_PJPROJECT -/* Define to 1 if PJPROJECT has the PJSIP Dialog Create UAS with Incremented - Lock feature. */ +/* Define if your system has PJPROJECT_BUNDLED */ +#undef HAVE_PJPROJECT_BUNDLED + +/* Define if your system has pjsip_dlg_create_uas_and_inc_lock declared. */ #undef HAVE_PJSIP_DLG_CREATE_UAS_AND_INC_LOCK -/* Define to 1 if PJPROJECT has the PJSIP External Resolver Support feature. - */ +/* Define if your system has pjsip_endpt_set_ext_resolver declared. */ #undef HAVE_PJSIP_EXTERNAL_RESOLVER -/* Define to 1 if PJPROJECT has the pjsip_get_dest_info support feature. */ +/* Define if your system has pjsip_get_dest_info declared. */ #undef HAVE_PJSIP_GET_DEST_INFO /* Define if your system has the PJSIP_REPLACE_MEDIA_STREAM headers. */ #undef HAVE_PJSIP_REPLACE_MEDIA_STREAM -/* Define to 1 if PJPROJECT has the pj_ssl_cert_load_from_files2 support - feature. */ +/* Define if your system has pj_ssl_cert_load_from_files2 declared. */ #undef HAVE_PJ_SSL_CERT_LOAD_FROM_FILES2 -/* Define to 1 if PJPROJECT has the PJSIP Transaction Group Lock Support - feature. */ +/* Define if your system has pjsip_tsx_create_uac2 declared. */ #undef HAVE_PJ_TRANSACTION_GRP_LOCK /* Define to 1 if your system defines IP_PKTINFO. */ diff --git a/include/asterisk/bridge_channel.h b/include/asterisk/bridge_channel.h index 66f9be6e5..797be4ebc 100644 --- a/include/asterisk/bridge_channel.h +++ b/include/asterisk/bridge_channel.h @@ -162,6 +162,8 @@ struct ast_bridge_channel { struct timeval dtmf_tv; /*! Digit currently sending into the bridge. (zero if not sending) */ char dtmf_digit; + /*! Non-zero if a T.38 session terminate is owed to the bridge. */ + char t38_terminate; } owed; /*! DTMF hook sequence state */ struct { diff --git a/include/asterisk/bridge_channel_internal.h b/include/asterisk/bridge_channel_internal.h index e3fb73d7e..7f7d5a88b 100644 --- a/include/asterisk/bridge_channel_internal.h +++ b/include/asterisk/bridge_channel_internal.h @@ -84,7 +84,7 @@ struct ast_bridge_channel *bridge_channel_internal_alloc(struct ast_bridge *brid /*! * \internal - * \brief Clear owed events by the channel to the original bridge. + * \brief Settle owed events by the channel to the original bridge. * \since 12.0.0 * * \param orig_bridge Original bridge the channel was in before leaving. @@ -118,6 +118,27 @@ int bridge_channel_internal_push(struct ast_bridge_channel *bridge_channel); /*! * \internal + * \brief Push the bridge channel into its specified bridge. + * \since 13.8.0 + * + * \param bridge_channel Channel to push. + * \param optimized non-zero if the push with swap is for an optimization. + * + * \note A ref is not held by bridge_channel->swap when calling because the + * push with swap happens immediately. + * + * \note On entry, bridge_channel->bridge is already locked. + * + * \retval 0 on success. + * \retval -1 on failure. The channel did not get pushed. + * + * \note On failure the caller must call + * ast_bridge_features_remove(bridge_channel->features, AST_BRIDGE_HOOK_REMOVE_ON_PULL); + */ +int bridge_channel_internal_push_full(struct ast_bridge_channel *bridge_channel, int optimized); + +/*! + * \internal * \brief Pull the bridge channel out of its current bridge. * \since 12.0.0 * diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 384c22d5f..14bd32c07 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -1596,6 +1596,42 @@ void ast_channel_set_unbridged(struct ast_channel *chan, int value); void ast_channel_set_unbridged_nolock(struct ast_channel *chan, int value); /*! + * \brief This function will check if T.38 is active on the channel. + * + * \param chan Channel on which to check the unbridge_eval flag + * + * \return Returns 0 if the flag is down or 1 if the flag is up. + */ +int ast_channel_is_t38_active(struct ast_channel *chan); + +/*! + * \brief ast_channel_is_t38_active variant. Use this if the channel + * is already locked prior to calling. + * + * \param chan Channel on which to check the is_t38_active flag + * + * \return Returns 0 if the flag is down or 1 if the flag is up. + */ +int ast_channel_is_t38_active_nolock(struct ast_channel *chan); + +/*! + * \brief Sets the is_t38_active flag + * + * \param chan Which channel is having its is_t38_active value set + * \param is_t38_active Non-zero if T.38 is active + */ +void ast_channel_set_is_t38_active(struct ast_channel *chan, int is_t38_active); + +/*! + * \brief Variant of ast_channel_set_is_t38_active. Use this if the channel + * is already locked prior to calling. + * + * \param chan Which channel is having its is_t38_active value set + * \param is_t38_active Non-zero if T.38 is active + */ +void ast_channel_set_is_t38_active_nolock(struct ast_channel *chan, int is_t38_active); + +/*! * \brief Lock the given channel, then request softhangup on the channel with the given causecode * \param chan channel on which to hang up * \param causecode cause code to use (Zero if don't use cause code) diff --git a/include/asterisk/core_local.h b/include/asterisk/core_local.h index 491112d2b..8557072c6 100644 --- a/include/asterisk/core_local.h +++ b/include/asterisk/core_local.h @@ -42,6 +42,38 @@ struct stasis_message_type; /* ------------------------------------------------------------------- */ /*! + * \brief Lock the "chan" and "owner" channels (and return them) on the base + * private structure as well as the base private structure itself. + * + * \note This also adds references to each of the above mentioned elements and + * also the underlying private local structure. + * \note None of these locks should be held prior to calling this function. + * \note To undo this process call ast_local_unlock_all. + * + * \since 13.8.0 + * + * \param chan Must be a local channel + * \param outchan The local channel's "chan" channel + * \param outowner The local channel's "owner" channel + */ +void ast_local_lock_all(struct ast_channel *chan, struct ast_channel **outchan, + struct ast_channel **outowner); + +/*! + * \brief Unlock the "chan" and "owner" channels on the base private structure + * as well as the base private structure itself. + * + * \note This also removes references to each of the above mentioned elements and + * also the underlying private local structure. + * \note This function should be used in conjunction with ast_local_lock_all. + * + * \since 13.8.0 + * + * \param chan Must be a local channel + */ +void ast_local_unlock_all(struct ast_channel *chan); + +/*! * \brief Get the other local channel in the pair. * \since 12.0.0 * diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index ad34c8f5a..3008475c3 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -185,6 +185,8 @@ struct ast_sip_transport { unsigned int cos; /*! Write timeout */ int write_timeout; + /*! Allow reload */ + int allow_reload; }; #define SIP_SORCERY_DOMAIN_ALIAS_TYPE "domain_alias" @@ -2223,4 +2225,26 @@ struct ast_sip_transport_state *ast_sip_get_transport_state(const char *transpor */ struct ao2_container *ast_sip_get_transport_states(void); +/*! + * \brief Sets pjsip_tpselector from ast_sip_transport + * \since 13.8.0 + * + * \param transport The transport to be used + * \param selector The selector to be populated + * \retval 0 success + * \retval -1 failure + */ +int ast_sip_set_tpselector_from_transport(const struct ast_sip_transport *transport, pjsip_tpselector *selector); + +/*! + * \brief Sets pjsip_tpselector from ast_sip_transport + * \since 13.8.0 + * + * \param transport_name The name of the transport to be used + * \param selector The selector to be populated + * \retval 0 success + * \retval -1 failure + */ +int ast_sip_set_tpselector_from_transport_name(const char *transport_name, pjsip_tpselector *selector); + #endif /* _RES_PJSIP_H */ diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index 0f6ec7af6..67340335c 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -935,7 +935,7 @@ int ast_rtp_instance_set_requested_target_address(struct ast_rtp_instance *insta * \since 1.8 */ #define ast_rtp_instance_set_remote_address(instance, address) \ - ast_rtp_instance_set_requested_target_address((instance), (address)); + ast_rtp_instance_set_requested_target_address((instance), (address)) /*! * \brief Set the address that we are expecting to receive RTP on @@ -1047,7 +1047,7 @@ void ast_rtp_instance_get_requested_target_address(struct ast_rtp_instance *inst * \since 1.8 */ #define ast_rtp_instance_get_remote_address(instance, address) \ - ast_rtp_instance_get_incoming_source_address((instance), (address)); + ast_rtp_instance_get_incoming_source_address((instance), (address)) /*! * \brief Get the requested target address of the remote endpoint and @@ -1083,7 +1083,7 @@ int ast_rtp_instance_get_and_cmp_requested_target_address(struct ast_rtp_instanc * \since 1.8 */ #define ast_rtp_instance_get_and_cmp_remote_address(instance, address) \ - ast_rtp_instance_get_and_cmp_requested_target_address((instance), (address)); + ast_rtp_instance_get_and_cmp_requested_target_address((instance), (address)) /*! * \brief Set the value of an RTP instance extended property |