summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorLeif Madsen <leif@leifmadsen.com>2010-08-24 18:58:46 +0000
committerLeif Madsen <leif@leifmadsen.com>2010-08-24 18:58:46 +0000
commitea7ddb38fcf12ee43c9f7dda00703632d304ab39 (patch)
tree0acb4dfdc6c8978f0a02fd05b18e18889323a33a /res
parent4be043383cfcc65a6752d2ca0c2e07fc3b9c25d1 (diff)
Merged revisions 283457 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r283457 | lmadsen | 2010-08-24 13:56:29 -0500 (Tue, 24 Aug 2010) | 9 lines Fix issue where TOS is no longer set on RTP packets. Fix issue where the tos is no longer being set on RTP packets through res_rtp_asterisk. (closes issue #17890) Reported by: elguero Patches: qos_18.diff uploaded by elguero (license 37) Review: https://reviewboard.asterisk.org/r/868 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283458 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_rtp_asterisk.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 396aed533..df7cf27b5 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -270,6 +270,7 @@ static int ast_rtp_get_stat(struct ast_rtp_instance *instance, struct ast_rtp_in
static int ast_rtp_dtmf_compatible(struct ast_channel *chan0, struct ast_rtp_instance *instance0, struct ast_channel *chan1, struct ast_rtp_instance *instance1);
static void ast_rtp_stun_request(struct ast_rtp_instance *instance, struct ast_sockaddr *suggestion, const char *username);
static void ast_rtp_stop(struct ast_rtp_instance *instance);
+static int ast_rtp_qos_set(struct ast_rtp_instance *instance, int tos, int cos, const char* desc);
/* RTP Engine Declaration */
static struct ast_rtp_engine asterisk_rtp_engine = {
@@ -293,6 +294,7 @@ static struct ast_rtp_engine asterisk_rtp_engine = {
.dtmf_compatible = ast_rtp_dtmf_compatible,
.stun_request = ast_rtp_stun_request,
.stop = ast_rtp_stop,
+ .qos = ast_rtp_qos_set,
};
static inline int rtp_debug_test_addr(struct ast_sockaddr *addr)
@@ -2549,6 +2551,13 @@ static void ast_rtp_stop(struct ast_rtp_instance *instance)
ast_set_flag(rtp, FLAG_NEED_MARKER_BIT);
}
+static int ast_rtp_qos_set(struct ast_rtp_instance *instance, int tos, int cos, const char *desc)
+{
+ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
+
+ return ast_set_qos(rtp->s, tos, cos, desc);
+}
+
static char *rtp_do_debug_ip(struct ast_cli_args *a)
{
char *arg = ast_strdupa(a->argv[4]);