| ID | ... | Creation date | June 23, 2009 |
| Platform | S60 3rd Edition FP2 S60 5th Edition | Tested on devices | N85, N96, N97, Nokia 5800 XpressMusic |
| Category | Symbian C++ | Subcategory | ... |
| Keywords (APIs, classes, methods, functions): SIP, SIP profile |
This snippet demonstrates how to create new SIP Profile using CSIPManagedProfileRegistry and CSIPManagedProfile classes. Snippet requires WriteDeviceData NetworkServices capabilities. Self-signing is not possible because of required capabilities.
CAPABILITY WriteDeviceData NetworkServices
LIBRARY sipprofilecli.lib
#include <sipmanagedprofile.h>
#include <sipmanagedprofileregistry.h>
CSIPManagedProfileRegistry *profRegistry = CSIPManagedProfileRegistry::NewLC(*this);
TSIPProfileTypeInfo info;
info.iSIPProfileClass = TSIPProfileTypeInfo::EInternet;
info.iSIPProfileName = KSIPIETFProfileType;
//Instantiates new profile with default values
CSIPManagedProfile *profile = profRegistry->CreateL(info);
CleanupStack::PushL(profile);
//General SIP profile settings
profile->SetParameter(KSIPProviderName,_L8("Provider"));
profile->SetParameter(KSIPAccessPointId,2);
profile->SetParameter(KSIPSigComp,EFalse);
profile->SetParameter(KSIPSecurityNegotiation,EFalse);
profile->SetParameter(KSIPUserAor,_L8("user@example.com"));
profile->SetParameter(KSIPAutoRegistration,EWhenNeeded);
profile->SetParameter(KSIPDefaultProfile,ETrue);
//Registrar settings
profile->SetParameter(KSIPRegistrar,KSIPServerAddress,_L8("sip:example.com"));
profile->SetParameter(KSIPRegistrar,KSIPDigestUserName,_L8("username"));
profile->SetParameter(KSIPRegistrar,KSIPDigestRealm,_L8("realm"));
profile->SetParameter(KSIPRegistrar,KSIPDigestPassword,_L8("password"));
//Proxy settings
profile->SetParameter(KSIPOutboundProxy,KSIPServerAddress,_L8("sip:example.com;lr;transport=TCP"));
profile->SetParameter(KSIPOutboundProxy,KSIPDigestUserName,_L8("username"));
profile->SetParameter(KSIPOutboundProxy,KSIPDigestRealm,_L8("realm"));
profile->SetParameter(KSIPOutboundProxy,KSIPDigestPassword,_L8("password"));
profRegistry->SaveL(*profile);
CleanupStack::PopAndDestroy(2);
New SIP profile called Provider is added to the SIP profile registry. Existing SIP profiles can be found from:
Settings > Connection > SIP Settings
No related wiki articles found