×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    [SIP] Invite fails: 415 Unsupported Media Type

    When my SIP client receives an INVITE request, it always responds with "415 Unsupported Media Type". This happens even before my client receives any event, so probably somewhere in the internal SIP layer.

    I found some topics about this mentioning different causes: it could be a malformed packet, or the specified multimedia codec is not supported. Which one is it? And more importantly, how do I get my client to accept the INVITE, or at least let it go through the SIP layer and generate an event?

    I'm using X-Lite to send the INVITE packet below to my client:
    Code:
    (...)
    CSeq: 1 INVITE
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
    Content-Type: application/sdp
    User-Agent: X-Lite release 1006e stamp 34025
    Content-Length: 233
    
    v=0
    o=- 3 2 IN IP4 192.168.0.72
    s=CounterPath X-Lite 3.0
    c=IN IP4 192.168.0.72
    t=0 0
    m=audio 54096 RTP/AVP 3 101
    a=alt:1 1 : Yc+uzfl3 lXbNg9xE 192.168.0.72 54096
    a=fmtp:101 0-15
    a=rtpmap:101 telephone-event/8000
    a=sendrecv
    A similar problem occurs when my client sends an INVITE to X-Lite: only this time X-Lite responds with "488 Not Acceptable Here". This response also seems to be related to the specified codec. This is the outgoing INVITE sent by my client:
    Code:
    (...)
    CSeq: 2691 INVITE
    s: subject
    Max-Forwards: 70
    Proxy-Authorization: Digest 
    Content-Type: application/sdp
    Content-Length: 156
    
    v=0
    o=user 3388808738 3388808739 IN IP4 194.1.1.1
    s=SipSession
    c=IN IP4 194.1.1.1
    t=0 0
    m=audio 1312 RTP/AVP 3
    a=rtpmap:3 gsm 06.10/8000
    Last edited by dracula78; 2007-05-21 at 14:41.
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  2. #2
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    I noticed this in my EPOCWIND.OUT log (names and ip's replaced):
    Code:
       358.650	SIP: Connection Manager::ReceivedFromNetwork, INVITE sip:user@192.168.0.73 SIP/2.0
    Record-Route: <sip:194.1.1.1;ftag=5355a617;lr=on>
    Via:
       358.650	SIP: Received data via UDP: 
       358.795	SIP: Received data: 
       358.795	SIP: INVITE sip:user@192.168.0.73 SIP/2.0
    Record-Route: <sip:194.1.1.1;ftag=5355a617;lr=on>
    Via:
       358.800	SIP: Incoming message: 
       358.800	SIP: From address: 194.1.1.1Port: 5060
       358.805	SIP: TransactionUser, TaId=3,state=Proceeding
       359.020	SIP: Outgoing data: 
       359.020	SIP: To address: 194.1.1.1Port: 5060
       359.025	SIP: SIP/2.0 100 Trying
    Via: SIP/2.0/UDP 194.1.1.1;branch=z9hG4bK0fb4.2cd95c53.0,SIP/2.0/UDP 192.
       359.210	SIP: Outgoing data: 
       359.215	SIP: To address: 194.1.1.1Port: 5060
       359.215	SIP: SIP/2.0 415 Unsupported Media Type
    Via: SIP/2.0/UDP 194.1.1.1;branch=z9hG4bK0fb4.2cd95c53.0,
       359.220	SIP: TransactionUser, TaId=3,state=Completed
       359.225	SIP: Connection Manager::ReceivedFromNetwork, ACK sip:user@192.168.0.73 SIP/2.0
    Via: SIP/2.0/UDP 194.1.1.1;branch=z9hG4bK0fb4.2cd95c53.0
       359.225	SIP: Received data via UDP: 
       359.345	SIP: Received data: 
       359.345	SIP: ACK sip:user@192.168.0.73 SIP/2.0
    Via: SIP/2.0/UDP 194.1.1.1;branch=z9hG4bK0fb4.2cd95c53.0
       359.350	SIP: Incoming message: 
       359.350	SIP: From address: 194.1.1.1Port: 5060
       359.435	SIP: TransactionUser, TaId=3,state=Confirmed
    There you can see the outgoing 415 being sent; how do I 'teach' the SIP layer what media types ARE supported?
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    179

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    What is the format of your SIP resolver client (CSIPResolvedClient-derived class and plug-in)?
    In particular, what have you defined Capabilities() as?

    Kevin
    www.symsource.com
    Symsource Ltd.
    [url]www.symsource.com[/url]

  4. #4
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    Aaah, I'm don't have any CSIPResolvedClient derived class. We're migrating an application from Symbian 8.1 to 9.1, and apparently this API wasn't used/available in 8.1.

    So if I understand correctly from my quick glance at the overview, I implement the virtual methods from CSIPResolvedClient in my current SIP engine and pass the capabilities in XML format...?

    Thanks for the nudge, this is exactly what I needed to know...
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    16

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    I'm not sure but I think it needs to be done outside your engine in an ECOM plugin if you want it to work, as it is done in the S60 example.

    Can someone correct me if I am wrong.

    Cheers

  6. #6
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    179

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    Quote Originally Posted by dracula78
    So if I understand correctly from my quick glance at the overview, I implement the virtual methods from CSIPResolvedClient in my current SIP engine and pass the capabilities in XML format...?
    Yep, thats pretty much it. The CSIPResolvedClient resides in an ECOM plug-in which is loaded by the SIP framework. You need to make sure the UID you supply in ChannelL() matches the UID you use for instantiating the CSIPConnection object in your SIP engine (which obviously resides in another module, not in the ECOM plug-in).
    Its a little obscure, but does seem to work and "makes sense" after a while.

    Kevin
    www.symsource.com
    Symsource Ltd.
    [url]www.symsource.com[/url]

  7. #7
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    I've been playing with this ECOM plugin stuff, and several questions remain.

    I followed this example, and created a separate project to build a DLL:
    Code:
    const TImplementationProxy Implementations[] =
    	{
    	IMPLEMENTATION_PROXY_ENTRY( KMyEComPluginUID, CMyEComPlugin::NewL )
    	};
    
    EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aCount )
    	{
    	aCount = sizeof( Implementations ) / sizeof( TImplementationProxy );
    	return Implementations;
    	}
    The class CMyEComPlugin has the following methods (besides constructors and destructor):
    Code:
    void CMyEComPlugin::ConstructL()
    	{
    	User::LeaveIfError( iApaSession.Connect() );
    	}
    	
    TUid CMyEComPlugin::ChannelL( RStringF aMethod, const TDesC8& aRequestUri, const RPointerArray<CSIPHeaderBase>& aHeaders,
    	      const TDesC8& aContent, const CSIPContentTypeHeader* aContentType )
    	{
    	return KMyMainAppUid;
    	}
    
    void CMyEComPlugin::ConnectL(TUid aUid)
    	{
    	TApaAppInfo appInfo;
    	User::LeaveIfError( iApaSession.GetAppInfo( appInfo, aUid ) );
    	CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
    	cmdLine->SetExecutableNameL( appInfo.iFullName );
    	User::LeaveIfError( iApaSession.StartApp( *cmdLine ) );
    	CleanupStack::PopAndDestroy( cmdLine );
    	}
    
    const TDesC8& CMyEComPlugin::Capabilities()
    	{
    	_LIT8(KCapabilities, "<SIP_CLIENT ALLOW_STARTING=\"YES\"><SIP_HEADERS><ACCEPT value=\"application/sdp\"/></SIP_HEADERS><SDP_LINES><LINE name=\"m\" value=\"audio 1025 rtp/avp 3\"/></SDP_LINES></SIP_CLIENT>" );
    	return KCapabilities;
    	}
    My questions:

    1. Is it enough to put the resulting DLL in the \sys\bin directory on the target and its resource file in \resource\plugins\ (ofc. by adding entries in the PKG file of the main project)? Will the ECOM server magically detect the plugin and register it?

    2. Currently, ChannelL returns the UID of my main application (the same used as in the creation of the CSIP object), and Capabilities returns the XML code with the accepted codec. What would I need to put in ConnectL? What is that used for?

    3. As you see above, there was quite a big ConstructL in the version we used for Symbian 8.1, but it's not clear to me what it does. And there's even a StartL method that seems to launch the main application, but it's nowhere ever called and it not listed as virtual method of CSIPResolvedClient. Do you think these still serve any purpose?

    4. Do I need any extra capabilities for my main application (or the DLL?) when using this ECOM plugin for CSIPResolvedClient?

    5. When "it doesn't work" (ie. the received INVITE is not passed to my app, but rejected with Unsupported Media Type), how would I debug it? On-target debugging doesn't work well with the ECOM plugin does it?
    Last edited by dracula78; 2007-06-22 at 09:16.
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  8. #8
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    2. Currently, ChannelL returns the UID of my main application (the same used as in the creation of the CSIP object), and Capabilities returns the XML code with the accepted codec. What would I need to put in ConnectL? What is that used for?

    3. As you see above, there was quite a big ConstructL in the version we used for Symbian 8.1, but it's not clear to me what it does. And there's even a StartL method that seems to launch the main application, but it's nowhere ever called and it not listed as virtual method of CSIPResolvedClient. Do you think these still serve any purpose?
    It turned out that our old StartL implementation was exactly what was needed in the ConnectL method. I changed the code in previous post to match my current status, closely resembling S60_3rd_MR\S60Ex\SIPExample.

    4. Do I need any extra capabilities for my main application (or the DLL?) when using this ECOM plugin for CSIPResolvedClient?
    This documentation mentioned "You need the ProtServ capability to use the Client Resolver API.". So we requested a new certificate with the ProtServ capability, but that doesn't make a difference.


    All in all, I still don't get any INVITE passed to my application, and 2 questions remain. It worries me that there are only 6 matches when searching google for "CSIPResolvedClient"...

    KevinD, it sounded like you had already implemented the SIP resolver ECOM plugin before, do you have any other tips when it comes to debugging?
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  9. #9
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    Trial-and-error, seems to be the only way to debug...

    Apparently the "default_data" field in the resource file, containing the application ID, is case-sensitive... When I changed it from "e42e841a" to "E42E841A", it worked.
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  10. #10
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    And of course this works perfectly on the N91, but not on the N95. When trying to INVITE the N95, it returns a "488 Not Acceptable here"...

    How is this possible?
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

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

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    hi, dracula

    could you post your mmp file about resolver plugin?

    Thanks in advance,

    Alessio

  12. #12
    Regular Contributor
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    115

    Re: [SIP] Invite fails: 415 Unsupported Media Type

    Here's the MMP:
    Code:
    TARGETTYPE PLUGIN
    TARGET MyEComPlugin.dll
    
    UID 0x10009d8d 0xe42e841b
    SOURCEPATH src
    SOURCE MyEComPlugin.cpp DllMain.cpp
    
    USERINCLUDE inc
    SYSTEMINCLUDE \epoc32\include \epoc32\include\ecom .
    LIBRARY apgrfx.lib euser.lib apparc.lib ecom.lib
    
    SOURCEPATH .
    
    CAPABILITY MultimediaDD NetworkServices ProtServ ReadDeviceData ReadUserData UserEnvironment WriteDeviceData WriteUserData
    START RESOURCE E42E841B.rss
    	TARGET MyEComPlugin.rsc
    	TARGETPATH \System\Libs\Plugins
    	HEADER
    END
    I added some logging to the ECOM plugin, and I noticed it does query the Capabilities() but does not request the UID with ChannelL(...), like it does on the N91 with incoming INVITE's.
    Apparently the N95 requires a different capabilities XML string, or could there be another (internal?) SIP client conflicting?
    Code:
    _LIT8( KCapabilities, 
    "<SIP_CLIENT ALLOW_STARTING=\"NO\">\
      <SIP_HEADERS>\
        <ACCEPT value=\"application/sdp\"/>\
      </SIP_HEADERS>\
      <SDP_LINES>\
        <LINE name=\"m\" value=\"audio 0 RTP/AVP 98 8\"/>\
      </SDP_LINES>\
    </SIP_CLIENT>" );
    
    const TDesC8& CWizzl_EComPlugin::Capabilities()
    {
    	return KCapabilities;
    }
    IDE: Carbide.c++ 1.3 / 2.0beta
    SDK: S60 3rd edition MP / FP1
    V2.10.013 (15-09-06) @ Nokia N91
    V20.0.058 (21-10-06) @ Nokia N93
    V30.0.015 (15-07-08) @ Nokia N95

  13. #13
    Registered User
    Join Date
    Mar 2008
    Posts
    14

    Exclamation Re: [SIP] Invite fails: 415 Unsupported Media Type

    Hi,

    I am also not able to receive INVITE on my N95. Every time i sends INVITE, 488 Not acceptable Here.. error code is getting generated. I am also using the same capabily list. Can you please confirm what changes are required to make this work.

    Thanks in advance.

    Best Regards
    Nidhi

Similar Threads

  1. 415 Unsupported Media Type Error when sending an INVITE through SIP
    By razas in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-06-14, 06:49
  2. SIP content type
    By hlothman in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2006-05-17, 09:26
  3. SIP 415 Unsupported Media Type
    By iotuus in forum Symbian Networking & Messaging (Closed)
    Replies: 8
    Last Post: 2005-07-15, 15:09
  4. Help! SIP 415 Unsupported Media Type
    By sky_qiao in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2005-05-25, 14:24
  5. Problem with Nokia D211 Linux Drivers
    By fiveam in forum Multimodecards
    Replies: 1
    Last Post: 1970-01-01, 02:00

Posting Permissions

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