Detect call connection

Login to reply to this topic.
Sat, 2005-12-10 00:18
Joined: 2005-05-19
Forum posts: 45
Does anybody know how to detect that a call has been picked up?  I have an app that dials the phone (CSD data call) and then I need to wait until the other end picks up.  I have used RCall.NotifyStatusChange() function to wait for a status change, but it does not appear to work.

Any advice?

"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein


Sat, 2005-12-10 06:11
Joined: 2005-02-12
Forum posts: 98
Re: Detect call connection
Use RLine as following

iLine.NotifyStatusChange(iStatus,iCallStatus);

And when control comes in RUNL now use following Lines

iLine.GetStatus(iCallStatus)
if(iCallStatus= RCall::EStatusConnected)
{
Do What You Want;
}
else
{
   //Reissue request bcz something else happened not call     //connected
iLine.NotifyStatusChange(iStatus,iCallStatus);

}

Good Luck
Tue, 2005-12-20 17:06
Joined: 2005-05-19
Forum posts: 45
Re: Detect call connection
vikas_bansal - thanks for the reply... this works!  I do have another question... does the call to NotifyStatusChange need an associated NotifyStatusChangeCancel... or is this a oneshot type of notification?

Thanks

"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein

Sat, 2005-12-24 10:26
Joined: 2005-02-12
Forum posts: 98
Re: Detect call connection
NotifystatuschangeCancel is used to cancel the Notifystatuschange request.

You should use it in DoCancel function of your class. since it is always called when you call cancel() in destructor of your class.
Since rule is that there should be no outstanding request at time of deletion of  the object (which was used to  issue this NotifystatusChange request)
Fri, 2006-01-06 23:55
Joined: 2005-05-19
Forum posts: 45
Re: Detect call connection
vikas_bansal.... thanks.. the stuff works great.  I do have one small problem.  It seems that sometimes, in my CActive derived call monitor, if I am waiting on a line status change... like this

iState = EStateConnected;
iLine.NotifyStatusChange(iStatus);
SetActive();

So the above, puts my CActive class in a connected state (i.e. the two phones are connected in a data call) and this works... the purpose of the above is then to tell my CActive class to execute the RunL() function when a line status change occurs... i.e. somebody hangs up the line.

For other status changes, my RunL() function is called as it should and things work fine.  The strange problem is that the RunL() function does not get called when the call is hungup on the receiving phone.  It does get called on the phone that placed the call.

Has anybody experienced the NotifyStatusChange() function not missing some status change messages?

Thanks,

"If we knew what it was we were doing, it would not be called research, would it?" - Albert Einstein

  • Login to reply to this topic.