Hello everybody,
Does anybody know why SIPExample which is shipped with SDK after enabling profile and sending INVITE comes up with 415 error code(Unsupported Media Type)?
I would greatly appreciate any suggestions
Thanks in advance,
Luigio
Hello everybody,
Does anybody know why SIPExample which is shipped with SDK after enabling profile and sending INVITE comes up with 415 error code(Unsupported Media Type)?
I would greatly appreciate any suggestions
Thanks in advance,
Luigio
Try to compile the SIPExample using "abld build ....", I met the same problem when it compliled under Carbide or .Net2003.
I just solved this....
http://discussion.forum.nokia.com/fo...d.php?t=111831
Haroon Azmat
Hi again
Could anybody help me with the following questions?
1. Will it work in case of the SIPExample if I set <ACCEPT_CONTACT value=\"*;+media=audio\"/> or there should be used any other specific value?
2. How can I add this header to INVITE message?
Thank you in advance![]()
Hi,
You need to send equivalent SDP description part in INVITE request.I'm pasting some part of my code how u can create a media description it might be helpfull!
RStringF voiceMedia = StringPoolL().StringF( SdpCodecStringConstants::EMediaAudio ,
SdpCodecStringPool::StringTableL() );
// Set media transport: TCP
RStringF voiceProt = StringPoolL().StringF( SdpCodecStringConstants::EProtocolRtpAvp ,
SdpCodecStringPool::StringTableL() );
// Create the media line
mediaDescription =
CSdpMediaField::NewL( voiceMedia,30000, voiceProt, KPayLoadA() );
Haroon
Hi luigio18!
Are you still trying to get SIPExample to work? If so, you do not need any accept-contact settings for that.
I have not tried SIPExample yet, but I assume it works. Then most likely reason you get 415 is that client resolver plugin is not properly build. Build everything from command line (bldmake bldfiles and abld build winscw udeb).
See also this:
http://discussion.forum.nokia.com/fo...d.php?t=112694
Hope this helps!
Thanks for the adviceOriginally Posted by tkot
![]()
I've tried to build under the both carbide and command prompt(exactly as you wrote ) but it's still the same- 415 Decilned By Remote :P
I also don't get why SipMessageLog.txt doesn't contain any incoming INVITE when I try to send it from the other pc.
Anyway thanks to all. I'm not gonna give up![]()
Hi!
OK, this sounds like important piece of info! If you say that you do not see INVITE in your sipmessagelog.txt, then that INVITE most likely did not come to your machine at all! You do see 'SendToNetwork' for REGISTER and 'ReceivedFromNetwork' for 200OK, right?
Can you set up ethereal into your pc and check network traffic ... you should not see INVITE there then either.
BTW, what SIP registrar/proxy you are using ... are you hosting it by your self? Sounds a bit like its the proxy sending that 415 response now?!?
Hi,Originally Posted by hazmat
Thank you for your post.
Can I ask you one more question concerning ACCEPT-CONTACT header?
As I understood from this figure to start up my application ACCEPT-CONTACT, ACCEPT-TYPE and m-lines from SDP must match to these of plug-in.
Do I have to set the CONTACT-ACCEPT by CSIPMessgeElements?
I'm try to write like this
but it doesn't add any header.CSIPAcceptContactHeader* accContactHeader =
CSIPAcceptContactHeader::NewLC();
_LIT(KAcceptContact,*;mobility=mobile;media=audio);
accContactHeader = CSIPAcceptContactHeader:ecodeL(KAcceptContact);
msgElements->AddHeaderL(accContactHeader);
Could you give any hint how to add this header or where to read more?
Thanks for the ethereal- it really helps. I can trace all incoming/outgouing messages. Now I see that INVITE comes from the other pc but since the headers are not proper it does't start the application.Originally Posted by tkot
Any other comments are highly appreciated.
Thanks in advance
Luigio
Hi!
I guess the code there does not even compile ... there is no such API (at that I know).
The easiest way to add that header is done using extension header (can be used for non-mandatory SIP headers!) ...
something like this:
CSIPExtensionHeader *head = CSIPExtensionHeader ::NewL( _L8("accept-contact"), _L8("*;+this_is_my_private") );
msgElements->AddHeaderL( head );
See this topic:
http://discussion.forum.nokia.com/fo...d.php?p=327123
It explains the use of '+' that is needed also in your example code!!
Hope this helps.
Hi everybody,
I'm also trying to add an Accept-Contact header to my INVITE request.
Creating the header is not a problem, both
1) _LIT8( KAcceptContactParam, "*;+media=audio");
RPointerArray<CSIPAcceptContactHeader> accContactHeader =
CSIPAcceptContactHeader:ecodeL( KAcceptContactParam() );
or
2) CSIPExtensionHeader* acheader = CSIPExtensionHeader::NewLC(
_L8("accept-contact"), _L8("*;+media=audio") );
compile. I'm having problems with adding the header to my msgElements.
AddHeaderL( class CSIPHeaderBase * ); expects an argument of header base class,
I cannot pass my header to this function.
Is there any other way to add the header?
Is it really necessary to start typecasting just to add this one header?
Hazmat, how did you add the header?
Thanks in advance!
Hello again.
Tkot, Haroon and Huan thanks for your tipsThese were really good.
I've added this accept-contact header but it seems like the reason of 415 error code is not because of it. Now everything interacts perfect even when the INVITE which comes from the second pc is without accept-contact header.
Really strange
I hope this
and this (page 45) will help.
It works like this:
RPointerArray<CSIPHeaderBase>* headerList = new(ELeave)RPointerArray<CSIPHeaderBase>;
CSIPExtensionHeader* accContactHeader =
CSIPExtensionHeader::NewLC(_L8("accept-contact"), _L8("*;+media=audio") );
CleanupStack::Pop();
headerList->Append(accContactHeader);
msgElements->SetUserHeadersL(*headerList);
Overall results:
Now the SIPExample works fine. Probably because the port numbers and protocol were changed to 50601 and TCP. Maybe installation of Carbide.c++ v1.2 instead of v1.1 somehow affected on building of ECOM plug-in. Maybe because of some other unknown reasons... Anyway thanks to all![]()
Last edited by luigio18; 2007-08-02 at 02:18.