diff options
author | Mark Michelson <mmichelson@digium.com> | 2009-06-18 15:20:17 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2009-06-18 15:20:17 +0000 |
commit | dce6a54a4a8bd2a36cdc72d6d111df6a252436a0 (patch) | |
tree | 71dde57cae86290e715b1392b9985c98ff99908b /include/asterisk | |
parent | a11ac5ae2f1961cab2806dc9618dcdc7247b252f (diff) |
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
Diffstat (limited to 'include/asterisk')
-rw-r--r-- | include/asterisk/rtp_engine.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h index edd7d1c47..3fcc12989 100644 --- a/include/asterisk/rtp_engine.h +++ b/include/asterisk/rtp_engine.h @@ -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 */ @@ -639,6 +641,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 * * \param instance The RTP instance to change the address on |