×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    May 2005
    Posts
    2

    How to add feature tag to the contact-header in REGISTER message?

    With series 60 sip-plgin 2.0, i am trying REGISTER message with sip server using the profile classes.
    The contact header getting created is:
    contact-header: <sip:name@172.20.5.231:2220;comp=sigcomp>;expires=3600;

    I want to add feature tag(extension) to contact-header like below.
    contact-header: <sip:name@172.20.5.231:2220;comp=sigcomp>;expires=3600;+g.poc.talkburst

    Is there any API or is there any other way it could be done?

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    11
    for most of the compulsory system API provided Header classes the way to add a parameter is as follows:


    CSIPContactHeader* contactHeader=CSIPContactHeader::NewL(contactAddress);
    contactHeader->SetExtensionParamL(_L8("+g.poc.talkburst"));

    Hope that helps!

  3. #3
    Registered User
    Join Date
    May 2005
    Posts
    2
    Thanks for the reply jgarinf.

    1. Registration via Profile API :
    I think if profile API's are used, once the values have been set through sip settings UI , no header can be modified for the profile through programming. MESSAGE ELEMENTS cannot be used here. Then how can programmer modify it... I am not sure...

    2. Registration via CSIPRegistration :
    I hope what you have said would work if i used CSIPRegistration class for registering rather than CSIPProfileRegistry. Message elements are available here.
    But the problem i am facing using CSIPRegistration is, I am not able to establish the connection.

    I followed the example code given in sip api documentation

    class CSIPExample : public CBase,
    public MSIPObserver,
    public MSIPConnectionObserver
    {
    };

    iSIP = CSIP::NewL(iUid, *this);
    iConnection = CSIPConnection::NewL(*iSIP,1,*this);

    CSIPHostPort* hp = CSIPHostPort::NewLC();
    hp->SetHostL(_L8("172.32.7.125"));
    hp->SetPort(5070);
    CSIPURI* uri = CSIPURI::NewL(_L8("player"),hp,EFalse);
    CSIPAddress* addr = CSIPAddress::NewL(uri);
    CSIPToHeader* aor = CSIPToHeader::NewL(addr);

    CSIPHostPort* hp1 = CSIPHostPort::NewLC();
    hp1->SetHostL(_L8("172.32.7.125"));
    CSIPURI* uri1 = CSIPURI::NewL(_L8("player"),hp1,EFalse);
    CSIPAddress* addr1 = CSIPAddress::NewL(uri1);
    addr1 = CSIPAddress::NewL(uri1);
    CSIPContactHeader* contact = CSIPContactHeader::NewL(addr1);

    CSIPRefresh* refresh = CSIPRefresh::NewLC();

    registration = CSIPRegistration::NewL(*iConnection, aor, contact, refresh);

    TInt number =0;
    number = iConnection->State() ;
    iSIPClientTransaction = registration->RegisterL();

    The "state" function returns 1 which is EInit. But precondition of RegisterL() is state should be EActive. When will the state be active?
    Read thru one of the post that you tried to register using CSIPRegistration.Have you succeeded in registering ?. A piece of code would be helpful.

    All this trouble is for inserting that tag... otherwise registration is fine using profile..

    Help please.

    Thanks

  4. #4
    Registered User
    Join Date
    May 2003
    Posts
    187
    did you provide a valid access point id to iestablish the connection?

    iConnection = CSIPConnection::NewL(*iSIP,1,*this);

    I mean parameter value 1

  5. #5
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    393

    Re: How to add feature tag to the contact-header in REGISTER message?

    Hi,

    The required API on S60 3.0 to add optional params to the Contact header while using the Profile API is internal. If you are a Forum Nokia PRO member then please contact your FN business manager who will decide based on the business case provided.

    Regards,
    Nitin

  6. #6
    Regular Contributor
    Join Date
    May 2006
    Posts
    58

    Re: How to add feature tag to the contact-header in REGISTER message?

    Hi Nitin,Cliff

    I'm looking to do something similar, namely add methods="INVITE, MESSAGE etc etc" to the contact field.

    I tried Cliff's code and the connection status changed to active, but no registration took place. When I use the Profile API I register ok, but don't know how to add the methods to the contact.

    Any ideas on what code is missing to complete the registration? (For example there is no CSipProfile set)

  7. #7
    Registered User
    Join Date
    Mar 2003
    Posts
    30

    Re: How to add feature tag to the contact-header in REGISTER message?

    Hi all!
    I'm interested in this particular issue too. I post this only in case *NOKIA* reviews the activity on the forum and takes note that there are SIMPLE questions that remain unanswered for loooooong time. I don't know WHY they refuse to help developers in so BASIC questions (modifying the time a SIP registration is maintained should be a BASIC thing, shouldn't it?)

    Cheers.
    Fran.

Posting Permissions

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