×

Discussion Board

Results 1 to 14 of 14

Thread: SIPExample

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Unhappy SIPExample

    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

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    51

    Re: SIPExample

    Try to compile the SIPExample using "abld build ....", I met the same problem when it compliled under Carbide or .Net2003.

  3. #3
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    50

    Re: SIPExample

    I just solved this....

    http://discussion.forum.nokia.com/fo...d.php?t=111831
    Haroon Azmat

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Re: SIPExample

    Thanks to all. I'll try to check it

  5. #5
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Question Re: SIPExample

    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

  6. #6
    Regular Contributor
    Join Date
    Apr 2007
    Posts
    50

    Re: SIPExample

    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

  7. #7
    Registered User
    Join Date
    Jul 2007
    Posts
    40

    Re: SIPExample

    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!

  8. #8
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Re: SIPExample

    Quote Originally Posted by tkot
    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 advice
    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

  9. #9
    Registered User
    Join Date
    Jul 2007
    Posts
    40

    Re: SIPExample

    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?!?

  10. #10
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Re: SIPExample

    Quote Originally Posted by hazmat
    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,

    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

    CSIPAcceptContactHeader* accContactHeader =
    CSIPAcceptContactHeader::NewLC();

    _LIT(KAcceptContact,*;mobility=mobile;media=audio);
    accContactHeader = CSIPAcceptContactHeader:ecodeL(KAcceptContact);

    msgElements->AddHeaderL(accContactHeader);
    but it doesn't add any header.

    Could you give any hint how to add this header or where to read more?

    Quote Originally Posted by tkot
    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?!?
    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.


    Any other comments are highly appreciated.
    Thanks in advance

    Luigio

  11. #11
    Registered User
    Join Date
    Jul 2007
    Posts
    40

    Re: SIPExample

    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.

  12. #12
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIPExample

    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!

  13. #13
    Registered User
    Join Date
    Jul 2007
    Posts
    31

    Wink Re: SIPExample

    Hello again.

    Tkot, Haroon and Huan thanks for your tips These 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

    Quote Originally Posted by bifihi View Post
    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!
    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.

  14. #14
    Regular Contributor
    Join Date
    Dec 2006
    Posts
    59

    Re: SIPExample

    Thanks a lot!!!!!

Similar Threads

  1. HELP, SIPExample in S60 SDK doesn't work.
    By guanzhong in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-06-12, 19:21
  2. Question about the SIPExample
    By johnswyen in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2007-02-09, 04:15
  3. SIPExample in S60 3rd Edition SDK
    By shimritmal in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2006-12-30, 21:10
  4. Run SIPExample in 3.0 got a 415 error?
    By huan23 in forum VoIP
    Replies: 1
    Last Post: 2006-12-22, 05:17
  5. Run SIPExample in 3.0 got a 415 error?
    By huan23 in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-12-20, 12:20

Posting Permissions

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