My SIP Application uses the EnableL() method of the SIPProfileRegistry to send the first REGISTER request. This works fine. Now my problem is that I need to send the REGISTER request periodically. I dint find any API in the SIPProfile or SIPProfileRegistry classes to achieve this.
The SIP Client API documentation does mention about the CSIPRegistration class. I tried using this class instead of the ProfileRegistry's EnableL() method, but this does not seem to work too.
// Get the default profile.
iProfile = iProfileRegistry->DefaultProfileL();
TInt status = iProfileRegistry->EnableL(*iProfile, *this);
// The returned status indicates if the profile can be immediately used
// for creating a session, or if the client must wait for the profile to
// be registered.
if (status == KErrNone)
{
// get the SIP connection used by the profile
iConnection = iProfileRegistry->ConnectionL(*iProfile);
// create a SIP dialog for sending an INVITE;
iSIPInviteDialogAssoc = CreateSIPInviteDialogAssoc();
// Continue session establishement using the SIP Client API
iSIPClientTransaction = iSIPInviteDialogAssoc->SendInviteL();
}
else //KErrPending
{
// wait for the profile to be registered before using it further
}
}
now the poblem is that everytime the condition if(status == KErrNone) is failing....
I am not aware of the reason why and where should I make the changes so that it returns no error.
How and where do we set the SIP profile ?
Any reply from your side can prove to be of great help.
Thanks in advance.
Regards.
The condition if(status == KErrNone) will be successful only when the ALWAYS ON is enabled. This means that your profile is always Registered with the SIP server/proxy.
You must have implemented the ProfileRegistrationStatusChanged() method. In this method, the following conditions will gurantee successful registration
if (aSIPProfileId == iProfile->Id())
{
if (iProfile->Status() == CSIPProfile::ERegistered)
//Registration sucess
else
// Registration failed
}
About setting the SIP profile, when you install the SIP PlugIn, there is a SIP Configuration application installed with it, which allows you to configure your SIP settings.
Thanks for your reply.
There are still few more doubts that I have and hope you will help me clearify them.
1). Do I need to register to any SIP site, so as to fill those details in SIP configuration settings.
2). When you talk of SIP configuration settings, does that means the SIP application that we see in the emulatoe when we install SIP-Plug-in.
Hoping for an early response from your side.
Thanks and Regards.
Gautam Adlakha.
Hi
My Answers are marke with *
1). Do I need to register to any SIP site, so as to fill those details in SIP configuration settings.
*Yest you do
2). When you talk of SIP configuration settings, does that means the SIP application that we see in the emulatoe when we install SIP-Plug-in.
* When you install SIP stack on the emulator or on the HW SIP configuration will be installed as well, the you neet to create a new profile, see the Nokia SIP dcumentation
Have you guys been able to solve the issue..i.e. creating a SIP profile programmatically..if yes it would be great if you can share some code snippets on the same?