summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2006-05-16 22:11:02 +0000
committerKevin P. Fleming <kpfleming@digium.com>2006-05-16 22:11:02 +0000
commitc3dce57d95b4f313dde62f4d607a30f5c101596c (patch)
tree16a03f4e88229adb3de2cd5470afd1e4048a3956 /channels/chan_sip.c
parentca8f9083c0142f6c5be55408a80487dd44f2ea3c (diff)
mark RTP sessions that are not carrying DTMF
allow native bridging of RTP sessions that are not carrying DTMF even when the bridge needs to listen to DTMF (when SIP INFO is used for DTMF, for example) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d623df5ee..189e4f064 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2195,6 +2195,7 @@ static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer)
ast_rtp_destroy(r->vrtp);
r->vrtp = NULL;
}
+ ast_rtp_setdtmf(r->rtp, ast_test_flag(&r->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
r->prefs = peer->prefs;
natflags = ast_test_flag(&r->flags[0], SIP_NAT) & SIP_NAT_ROUTE;
if (r->rtp) {
@@ -3524,9 +3525,12 @@ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *si
free(p);
return NULL;
}
+ ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
ast_rtp_settos(p->rtp, global_tos_audio);
- if (p->vrtp)
+ if (p->vrtp) {
ast_rtp_settos(p->vrtp, global_tos_video);
+ ast_rtp_setdtmf(p->vrtp, 0);
+ }
p->rtptimeout = global_rtptimeout;
p->rtpholdtimeout = global_rtpholdtimeout;
p->rtpkeepalive = global_rtpkeepalive;
@@ -11170,6 +11174,7 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
get_rdnis(p, NULL); /* Get redirect information */
extract_uri(p, req); /* Get the Contact URI */
build_contact(p); /* Build our contact header */
+ ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
if (gotdest) {
if (gotdest == 1 && ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWOVERLAP)) {