You Are Here:

Community: Wiki

This page was last modified on 1 July 2009, at 10:18.

Creating new SIP profile programmatically

From Forum Nokia Wiki



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

Overview

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.

MMP file

CAPABILITY WriteDeviceData NetworkServices

LIBRARY sipprofilecli.lib

Source file

#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);

Postconditions

New SIP profile called Provider is added to the SIP profile registry. Existing SIP profiles can be found from:

 Settings > Connection > SIP Settings

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fChangeE5fsoftkeysE5fdynamicallyE5fE28eitherE5frightE5forE5fleftE5forE5fbothE29X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZseriesE5f60Q qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZuserE5ftagQSxs60X qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ