×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    11

    How to send SIP PUBLISH message in S60 3rd edition

    Posted to wrong forum, moved to the standard Symbian C++ discussion forum for Network and messaging.

    I've searched through these forums and through Google but I haven't seen a way to send a SIP PUBLISH with the 3rd Edition SDK.

    A post here has some instructions on how to do it in series 2:
    http://discussion.forum.nokia.com/fo...ht=sip+publish

    Unfortunately, the line:
    reqElems->SetMethodL(_L8("PUBLISH"));

    Doesn't work in 3rd edition. The SetMethodL in CSIPRequestElements requires a RStringF. How can I provide the string "PUBLISH" to this method call? Do I have to build my own StringPool? If so how do I do that?

    I looked at the file sipstrconsts.h for all the available SIP strings and there is no reference to "PUBLISH".

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    11

    Thumbs up Re: How to send SIP PUBLISH message in S60 3rd edition

    Ok. I found a solution on my own.

    I had to create a RStringPool variable and a TStringTable variable. I also created an array of void* and assigned that array to the TStringTable variable.

    Here is some sample code which I'm cobbling together from my actual code. This is definately not the correct way to implement but it is just an example. Cleanupstack stuff is not included for clarity.

    _LIT8(SIP_METHOD_PUBLISH, "PUBLISH");

    enum ESipMethod
    {
    ESipMethodPublish,
    ESipMethodLast
    };

    void* const SIP_METHOD_TABLE[]=
    {
    (void *)&SIP_METHOD_PUBLISH,
    (void *)NULL
    };

    class something
    {
    something();
    doit();

    protected:
    RStringPool iSipMethodPool;
    TStringTable iSipMethodTable;
    }

    something::something()
    {
    iSipMethodTable.iCount = ESipMethodLast;
    iSipMethodTable.iTable = SIP_METHOD_TABLE;
    iSipMethodTable.iCaseSensitive = ETrue;
    iSipMethodPool.OpenL(iSipMethodTable);
    }

    something::doit()
    {
    CUri8* uri;
    CSIPRequestElements* reqElem;
    CSIPMessageElements* msgElem;

    // You need to actually build a correct uri
    reqElem = CSIPRequestElements::NewL(uri);
    msgElem = &reqElem->MessageElements();
    reqElem->SetMethodL(iSipMethodPool->StringF(iSipMethodTable, ESipMethodPublish));

    ...
    }

  3. #3
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    53

    Re: How to send SIP PUBLISH message in S60 3rd edition

    Hi,

    Code did not compile...

    So, I changed

    reqElem->SetMethodL(iSipMethodPool.StringF(iSipMethodTable, ESipMethodPublish));

    to

    reqElem->SetMethodL(iSipMethodPool.StringF(ESipMethodPublish, iSipMethodTable));

    but I am now receiving StringPool 2 panic... Does someone know what that means?

    If i use pure _L8("PUBLISH"), set it to RStringF and then as method... PUBLISH is sent correctly, but I am receiving BAFL error (emulator gets stuck) when I close my application...
    Last edited by jrantam; 2006-03-30 at 11:30.

  4. #4
    Regular Contributor
    Join Date
    Jun 2004
    Posts
    53

    Re: How to send SIP PUBLISH message in S60 3rd edition

    I am still fighting with this PUBLISH...
    Murkyl can you help even more? Or somebody?

  5. #5
    Registered User
    Join Date
    Jan 2006
    Posts
    5

    Re: How to send SIP PUBLISH message in S60 3rd edition

    Hi jrantam,

    I am strugling with the exact same issue. Were you able to make any progress?

  6. #6
    Registered User
    Join Date
    May 2007
    Posts
    45

    Re: How to send SIP PUBLISH message in S60 3rd edition

    Hi all,

    i'm developing a sip client with 3rd edition fp1 and my publish sending works well.
    I hope that my code will work in your apps too!

    After setting header fields about SIP PUBLISH, i set method with this code:

    RStringPool pool = SIPStrings::Pool();
    RStringF str = pool.OpenFStringL(_L8("PUBLISH"));

    reqElem->SetMethodL( str );

    Regards,

    Alessio

Similar Threads

  1. Replies: 7
    Last Post: 2007-06-19, 12:01
  2. SIP: BYE/ 481 (No Dialog Found)!!!!!!!!!!
    By Mini Pillai in forum Symbian Networking & Messaging (Closed)
    Replies: 13
    Last Post: 2007-02-09, 04:52
  3. How to send a SIP MESSAGE request ?
    By big_vj in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2006-02-23, 16:02
  4. Problems getting the S60 3rd Edition emulator to the internet
    By siancu in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2005-12-15, 16:06

Posting Permissions

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