summaryrefslogtreecommitdiff
path: root/res/res_sip_sdp_rtp.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
committerMark Michelson <mmichelson@digium.com>2013-07-18 19:25:51 +0000
commitc47787feab34d9572b41ebe7148c169b52362fbd (patch)
tree85410d3780938b31d9605f6d05cef9a744c3932d /res/res_sip_sdp_rtp.c
parent3c86832f9f271c8d479cf956155424fda512c76b (diff)
Add a bunch of options from sip.conf to res_sip.conf
For a complete list of the options added, see the review linked at the bottom of this commit message. (closes issue ASTERISK-21506) reported by Matt Jordan Review: https://reviewboard.asterisk.org/r/2671 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_sip_sdp_rtp.c')
-rw-r--r--res/res_sip_sdp_rtp.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/res/res_sip_sdp_rtp.c b/res/res_sip_sdp_rtp.c
index bc150ed4a..b299ed758 100644
--- a/res/res_sip_sdp_rtp.c
+++ b/res/res_sip_sdp_rtp.c
@@ -108,7 +108,8 @@ static int create_rtp(struct ast_sip_session *session, struct ast_sip_session_me
{
struct ast_rtp_engine_ice *ice;
- if (!(session_media->rtp = ast_rtp_instance_new("asterisk", sched, ipv6 ? &address_ipv6 : &address_ipv4, NULL))) {
+ if (!(session_media->rtp = ast_rtp_instance_new(session->endpoint->rtp_engine, sched, ipv6 ? &address_ipv6 : &address_ipv4, NULL))) {
+ ast_log(LOG_ERROR, "Unable to create RTP instance using RTP engine '%s'\n", session->endpoint->rtp_engine);
return -1;
}
@@ -132,6 +133,16 @@ static int create_rtp(struct ast_sip_session *session, struct ast_sip_session_me
ast_rtp_instance_dtmf_mode_set(session_media->rtp, AST_RTP_DTMF_MODE_INBAND);
}
+ if (!strcmp(session_media->stream_type, STR_AUDIO) &&
+ (session->endpoint->tos_audio || session->endpoint->cos_video)) {
+ ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->tos_audio,
+ session->endpoint->cos_audio, "SIP RTP Audio");
+ } else if (!strcmp(session_media->stream_type, STR_VIDEO) &&
+ (session->endpoint->tos_video || session->endpoint->cos_video)) {
+ ast_rtp_instance_set_qos(session_media->rtp, session->endpoint->tos_video,
+ session->endpoint->cos_video, "SIP RTP Video");
+ }
+
return 0;
}