diff options
author | Leif Madsen <leif@leifmadsen.com> | 2010-08-24 18:58:46 +0000 |
---|---|---|
committer | Leif Madsen <leif@leifmadsen.com> | 2010-08-24 18:58:46 +0000 |
commit | ea7ddb38fcf12ee43c9f7dda00703632d304ab39 (patch) | |
tree | 0acb4dfdc6c8978f0a02fd05b18e18889323a33a | |
parent | 4be043383cfcc65a6752d2ca0c2e07fc3b9c25d1 (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
-rw-r--r-- | channels/chan_sip.c | 2 | ||||
-rw-r--r-- | res/res_rtp_asterisk.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 947b64b0e..f50d837db 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4789,7 +4789,7 @@ static int dialog_initialize_rtp(struct sip_pvt *dialog) 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); 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]); |