From: Joshua Colp Date: Tue, 10 Oct 2006 15:25:05 +0000 (+0000) Subject: Merged revisions 44788 via svnmerge from X-Git-Tag: 1.6.0-beta1~3^2~4457 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fadc6c4ed763a5fc8e4de08b179d7f0653990b57;p=thirdparty%2Fasterisk.git Merged revisions 44788 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r44788 | file | 2006-10-10 11:23:14 -0400 (Tue, 10 Oct 2006) | 2 lines Only set DTMF information if an RTP structure exists ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44789 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 17c7d0eaa7..55e7a37628 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12944,8 +12944,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)) {