How to use call status PJSIP_INV_STATE_CONFIRMED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mr. Srivatsan 

First of all thanks for valuable information and quick reply basically I
implemented Timer based on CActive Class, and it is working but  on only
keypress event and stop on keypress event, i implemented CActive timer on
container class file,  when I want to get current call status I unable to
find call_id and call state with this code(I am attaching both class and
header files)

{

pjsua_call_info ci;            

                                

                                pjsua_call_id call_id;

                                                pjsua_call_get_info(call_id,
&ci);              // not getting call_id here and call state too if I
change condition to call iAppContainer->StartCountdown(); and
iAppContainer->Start(); clock starts

 


 
if (ci.state ==  PJSIP_INV_STATE_CONFIRMED) {

 
iAppContainer->StartCountdown();

 
}

 
else{

 
iAppContainer->Stop();

 
}

 


                                                }

                

 Thanks

Bharat

 

From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org]
On Behalf Of Srivatsan Deenadayalan
Sent: Monday, April 27, 2009 10:34 AM
To: pjsip list
Subject: Re: How to use call status PJSIP_INV_STATE_CONFIRMED

 

Bharat,

1. Capture all event from PjSIP on_call_state call back method.
2. Then, you can use symbian timer to show the call duration.
3. Start timer with the timer gap (say, 1 sec) as per you required and
invoke your draw method during "PJSIP_INV_STATE_CONFIRMED"
4. Stop timer on call end event "PJSIP_INV_STATE_DISCONNECTED".

This may help you,

// In header file
CPeriodic* iTimer;
TInt iCounter;
TBuf<50> iTimeBuffer;

void InvokeTimerL();
static TInt StartMyFunc(TAny* aThis);
void IncrementTimer();
void CancelTimerL();

// In Class file
1. Calling this method will invoke timer, this method should be called
during " PJSIP_INV_STATE_CONFIRMED "
void MyClass::InvokeTimerL()
    {
    if (!iTimer)
        {
        iTimer = CPeriodic::NewL(CActive::EPriorityHigh);
        }
   // Calls your function on completion of 1 sec and continuous till timer
is canceled. 
    iTimer->Start(1000000, 1000000, TCallBack(StartMyFunc, this));
    }

TInt MyClass::StartMyFunc(TAny* aThis)
    {
    TRAP_IGNORE(((MyClass*)aThis)->IncrementTimer());
    return KErrNone;
    }

void MyClass::IncrementTimer()
    {
    TTime time;
    _LIT(KDateCorrect,"20070901:");

   // Just setting a dummy value.
    time.Set(KDateCorrect);
    // Incrementing the counter to show seconds changing.
    time += TTimeIntervalSeconds(iCounter++);
    _LIT(KFormatTxt,"%-B%:0%H%:1%T%:2%S%:3");

    time.FormatL(iTimeBuffer, KFormatTxt);

    // iTimeBuffer will have call duration 00:00:00, and will be updated as
00:00:01 and so on.
    //Call your draw method here
    }

// To Cancel timer at any point, you can use this during "
PJSIP_INV_STATE_DISCONNECTED "
void MyClass::CancelTimerL()
    {
    if (iTimer)
        {
        if (iTimer->IsActive())
            {
            iTimer->Cancel();
            iCounter = 0;
            }
        }
    }

Bharat Yadav wrote: 

Hi Mr. Srivatsan 

Sorry for not explained properly, actually I have GUI based on
symbian_ua_gui but not same, I made it working with S60 3rd MR, I the last I
want to show a call timer and call timer based on CActive working on
keypress event showing 1 Sec. encremental order, but it is on keypress event
I want it to start when the call state get "PJSIP_INV_STATE_CONFIRMED" and
stop on "PJSIP_INV_STATE_DISCONNECTED" , this is my basec issue. Please help
to resolve it.

One thing more can u please guide me call logging process mean log voip call
their time stamp and connect time and disconnect time. 

Note: My Call timer format is 00:00:00 like _LIT(KFormatString,
"%02d:%02d:%02d") 

Thanks

Bharat

 

From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org]
On Behalf Of Srivatsan Deenadayalan
Sent: Sunday, April 26, 2009 10:47 PM
To: pjsip list
Subject: Re: How to use call status PJSIP_INV_STATE_CONFIRMED

 

Your question is confusing. Can you elaborate what you need exactly? i feel
your question is regarding PjSIP in symbian, if yes i ll try to help you.

Bharat Yadav wrote: 

Hi all

Should I get the information for using of call state feature for my duration
counter function call start on when the call state is
PJSIP_INV_STATE_CONFIRMED and stop on PJSIP_INV_STATE_DISCONNECTED,

 

Is it possible if so please guide me and also I want to use it on view
container.

Thanks

Bharat

 

 
 



  _____  



 
 
  
 
_______________________________________________
Visit our blog: http://blog.pjsip.org
 
pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
  






-- 
Regards,
Srivatsan.D,
 
 
 



  _____  



 
_______________________________________________
Visit our blog: http://blog.pjsip.org
 
pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
  





-- 
Regards,
Srivatsan.D,
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090427/7b3a9960/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: container.cpp
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090427/7b3a9960/attachment-0001.cpp>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: AppContainer.h
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090427/7b3a9960/attachment-0001.h>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux