Discussions Search    Reviews    Search Aid    Buzzzz    Google@Omgili    Q&A Add to iGoogle   Bookmark and Share

  Advanced Search

Welcome to Omgili,
Omgili (Oh My God I Love It ;) is a search engine for discussions. With Omgili you can find answers and solutions, debates, discussions, personal experiences, opinions and more... To learn more about Omgili click here.

This is a complete preview of the discussion as it was indexed by Omgili crawlers. Use this preview if the original discussion is unavailable.
Click here to view the original discussion.
[http://discussion.forum.nokia.com/forum/showthread.php?t=144...]

Click here to search for discussions with Omgili discussions search engine.

Detecting OutGoing Call. - Developer Discussion Boards

Hi, I am developing a symbian application for detecting an outgoing call which is native phone outgoing call. My application will run background, when ever a outgoing voice call is made from phone, my application should detect and add additional digits to the dialed number and dial it again. for example, dialed no: 123456789 my app should add : xyz to the number and dial it back so finally xyz123456789 is the no dialed. Here i dont know how to detect an outgoing call made from phone? is this is possible to do as specified above? Pls anyone help me in doing it. Thanks, Srivatsan.D

Have a look into Wiki & SDK docs for API called CTelephony.

Hi, Check this link for CTelephony http://wiki.forum.nokia.com/index.ph...ith_CTelephony btw what is the SDK version you are working with.CTelephony is for 3.0 and onwards before that you will have to use class RCall.

Hi, Thanks for the reply. I am using s60 3rd edition device. is it possible to add digits to number dialed from phone and call back again by the application running in background? Thanks, Srivatsan

Not really, you would need to catch the number, then hang up the outgoing call, and then do a redial with the modified number.

Hi symbianyucca, Thanks for the reply. Can u please post any reference link / code for detecting a outgoing call? One more query ..

After redialing the number, the control of the call will be with my application or phone red key will have it? Thanks, Srivatsan

Hi, Check out this link(I have already forwarded this link in previous reply) http://wiki.forum.nokia.com/index.ph...ith_CTelephony here you can listen to both incoming as well as outgoing call. After you have redialled the number from your application you can control the call but Red Key also has the control for the call which means if you press Red key it will still have its behaviour of disconnecting the call.

I think it would not take too long of your time to do a bit of searching in the Wiki.

And for future purposes, it would be great if you would learn to search, since it can save days on any of the projects you would be doing.

Thanks all for the valuable information. Regards, Srivatsan

Hi yogpan, After redialing the number from my app running in background, it is possible to put call hold / resume / mute / add new call from the phone.. I mean my application should become dummy in that case. number dialed from phone

Hi symbianyucca, Searching wiki i made an application which detects incoming and outgoing call. It notifies the incoming call by giving voice line status changed. But i am unable to detect outgoing call from the phone because to make call i have to close the app. How can i run the application in the back ground ?

Such that it can detect the call status and notify me for further proceedings. Please help me. Thanks, Srivatsan

Hi, I didnt understand why u need to close your app if you want to make an outgoing call from Phone.

You can just put your application in background by Menu key and make a call from Telephony Idle where in which your application,which is running in the background, will detect it and will execute your required functionality.

Is that not what your requriement is??

Hi yogpan, Ya you are right.

Now i can detect the outgoing call and also the incoming call. But i dont know how to get the outgoing number in the application. My plan is to get the number, hang up the call, process the number and dial the modified number again. With this method i able to get the incoming number, void CCallMonitor::GetIncomingNumber() { CTelephony::TCallInfoV1Pckg callInfoV1Pckg(callInfoV1); CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg(callSelectionV1); CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg(remotePartyInfoV1); callSelectionV1.iLine = CTelephony::EVoiceLine; callSelectionV1.iSelect = CTelephony::EInProgressCall; // Get the call info User::LeaveIfError(iTelephony->GetCallInfo(callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg)); aPhoneNumber.Copy(remotePartyInfoV1Pckg().iRemoteNumber.iTelNumber); iCallBack.WriteLog(aPhoneNumber); } But how can i get the number which is getting dialed. Please help me. Thanks, Srivatsan

Hi, I found a link in wiki for retrieving incoming and outgoing numbers. http://wiki.forum.nokia.com/index.ph...g_call_numbers Thanks for all for providing me support. Thanks, Srivatsan

Hi, Now i can get the dialed number and modify it, and also hanged up the call initiated by phone. But i am unable to dial the modified number. This is the engine class. #include "CallMonitor.h" CCallMonitor::CCallMonitor(MCallCallBack& aCallBack) : CActive(0), iCallBack(aCallBack), iCurrentStatusPckg(iCurrentStatus), iCallSelectionPckg(iCallSelection) { } CCallMonitor::~CCallMonitor() { Cancel(); delete iTelephony; } void CCallMonitor::ConstructL(void) { CActiveScheduler::Add(this); iTelephony = CTelephony::NewL(); StartListening(); } void CCallMonitor::CancelOperation(void) { Cancel(); } void CCallMonitor:oCancel() { iTelephony->CancelAsync(CTelephony::EDialNewCallCancel); iTelephony->CancelAsync(CTelephony::EVoiceLineStatusChangeCancel); } void CCallMonitor::StartListening() { Cancel(); iCurrentStatus.iStatus = CTelephony::EStatusUnknown; iTelephony->NotifyChange(iStatus, CTelephony::EVoiceLineStatusChange,iCurrentStatusPckg); SetActive(); } void CCallMonitor::RunL() { iCallBack.CallStatusChangedL(iCurrentStatus.iStatus, iStatus.Int()); // Check Call Status // if status is dialing , get the dialed no if (iCurrentStatus.iStatus == CTelephony::EStatusDialling) { _LIT8( KDialing, "*** Dialing ***"); iCallBack.WriteLog(KDialing()); //Getting dialed number GetNumber(); // Hangup the outgoing call initiated by mobile. HangUpOnGoingCall(); // Dialing new call // DialNewCall(); } else if (iCurrentStatus.iStatus == CTelephony::EStatusRinging) { _LIT8( KDialing, "*** Ringing ***"); iCallBack.WriteLog(KDialing()); //Getting Incoming number GetNumber(); } else if (iCurrentStatus.iStatus == CTelephony::EStatusConnected) { _LIT8( KDialing, "*** Connected ***"); iCallBack.WriteLog(KDialing()); } else if (iCurrentStatus.iStatus == CTelephony::EStatusConnecting) { _LIT8( KDialing, "*** Connecting ***"); iCallBack.WriteLog(KDialing()); } else if (iCurrentStatus.iStatus == CTelephony::EStatusDisconnecting) { _LIT8( KDialing, "*** DisConnecting ***"); iCallBack.WriteLog(KDialing()); } else { _LIT8( KDialing, "*** Unknown Event ***"); iCallBack.WriteLog(KDialing()); } if (iStatus != KErrCancel) { StartListening(); } } void CCallMonitor::GetNumber() { CTelephony::TCallInfoV1Pckg callInfoV1Pckg(callInfoV1); CTelephony::TCallSelectionV1Pckg callSelectionV1Pckg(callSelectionV1); CTelephony::TRemotePartyInfoV1Pckg remotePartyInfoV1Pckg(remotePartyInfoV1); callSelectionV1.iLine = CTelephony::EVoiceLine; callSelectionV1.iSelect = CTelephony::EInProgressCall; // Get the call info User::LeaveIfError(iTelephony->GetCallInfo(callSelectionV1Pckg, callInfoV1Pckg, remotePartyInfoV1Pckg)); if (remotePartyInfoV1.iRemoteIdStatus == CTelephony::ERemoteIdentityAvailable) { if (remotePartyInfoV1.iRemoteNumber.iTelNumber.Length() >

0) { // Incoming call number can be read from aPhoneNumber.Copy(remotePartyInfoV1.iRemoteNumber.iTelNumber); } } if (callInfoV1.iDialledParty.iTelNumber.Length() >

0) { // Outgoing call number can be read from aPhoneNumber.Copy(callInfoV1.iDialledParty.iTelNumber); } iCallBack.WriteLog(aPhoneNumber); } void CCallMonitor::HangUpOnGoingCall() { RWsSession ws; ws.Connect(); TRawEvent ev1; ev1.Set(TRawEvent::EKeyDown, EStdKeyNo); ws.SimulateRawEvent(ev1); User::After(1 ); TRawEvent ev2; ev2.Set(TRawEvent::EKeyUp, EStdKeyNo); ws.SimulateRawEvent(ev2); ws.Close(); } void CCallMonitor:ialNewCall() { TBuf<20>

APhone; aPhone.Append(_L("+91")); aPhone.Append(aPhoneNumber); CTelephony::TTelNumber telNumber(aPhone); CTelephony::TCallParamsV1 callParams; callParams.iIdRestrict = CTelephony::ESendMyId; CTelephony::TCallParamsV1Pckg callParamsPckg(callParams); iTelephony->DialNewCall(iStatus, callParamsPckg, telNumber, iCallId, CTelephony::EVoiceLine); } After call gets hanged up i am trying to dial the modified number, but exactly at this line iTelephony->DialNewCall(iStatus, callParamsPckg, telNumber, iCallId, CTelephony::EVoiceLine); the app gets crashed. Please anyone can help me. Thanks, Srivatsan

Discussion Title: Detecting OutGoing Call.
Title Keywords: Detecting  OutGoing  Call.  Developer  Discussion  Boards