×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    10

    SIP ECOM plug in

    hi

    i'm new to symbian and i'm trying to develop a simple application that registers in a server. For this i'm using a simple app (helloworld) that registers when it starts. I'm using the code from the sip programmers guide to implement the registration part, but i can't understand how the ecom plug in actually works. can someone help me understand what i need to do to make this simple app work?

    tks

    Sergio

  2. #2
    Registered User
    Join Date
    May 2003
    Posts
    187

    Re: SIP ECOM plug in

    Each s60 sip application has to declare which media types are supported by that application. This declaration is in the ecom plugin.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    10

    Re: SIP ECOM plug in

    Thanks for the help.
    I think I got it how it works and it's role, but how do we "connect" it with the main app? Is it just a different build that only relates with the main app through the app Uid and being packaged together in the sis file, or is it necessary to include some kind of library or the dll in the main app?

    Sorry for my "noobness", but any help would be appreciated

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

    Re: SIP ECOM plug in

    Hi

    On S60 3rd Edition the Ecom plugin's methods that need to be implemented have undergone some change but the idea is similar to what it was on S60 2nd EditionFP2 and FP3.

    Here's an excerpt from the SIP example that shows how the connection to the application is made:

    // -----------------------------------------------------------------------------
    // CSIPExResolverPlugin::ChannelL
    // -----------------------------------------------------------------------------
    //
    TUid CSIPExResolverPlugin::ChannelL( RStringF /*aMethod*/,
    const TDesC8& /*aRequestUri*/,
    const RPointerArray<CSIPHeaderBase>& /*aHeaders*/,
    const TDesC8& /*aContent*/,
    const CSIPContentTypeHeader* /*aContentType*/)
    {
    return iApplicationUID;
    }


    // -----------------------------------------------------------------------------
    // CSIPExResolverPlugin::ConnectL
    // -----------------------------------------------------------------------------
    //
    void CSIPExResolverPlugin::ConnectL( TUid aUid )
    {
    // Launch app based on uid passed from SIP stack
    //
    TApaAppInfo appInfo;
    User::LeaveIfError( iApaSession.GetAppInfo( appInfo, aUid ) );
    CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
    #ifdef EKA2
    cmdLine->SetExecutableNameL( appInfo.iFullName );
    #else
    cmdLine->SetLibraryNameL( appInfo.iFullName );
    #endif
    User::LeaveIfError( iApaSession.StartApp( *cmdLine ) );
    CleanupStack::PopAndDestroy( cmdLine );
    }

    Essentially SIP stack will call ConnectL with the UID it retrieves from ChannelL after meeting the matching criteria.

    Differences from 2nd Edition FP2/FP3:
    -Capabilities() will be called only and only if the ECOM plugin did not announce
    the capabilities in the rsc-file.
    -The algorithm for matching will be run on the dynamic string provided by the ECOM plug-in.
    -ConnectL() says that the ECOM-plugin should instruct target client to connect to the SIP stack.
    -It might be a server that is running or whatever application
    -Code from StartL() in FP2/FP3 Ecom plugin goes to ConnectL() in 3.0
    -ChannelUID() must be implemented because the client could connect with a different UID compared to the UID announced in the rsc-file. Usually the UID3 of the application that needs to be started



    Regards,
    Nitin

  5. #5
    Registered User
    Join Date
    Mar 2006
    Posts
    9

    Re: SIP ECOM plug in

    1. Editing the RSS file of the ECom plugin

    a. Changed the default_data to UID of my app
    b. Had a line where 49152 is a # where my program listens to and MyApplication is the name of my application
    <LINE name=\"m\" value=\"application 49152 tcp MyApplication\"/>
    - I think this tells the SIP stack installed in your emulator or phone that whenever the phone/emulator receives an SDP of "m=application 49152 tcp MyApplication" it will automatically call your program or all SIP requests with this SDP should go to MyApplication

    2. Compiling the ECom plugin

  6. #6
    Registered User
    Join Date
    Mar 2006
    Posts
    9

    Re: SIP ECOM plug in

    1. Editing the RSS file of the ECom plugin
    a. Changed the default_data to UID of my app
    b. Had a line where 49152 is a # where my program listens to and MyApplication is the name of my application
    <LINE name=\"m\" value=\"application 49152 tcp MyApplication\"/>
    - I think this tells the SIP stack installed in your emulator or phone that whenever the phone/emulator receives an SDP of "m=application 49152 tcp MyApplication" it will automatically call your program or all SIP requests with this SDP should go to MyApplication

    2. Compiling the ECom plugin

  7. #7
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037

    Re: SIP ECOM plug in

    Hi,

    I don't know exactly how Nokia's spi stack working, but you're right, that media line in SDP id usually used to selection of proper application, which will handle such INVITE...

    Bye
    STeN

  8. #8
    Registered User
    Join Date
    Jan 2006
    Posts
    10

    Re: SIP ECOM plug in

    Thanks for all the replies

    I think i've managed to do it. I'm using 2nd ed FP2, and i based my plug in in the ChipFlip example. I only changed the AppUID in the RSS file and filled the opaque_data field like this:

    opaque_data = "<SIP_CLIENT ALLOW_STARTING=\"YES\"><SIP_HEADERS><ACCEPT value=\"text/xml\"/></SIP_HEADERS></SIP_CLIENT>";


    Then I packed the dll in the SIS file, and I'm able to successfully register and send Invites to the network from the mobile phone (Nokia 6630).
    Now I'm trying to send a MESSAGE request, but it's not working. Can it be from some misconfiguration in the plug in?
    Correct me if I'm wrong, but if the plug in wasn't working properly, I wouldn't be able to send the REGISTER and the INVITE right?

    Thanks to all for the help!

  9. #9
    Registered User
    Join Date
    Mar 2006
    Posts
    9

    Re: SIP ECOM plug in

    sip ecom plug in is effective for incoming Sip call,Sip stack usually used to selection of proper application with the UID for rss file of sip ecom plug in.
    it is not relate with MESSAGE request I think.
    I don't know reason for it ,but i think that you can check the port in "opaque_data ".

    TBuf8<20> formats;
    _LIT8(KFormats,"8 0 101");
    formats.Append(KFormats);

    CSdpMediaField* media = CSdpMediaField::NewL( SdpCodecStringPool::StringPoolL().StringF( SdpCodecStringConstants::EMediaAudio,SdpCodecStringPool::StringTableL()), iSIPEngine.iListenPort,SdpCodecStringPool::StringPoolL().StringF( SdpCodecStringConstants::EProtocolRtpAvp,SdpCodecStringPool::StringTableL()), formats );

    "formats" is SDP realted wiht sending invite.

  10. #10
    Registered User
    Join Date
    Mar 2004
    Posts
    9

    Re: SIP ECOM plug in

    Hello,

    smpme, did you get the SIP MESSAGE request to work? I know SIP 2.0 supported MESSAGE, but does 4.0 support it? Does anybody else have info on this?

    Thanks,

    alampi

Similar Threads

  1. JAIN SIP and Symbian C++ SIP
    By RyanSantos in forum Symbian Networking & Messaging (Closed)
    Replies: 11
    Last Post: 2008-07-25, 15:44
  2. SIP ECOM plugin not working on Nokia 6600?
    By marcel_kok555 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-01-25, 10:58
  3. can't get the serial number for SIP Plug In 4.0
    By ragochen in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2005-12-21, 11:10
  4. SIP 3.0 SDK ECom implementation
    By cryptor in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-04-11, 12:04

Posting Permissions

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