×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    RTP DTMF sending issue in S60 3Ed Fp1

    Hi,

    I am trying to send DTMF digits using RTP (RFC 2833) in VoIP client for S60 3Ed FP1 (E51), but the Event Id i can see in the RTP packets are not received as per the Digit number. Instead the ASCII value for the digist is being found in the RTP packets sniffed.

    One more strange behavior found is instead of single RTP packet for Digit, a lot of RTP packets with different RTP events and values can be seen in packet sniffed.

    The code snippet is as following:

    TBuf8<160> aPayloadData (_L8(""));
    TChar c1(0x8A);
    TChar c2(0x07);
    TChar c3(0xD0);
    TBuf8<156> lPad;

    //Set necessary parameter
    iTimeStamp += iPacketSize; //Found OK in RTP Packet
    iSendPacket.SetMarker( 1 ); //Found OK in RTP Packet
    iSendPacket.SetTimestamp( iTimeStamp ); //Found OK in RTP Packet
    iSendPacket.SetPayloadType( 101 ); //Found OK in RTP Packet
    iPayloadDesC.Set(const_cast<TUint8*>(iSendPacket.WritePayload().Ptr()), iPacketSize, iPacketSize); //packet size is 160

    //Init the padding
    lPad.Zero();

    //Append the DTMF string
    aPayloadData.Zero();
    aPayloadData.Append( aDTMFdigit ); //Instead of 1 found Hex 31 or Decimal 49 that is ASCII value of char 1
    aPayloadData.Append( c1 ); //Found OK in RTP Packet
    aPayloadData.Append( c2 ); //Found OK in RTP Packet
    aPayloadData.Append( c3 ); //Found OK in RTP Packet
    aPayloadData.Append( lPad );

    iPayloadDesC.Copy(aPayloadData);
    TInt tmp = iPayloadDesC.Length();
    iSendPacket.WritePayload().SetLength(tmp);
    iSendPacket.Send();

    Has anyone has ever faced such issue? Is there anything wrong or missing in the code?

    Best Regards
    Rajat

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2007
    Posts
    121

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    Hi,
    RTP stack should not alter the payload so the change of 0x1 to 0x31 sounds strange. What happens if you send a RTP packet in this way:
    Code:
    iSendPacket.SetPayloadType(101);
    iSendPacket.SetMarker( 1 );
    iPayloadDesC.Set(const_cast<TUint8*>(iSendPacket.WritePayload().Ptr()), iPacketSize, iPacketSize); //packet size is 160
    
    TBuf8<160> payload;
    payload.Append(TPtrC8((const TUint8 *)("\x1\x8A\x07\xD0"), 4)); //4
    iPayloadDesC.Copy(payload);
    
    TInt tmp = iPayloadDesC.Length();
    iSendPacket.WritePayload().SetLength(tmp);
    iSendPacket.Send();
    Code works fine on N95 and Event field has a value 0x1. Btw, are you waiting RRtpSendSource to call a callback function which tells that sending is completed before sending the next packet? Sending a new packet before the old one is completed might cause some strange behavior..
    Last edited by juhanak; 2008-02-02 at 14:25.

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    Hi,

    Thanks for the response. DTMF works fine now. The other problem of packets with different RTP event gets solved after using the APIs SetPayloadType() and SetMarker() while sending each RTP packets.

    Thanks
    Rajat

  4. #4
    Nokia Developer Moderator
    Join Date
    Sep 2007
    Posts
    121

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    Good that it works now!

    I think you can avoid setting the payload every time, by calling RRtpSendSource::SetPayloadType() before calling RRtpSendSource::NewSendPacketL()


    -Juhana

  5. #5
    Regular Contributor
    Join Date
    May 2007
    Location
    India
    Posts
    136

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    Hi Juhana,

    Thanks for comment.

    Yes i do set the payload type before calling NewSendPacketL API. But here i need to change the payload type to 101 for DTMF (RFC 2833) from either 0(Pcmu) or 8(Pcma). What i faced was if once set the 101 using SetPayloadType it always keeps it as default. These led me to set the Payload type for every packet.

    Best Regards
    Rajat

  6. #6
    Registered User
    Join Date
    Mar 2003
    Posts
    45

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    I am using the Nokia inbuilt VoIP client in N95 with Gizmo service.

    Your description "instead of a single RTP packet for Digit, a lot of RTP packets with different RTP events and values can be seen in packet sniffed" describes the same problem that I and others experience.

    e.g.:
    http://discussions.europe.nokia.com/...215&jump=true#

    Could it be that Rajat's original code is similar to the Nokia VoIP client implementation?

  7. #7
    Registered User
    Join Date
    Apr 2009
    Posts
    37

    Re: RTP DTMF sending issue in S60 3Ed Fp1

    Why we need to append dtmf digit with 0x8A,0x07,0xD0?
    Last edited by neelimabtt; 2009-08-11 at 13:14.

Similar Threads

  1. problmes with signsis in s60 3rd FP1 & Carbide
    By billbonney in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 3
    Last Post: 2007-11-12, 14:11
  2. Sending RTP
    By ecio83 in forum Symbian Media (Closed)
    Replies: 5
    Last Post: 2007-10-11, 15:29
  3. Sending DTMF
    By saji_iq in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2007-05-25, 15:54
  4. Hotkey support in S60 3rd ed FP1
    By svdwal in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-02-12, 12:09
  5. urgent.. DTMF sending problem using CTelephony
    By midh_krish in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-01-22, 15:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •