[asterisk-commits] lmadsen: branch 1.8 r283457 - in /branches/1.8: channels/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 24 13:56:33 CDT 2010


Author: lmadsen
Date: Tue Aug 24 13:56:29 2010
New Revision: 283457

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=283457
Log:
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

Modified:
    branches/1.8/channels/chan_sip.c
    branches/1.8/res/res_rtp_asterisk.c

Modified: branches/1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/chan_sip.c?view=diff&rev=283457&r1=283456&r2=283457
==============================================================================
--- branches/1.8/channels/chan_sip.c (original)
+++ branches/1.8/channels/chan_sip.c Tue Aug 24 13:56:29 2010
@@ -4789,7 +4789,7 @@
 	ast_rtp_instance_set_prop(dialog->rtp, AST_RTP_PROPERTY_DTMF, ast_test_flag(&dialog->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833);
 	ast_rtp_instance_set_prop(dialog->rtp, AST_RTP_PROPERTY_DTMF_COMPENSATE, ast_test_flag(&dialog->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
 
-	ast_rtp_instance_set_qos(dialog->rtp, global_tos_audio, 0, "SIP RTP");
+	ast_rtp_instance_set_qos(dialog->rtp, global_tos_audio, global_cos_audio, "SIP RTP");
 
 	do_setnat(dialog);
 

Modified: branches/1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_rtp_asterisk.c?view=diff&rev=283457&r1=283456&r2=283457
==============================================================================
--- branches/1.8/res/res_rtp_asterisk.c (original)
+++ branches/1.8/res/res_rtp_asterisk.c Tue Aug 24 13:56:29 2010
@@ -270,6 +270,7 @@
 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 @@
 	.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 @@
 	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]);




More information about the asterisk-commits mailing list