×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    104

    How to detect end of DTMF tone sending

    Hi,

    I am using CPhCltCommandHandler::Vts() to send DTMF tone.

    But from our actual test result on device (N95 in our case). Vts() will complete (calling RunL()) very soon. If we send 10 DTMF tones, it will complete very fast (like 1 sec) but the phone device will only finish sending out DTMF tone in like 6~10 sec.

    Because we aim to make conference call right after sending DTMF tone. So how can we detect exactly or rather accurately when will DTMF tone finish sending?

    We have even tried to kill the app. after Vts() completes. And still the phone will keep sending out DTMF tones. So seems Vts() only pass the request to the phone and then let the phone handle slowly.

    We tried to set a timeout (like 10 sec for 10 DTMF tones). But the problem is different phones send DTMF tone in different speed.... So making it very hard to make estimation.

    I am using Phone Client Extension API. And basically modified the example inside as follows.

    In this particular code, PhCltCallBack(2) is called after all Vts() completes. But the phone is actually still sending DTMF tone slowly.

    Any solutions how to detect end of DTMF sending?

    Thanks,

    Picco


    #include "PhCltCommandHandler_DTMF.h"

    #include <EIKENV.H>


    CExtensionDTMF::CExtensionDTMF(MPhCltCallBack* parent)
    : CActive(EPriorityStandard),
    #ifndef _S60_FP2_

    iFactory(NULL),
    #endif
    parent(parent),iHandler(NULL)

    {
    isHoldingCall = false;
    }


    CExtensionDTMF::~CExtensionDTMF()
    {
    Cancel();

    if(iHandler)
    {
    #ifndef _S60_FP2_
    iHandler->Close();
    #endif
    }

    delete iHandler;
    iHandler = NULL;

    #ifndef _S60_FP2_
    iLibrary.Close();
    #endif
    }


    void CExtensionDTMF::ConstructL(void)
    {
    CActiveScheduler::Add(this);
    holdcase = 0;
    #ifndef _S60_FP2_

    _LIT( KPhCltExtLib, "PhoneClientExt.dll" );

    // Factory class for creating command handler
    User::LeaveIfError( iLibrary.Load( KPhCltExtLib ) ); // Load PhoneClientExt dll

    #ifndef __WINS__

    TInt res = 0; TInt err=0;
    TRAP(err,res = iLibrary.Lookup( 1 )());
    if (err == KErrNone)
    {
    iFactory = reinterpret_cast< CPhCltExtFactory * >( res );
    if ( iFactory )
    {
    iHandler = iFactory->CPhCltCommandHandlerLD();
    User::LeaveIfError(iServer.Connect());
    iHandler->Open(iServer);
    }
    }
    #endif
    #endif

    #ifdef _S60_FP2_

    iHandler = CPhCltCommandHandler::NewL();
    #endif

    }

    void CExtensionDTMF::HoldCall()
    {
    #ifndef __WINS__

    isHoldingCall = true;
    iHandler->Chld(iStatus,EPhCltChldTwo,0);

    //User::WaitForRequest(iStatus);

    SetActive();
    #endif
    }

    void CExtensionDTMF::SendDTMF(const TDesC8& aTones)
    {
    #ifndef __WINS__


    iCurrentTone = 0;
    iDTMFTones.Copy(aTones);
    SendOneTone();
    #endif
    }

    void CExtensionDTMF::SendOneTone(void)
    {
    #ifndef __WINS__
    if(iCurrentTone < iDTMFTones.Length())
    {
    iSendingTone = iDTMFTones[iCurrentTone];
    iCurrentTone++;

    iSending = ETrue;
    iHandler->Vts(iStatus,iSendingTone,EPhCltDtmfStart);
    SetActive();
    }
    else
    {

    parent->PhCltCallBack(2);

    //done..
    }
    #endif
    }

    void CExtensionDTMF::RunL()
    {
    if (isHoldingCall) {
    isHoldingCall = false;


    parent->PhCltCallBack(holdcase);
    return;
    }
    #ifndef __WINS__
    if(iSending)
    {
    iSending = EFalse;
    iHandler->Vts(iStatus,iSendingTone,EPhCltDtmfStop);
    SetActive();
    }
    else
    {

    SendOneTone();// send next tone
    }
    #endif
    }

    void CExtensionDTMF:oCancel()
    {

    }


    // End of File

  2. #2
    Regular Contributor
    Join Date
    Nov 2005
    Posts
    131

    Re: How to detect end of DTMF tone sending

    I think one convenient way is to use CTelephony::SendDTMFTones()

  3. #3
    Regular Contributor
    Join Date
    Jul 2004
    Posts
    104

    Re: How to detect end of DTMF tone sending

    hi beltry,

    It works. Thanks a lot.

    Picco

Similar Threads

  1. How to Detect End of Stream?
    By lancemachine in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2008-11-29, 15:35
  2. how detect key Press (dtmf)
    By mohammadyou in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-09-18, 18:54
  3. detect Dtmf
    By mohammadyou in forum Mobile Java General
    Replies: 1
    Last Post: 2007-09-17, 23:58
  4. Nokia 30 - Sending Logo & Tone
    By erick21 in forum General Messaging
    Replies: 1
    Last Post: 2002-11-21, 09:06
  5. SMS Msg using VB Application
    By gurup83 in forum General Messaging
    Replies: 2
    Last Post: 2002-07-11, 04:48

Posting Permissions

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