mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-09 22:45:49 +00:00
ari/pjsip: Make it possible to control transfers through ARI
Introduce a ChannelTransfer event and the ability to notify progress to ARI. Implement emitting this event from the PJSIP channel instead of handling the transfer in Asterisk when configured. Introduce a dialplan function to the PJSIP channel to switch between the "core" and "ari-only" behavior. UserNote: Call transfers on the PJSIP channel can now be controlled by ARI. This can be enabled by using the PJSIP_TRANSFER_HANDLING(ari-only) dialplan function.
This commit is contained in:
committed by
github-actions[bot]
parent
896a488cd5
commit
71eb8a262f
@@ -571,6 +571,22 @@ int ast_ari_validate_mailbox(struct ast_json *json);
|
||||
*/
|
||||
ari_validator ast_ari_validate_mailbox_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for AdditionalParam.
|
||||
*
|
||||
* Protocol specific additional parameter
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \retval True (non-zero) if valid.
|
||||
* \retval False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_additional_param(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_additional_param().
|
||||
*/
|
||||
ari_validator ast_ari_validate_additional_param_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for ApplicationMoveFailed.
|
||||
*
|
||||
@@ -911,6 +927,22 @@ int ast_ari_validate_channel_talking_started(struct ast_json *json);
|
||||
*/
|
||||
ari_validator ast_ari_validate_channel_talking_started_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for ChannelTransfer.
|
||||
*
|
||||
* transfer on a channel.
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \retval True (non-zero) if valid.
|
||||
* \retval False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_channel_transfer(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_channel_transfer().
|
||||
*/
|
||||
ari_validator ast_ari_validate_channel_transfer_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for ChannelUnhold.
|
||||
*
|
||||
@@ -1215,6 +1247,54 @@ int ast_ari_validate_recording_started(struct ast_json *json);
|
||||
*/
|
||||
ari_validator ast_ari_validate_recording_started_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for ReferTo.
|
||||
*
|
||||
* transfer destination requested by transferee
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \retval True (non-zero) if valid.
|
||||
* \retval False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_refer_to(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_refer_to().
|
||||
*/
|
||||
ari_validator ast_ari_validate_refer_to_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for ReferredBy.
|
||||
*
|
||||
* transfer destination requested by transferee
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \retval True (non-zero) if valid.
|
||||
* \retval False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_referred_by(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_referred_by().
|
||||
*/
|
||||
ari_validator ast_ari_validate_referred_by_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for RequiredDestination.
|
||||
*
|
||||
* Information about the requested destination
|
||||
*
|
||||
* \param json JSON object to validate.
|
||||
* \retval True (non-zero) if valid.
|
||||
* \retval False (zero) if invalid.
|
||||
*/
|
||||
int ast_ari_validate_required_destination(struct ast_json *json);
|
||||
|
||||
/*!
|
||||
* \brief Function pointer to ast_ari_validate_required_destination().
|
||||
*/
|
||||
ari_validator ast_ari_validate_required_destination_fn(void);
|
||||
|
||||
/*!
|
||||
* \brief Validator for StasisEnd.
|
||||
*
|
||||
@@ -1441,6 +1521,9 @@ ari_validator ast_ari_validate_application_fn(void);
|
||||
* - name: string (required)
|
||||
* - new_messages: int (required)
|
||||
* - old_messages: int (required)
|
||||
* AdditionalParam
|
||||
* - parameter_name: string (required)
|
||||
* - parameter_value: string (required)
|
||||
* ApplicationMoveFailed
|
||||
* - asterisk_id: string
|
||||
* - type: string (required)
|
||||
@@ -1606,6 +1689,14 @@ ari_validator ast_ari_validate_application_fn(void);
|
||||
* - application: string (required)
|
||||
* - timestamp: Date (required)
|
||||
* - channel: Channel (required)
|
||||
* ChannelTransfer
|
||||
* - asterisk_id: string
|
||||
* - type: string (required)
|
||||
* - application: string (required)
|
||||
* - timestamp: Date (required)
|
||||
* - refer_to: ReferTo (required)
|
||||
* - referred_by: ReferredBy (required)
|
||||
* - state: string
|
||||
* ChannelUnhold
|
||||
* - asterisk_id: string
|
||||
* - type: string (required)
|
||||
@@ -1726,6 +1817,19 @@ ari_validator ast_ari_validate_application_fn(void);
|
||||
* - application: string (required)
|
||||
* - timestamp: Date (required)
|
||||
* - recording: LiveRecording (required)
|
||||
* ReferTo
|
||||
* - bridge: Bridge
|
||||
* - connected_channel: Channel
|
||||
* - destination_channel: Channel
|
||||
* - requested_destination: RequiredDestination (required)
|
||||
* ReferredBy
|
||||
* - bridge: Bridge
|
||||
* - connected_channel: Channel
|
||||
* - source_channel: Channel (required)
|
||||
* RequiredDestination
|
||||
* - additional_protocol_params: List[AdditionalParam]
|
||||
* - destination: string
|
||||
* - protocol_id: string
|
||||
* StasisEnd
|
||||
* - asterisk_id: string
|
||||
* - type: string (required)
|
||||
|
Reference in New Issue
Block a user