×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    SIP Registration Status

    How do I find the registration status of a SIP account programmatically. To be precise, would like to know, if SIP account is registered successfully, failed or in progress.

    Also, is there a way to force it to re-register.

    Thanks
    Gamma

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

    Re: SIP Registration Status

    Following code will loop through all SIP profiles and check if profile is registered. If not registered, it will print last error code:
    Code:
    RPointerArray< CSIPProfile > aProfiles; 
    TUid uid = TUid::Uid(1010101); 
    CSIP *iSIP = CSIP::NewLC( uid, *this ); 
    CSIPProfileRegistry* iProfileRegistry = CSIPProfileRegistry::NewLC( *iSIP, *this ); 
    
    iProfileRegistry->ProfilesL(aProfiles); 
    
    for(TInt i = 0 ; i < aProfiles.Count(); i++) 
    { 
      CSIPProfile *prof = (CSIPProfile *)aProfiles[i]; 
      TBool registered( EFalse ); 
      prof->GetParameter(KSIPProfileRegistered, registered); 
    
      if(registered) 
        { 
        CEikonEnv::InfoWinL(_L("REGISTERED"),_L(" "));
        }
      else
        {
        TInt err = iProfileRegistry->LastRegistrationError(*prof);
        //Last registration error
        TBuf<10> errr;
        errr.AppendNum(err);
        CEikonEnv::InfoWinL(errr,_L("Err"));
        }
    }
    
    CleanupStack::PopAndDestroy(2); //iSIP,iProfileRegistry

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    Re: SIP Registration Status

    Thanks my friend.

    Gamma
    Last edited by gammav; 2008-05-30 at 07:36.

  4. #4
    Regular Contributor
    Join Date
    May 2008
    Posts
    139

    Re: SIP Registration Status

    Thanks all for help
    Last edited by gammav; 2008-05-30 at 07:35.

Similar Threads

  1. Sip Registration
    By apus29 in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2008-04-07, 20:01
  2. SIP Registration error
    By gamma8 in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-11-29, 09:31
  3. Problem with SIP Registration
    By capricious28 in forum Mobile Java General
    Replies: 0
    Last Post: 2006-06-09, 10:44
  4. How can i solve this error?
    By symbian-newbie in forum Symbian
    Replies: 6
    Last Post: 2006-05-23, 05:33
  5. Getting started with Carbide.vs -- running the app
    By ET3D in forum Symbian Tools & SDKs
    Replies: 6
    Last Post: 2005-11-23, 17:45

Posting Permissions

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