aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-10 15:23:14 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-10-10 15:23:14 +0000
commit48159629ae89b91b23a08a4999568b3a1590b6ed (patch)
treeb13b980ef2dcef7e28561e8733d06ccd1687bf30 /channels
parent16e4196309e470fcb859cf6db150bffc0beaf855 (diff)
Only set DTMF information if an RTP structure exists
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44788 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 6cb424564..dfec3953d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12994,8 +12994,11 @@ 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);
- ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
+
+ if (p->rtp) {
+ ast_rtp_setdtmf(p->rtp, ast_test_flag(&p->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
+ ast_rtp_setdtmfcompensate(p->rtp, ast_test_flag(&p->flags[1], SIP_PAGE2_RFC2833_COMPENSATE));
+ }
if (!replace_id && gotdest) { /* No matching extension found */
if (gotdest == 1 && ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWOVERLAP)) {