Christophe; I have checked in a change that I think will fix it but though it compiles I have no time to test it just yet. Please can you try this? It sends the DTMF packet twice, once with the END bit clear and the second time with it set. This is both legal and should make Asterisk happy.
Paul > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Paul Volkaerts > Sent: 11 August 2005 19:08 > To: Development of mythtv > Subject: RE: [mythtv] MythPhone and Asterisk > > > This looks wrong. The problem as I understand it is that Asterisk > needs the > DTMF packet without a Final-Event marker set and because I only send the > event once, I set the Final-Event marker. (So actually this is > an Asterisk > bug not a MythPhone bug, if I was being picky!). You are just > clearing the > Final-Event marker and then sending several times, but the final time does > not have the marker set either (as far as I can tell). > > Let me quickly check in a simple, alternative fix. > > Paul > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of Christophe Guerin > > Sent: 11 August 2005 15:28 > > To: Development of mythtv > > Subject: [mythtv] MythPhone and Asterisk > > > > > > This patch enable MythPhone to send DTMFs to Asterisk. > > (www.asterisk.org) > > Consider this patch suitably disclaimed, and without any warranty > > whatsoever. > > > > ----The beginning of the patch------ > > > > --- rtp.cpp.orig 2005-08-11 15:50:31.000000000 +0200 > > +++ rtp.cpp 2005-08-11 16:14:02.000000000 +0200 > > @@ -1448,22 +1448,25 @@ > > > > if (digit != ' ') > > { > > - //cout << "Sending DTMF digit " << digit << endl; > > - RTPPACKET dtmfPacket; > > - DTMF_RFC2833 *dtmf = (DTMF_RFC2833 *)(dtmfPacket.RtpData); > > + for (int i=0;i<3;i++) > > + { > > + //cout << "Sending DTMF digit " << digit << endl; > > + RTPPACKET dtmfPacket; > > + DTMF_RFC2833 *dtmf = (DTMF_RFC2833 > > *)(dtmfPacket.RtpData); > > > > - dtmf->dtmfDigit = CHAR2DTMF(digit); > > - dtmf->dtmfERVolume = 0x0A; // 0x0A | RTP_DTMF_EBIT; // > > Volume=10; E-bit set indicating end of event > > - dtmf->dtmfDuration = htons(0x0500); // Duration = 16ms > > - > > - txSequenceNumber += 1; // Increment seq-num; don't > > increment timestamp > > - dtmfPacket.RtpVPXCC = 128; > > - dtmfPacket.RtpMPT = dtmfPayload | > > RTP_PAYLOAD_MARKER_BIT; // Set for 1st tx of a digit, clear for > > retransmissions > > - dtmfPacket.RtpSequenceNumber = htons(txSequenceNumber); > > - dtmfPacket.RtpTimeStamp = htonl(txTimeStamp); > > - dtmfPacket.RtpSourceID = 0x666; > > + dtmf->dtmfDigit = CHAR2DTMF(digit); > > + dtmf->dtmfERVolume = 0x0A; // 0x0A | RTP_DTMF_EBIT; // > > Volume=10; E-bit set indicating end of event > > + dtmf->dtmfDuration = htons(0x0500); // Duration = 16ms > > + > > + txSequenceNumber += 1; // Increment seq-num; don't > > increment timestamp > > + dtmfPacket.RtpVPXCC = 128; > > + dtmfPacket.RtpMPT = dtmfPayload | > > RTP_PAYLOAD_MARKER_BIT; // Set for 1st tx of a digit, clear for > > retransmissions > > + dtmfPacket.RtpSequenceNumber = htons(txSequenceNumber); > > + dtmfPacket.RtpTimeStamp = htonl(txTimeStamp); > > + dtmfPacket.RtpSourceID = 0x666; > > > > - rtpSocket->writeBlock((char *)&dtmfPacket.RtpVPXCC, > > RTP_HEADER_SIZE+sizeof(DTMF_RFC2833), yourIP, yourPort); > > + rtpSocket->writeBlock((char *)&dtmfPacket.RtpVPXCC, > > RTP_HEADER_SIZE+sizeof(DTMF_RFC2833), yourIP, yourPort); > > + } > > } > > } > > } > > > > > > ---- the end of the patch ---- > > > > P.S. : I sent it there, because the developper doesn't seems to change > > the source. > > > > > > > _______________________________________________ > mythtv-dev mailing list > [email protected] > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev > _______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
