Trunk implementation of setting an alternate RTP source.

This contains the interface by which we can let an rtp instance know
that it might start receiving audio from a new source. This is similar
in nature to revision 197588 of Asterisk 1.4.

Review: https://reviewboard.asterisk.org/r/276



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@201583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2009-06-18 15:20:17 +00:00
parent a11ac5ae2f
commit dce6a54a4a
4 changed files with 135 additions and 2 deletions

View File

@@ -323,6 +323,8 @@ struct ast_rtp_engine {
void (*packetization_set)(struct ast_rtp_instance *instance, struct ast_codec_pref *pref);
/*! Callback for setting the remote address that RTP is to be sent to */
void (*remote_address_set)(struct ast_rtp_instance *instance, struct sockaddr_in *sin);
/*! Callback for setting an alternate remote address */
void (*alt_remote_address_set)(struct ast_rtp_instance *instance, struct sockaddr_in *sin);
/*! Callback for changing DTMF mode */
int (*dtmf_mode_set)(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode);
/*! Callback for retrieving statistics */
@@ -638,6 +640,28 @@ struct ast_frame *ast_rtp_instance_read(struct ast_rtp_instance *instance, int r
*/
int ast_rtp_instance_set_remote_address(struct ast_rtp_instance *instance, struct sockaddr_in *address);
/*!
* \brief Set the address of an an alternate RTP address to receive from
*
* \param instance The RTP instance to change the address on
* \param address Address to set it to
*
* \retval 0 success
* \retval -1 failure
*
* Example usage:
*
* \code
* ast_rtp_instance_set_alt_remote_address(instance, &sin);
* \endcode
*
* This changes the alternate remote address that RTP will be sent to on instance to the address given in the sin
* structure.
*
* \since 1.6.3
*/
int ast_rtp_instance_set_alt_remote_address(struct ast_rtp_instance *instance, struct sockaddr_in *address);
/*!
* \brief Set the address that we are expecting to receive RTP on
*