mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-19 11:42:27 +00:00
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:
@@ -50,6 +50,8 @@ struct ast_rtp_instance {
|
||||
struct sockaddr_in local_address;
|
||||
/*! Address that we are sending RTP to */
|
||||
struct sockaddr_in remote_address;
|
||||
/*! Alternate address that we are receiving RTP from */
|
||||
struct sockaddr_in alt_remote_address;
|
||||
/*! Instance that we are bridged to if doing remote or local bridging */
|
||||
struct ast_rtp_instance *bridged;
|
||||
/*! Payload and packetization information */
|
||||
@@ -373,6 +375,20 @@ int ast_rtp_instance_set_remote_address(struct ast_rtp_instance *instance, struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_rtp_instance_set_alt_remote_address(struct ast_rtp_instance *instance, struct sockaddr_in *address)
|
||||
{
|
||||
instance->alt_remote_address.sin_addr = address->sin_addr;
|
||||
instance->alt_remote_address.sin_port = address->sin_port;
|
||||
|
||||
/* oink */
|
||||
|
||||
if (instance->engine->alt_remote_address_set) {
|
||||
instance->engine->alt_remote_address_set(instance, &instance->alt_remote_address);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ast_rtp_instance_get_local_address(struct ast_rtp_instance *instance, struct sockaddr_in *address)
|
||||
{
|
||||
if ((address->sin_family != AF_INET) ||
|
||||
|
Reference in New Issue
Block a user