×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    5

    SIP NOTIFY Problem

    Hi all,

    I have a problem for receiving NOTIFY requests from the server.
    After a SUBSCRIBE, the server send me 200 OK and trigger the NOTIFY.
    It seems that the SIP stack on the phone catch the NOTIFY but reply to the server with a 400 Bad Request. I am not notified of this reply.

    Moreover, from what I understand the first NOTIFY after a SUBSCRIBE, 200 OK is within the last dialog created by the SUBSCRIBE.
    So I should wait the NOTIFY in :

    IncomingRequest (CSIPServerTransaction *aTransaction, CSIPDialog &aDialog)
    {
    if(aTransaction->Type() == SIPStrings::StringF( SipStrConsts::ENotify ))
    {
    ....
    }
    }

    I am wondering if it is really the case, if not I should implement a SIP client Resolver with the good caps. Am I right ?

    I am dropping the logs from my server. The 400 Bad request could come from a malformed request from server.
    Well, I am stuck, so If one of you has an idea, it will be great help.


    ////////////////////////////////////////////////////////////////

    ==============
    [02052] 2007/08/16 13:08:28 | INFO1 | <myserver.cpp: 538>
    ============== receive:
    SUBSCRIBE sip:buddylist_or@192.168.1.55 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.11:5060;branch=z9hG4bK6ni7rtihvthc7v8v0tu1i2e
    From: <sipr@192.168.1.55>;tag=67a7rtkdchhc7ba40tu1
    To: <sip:buddylist_or@192.168.1.55>
    Contact: <sipr@192.168.1.11>
    Supported: eventlist
    CSeq: 1454 SUBSCRIBE
    Call-ID: NUpZZKm9oIe5HMtY6p2w727iGw0pc0
    Max-Forwards: 70
    Accept: application/pidf+xml,application/rlmi+xml,multipart/related
    Event: presence
    Content-Length: 0

    ==============
    [00408] 2007/08/16 13:08:28 | INFO1 | <myserver.cpp: 686>
    ============== send:
    SIP/2.0 200 OK
    Via: SIP/2.0/UDP 192.168.1.11:5060;branch=z9hG4bK6ni7rtihvthc7v8v0tu1i2e
    From: <sipr@192.168.1.55>;tag=67a7rtkdchhc7ba40tu1
    To: <sip:buddylist_or@192.168.1.55>;tag=371733551
    Call-ID: NUpZZKm9oIe5HMtY6p2w727iGw0pc0
    CSeq: 1454 SUBSCRIBE
    Contact: <sip:buddylist_or@192.168.1.55>
    Event: presence
    User-Agent: MYSERVER/1.3
    Expires: 3600
    Content-Length: 0

    ==============
    [00408] 2007/08/16 13:08:28 | INFO1 | <myserver.cpp: 686>
    ============== send:
    NOTIFY sipr@192.168.1.11 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.55:5060;rport;branch=z9hG4bK2640586787
    From: <sip:buddylist_or@192.168.1.55>;tag=371733551
    To: <sipr@192.168.1.55>;tag=67a7rtkdchhc7ba40tu1
    Call-ID: NUpZZKm9oIe5HMtY6p2w727iGw0pc0
    CSeq: 1 NOTIFY
    Contact: <sip:192.168.1.55>
    Content-Type: multipart/related; type=application/rlmi+xml; boundary=Jq0WQZRwTIZkGu7zT0mq; start=<GSQr5Y@presence.erasmuss.com>
    Mime-Version: 1.0
    Subscription-state: activate; Expires=3600
    Event: presence
    Max-Forwards: 70
    Content-Length: 388

    --Jq0WQZRwTIZkGu7zT0mq

    Content-Transfer-Encoding: binary
    Content-ID: <GSQr5Y@presence.erasmuss.com>
    Content-Type: application/rlmi+xml;charset="UTF-8"

    <?xml version="1.0" encoding="UTF-8"?>
    <list xmlns="urn:ietfarams:xml:ns:rlmi" uri="sip:buddylist_or@192.168.1.55" version="0" fullState="true">
    <name xml:lang="en">Buddy List</name>
    </list>

    --Jq0WQZRwTIZkGu7zT0mq--

    ==============
    [02052] 2007/08/16 13:08:29 | INFO1 | <myserver.cpp: 538>
    ============== receive:
    SIP/2.0 400 Bad Request
    Via: SIP/2.0/UDP 192.168.1.55:5060;rport;branch=z9hG4bK2640586787
    To: <sipr@192.168.1.55>;tag=67a7rtkdchhc7ba40tu1
    From: <sip:buddylist_or@192.168.1.55>;tag=371733551
    Call-ID: NUpZZKm9oIe5HMtY6p2w727iGw0pc0
    CSeq: 1 NOTIFY
    Content-Length: 0

    //////////////////////////////////////////////////////////////////////
    Best regards,
    Olive

  2. #2
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    74

    Re: SIP NOTIFY Problem

    Hi,

    Decoding the NOTIFY fails, and SIP stack sends the 400 Bad Request.
    The problem is located at the Content-Type header's parameter:

    Content-Type: multipart/related; type=application/rlmi+xml


    From RFC 3261 chapter 25.1:
    m-parameter = m-attribute EQUAL m-value
    m-attribute = token
    m-value = token / quoted-string

    The slash (/) is not allowed in token, so the value part (application/rlmi+xml)
    should be enclosed in quotes.

    -jp

  3. #3
    Registered User
    Join Date
    Apr 2005
    Posts
    5

    Re: SIP NOTIFY Problem

    Thank you Jp,
    That was exactly the problem you point on my server impl.
    I owe you some drinks, at least..

  4. #4
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Lightbulb Re: SIP NOTIFY Problem

    I have the same problem,
    and,
    the following function in my application is never run ??? why,
    IncomingRequest (CSIPServerTransaction *aTransaction, CSIPDialog &aDialog)
    {
    // add
    RMyLog::Log("ok, IncomingRequest is running");// no print,why?????? other Incoming function is also.
    if(aTransaction->Type() == SIPStrings::StringF( SipStrConsts::ENotify ))
    {
    ....
    }
    }

    but i try to capture the data, my phone give a 400 Bad Request Response?

    What can I do?

    when accepted the notify, I want to do someting (such as register, message,and so on).

    My gods!, Could you help me!!
    thanks a lot...................
    weclome to my site: blog.csdn.net/sodangerous

  5. #5
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    74

    Re: SIP NOTIFY Problem

    The NOTIFY could have an error, causing SIP stack to automatically respond with 400 Bad Request.

    -jp

  6. #6
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Lightbulb Re: SIP NOTIFY Problem

    But when SIP Message recieved, this problem is also.
    I'm sure the recieved message is right.
    weclome to my site: blog.csdn.net/sodangerous

  7. #7
    Regular Contributor
    Join Date
    Aug 2007
    Posts
    74

    Re: SIP NOTIFY Problem

    Could you copy the SIP message flow here?

    -jp

  8. #8
    Registered User
    Join Date
    Aug 2007
    Posts
    19

    Re: SIP NOTIFY Problem

    Hi sodangerous.

    Is the NOTIFY received within a SIP dialog?
    If it is not, this is probably the reason for the 400 response.
    See chapter 12 in http://www.ietf.org/rfc/rfc3261.txt
    for the definition of a SIP dialog.

    Usually NOTIFYs are received within a SIP dialog
    established by sending a SUBSCRIBE
    (http://www.ietf.org/rfc/rfc3265.txt) or
    sending a REFER (http://www.ietf.org/rfc/rfc3515.txt).

    For example:
    SUBSCRIBE (Event: myevent) ->
    <- 200 OK
    <- NOTIFY (Event: myevent, Subscription-State: active)
    200 OK ->
    Last edited by anklemet; 2007-09-10 at 19:09.

  9. #9
    Regular Contributor
    Join Date
    Jan 2007
    Posts
    139

    Lightbulb Re: SIP NOTIFY Problem

    Hi, anklemet,
    Thank you very much!
    I'll try it soon,
    and Thanks again!
    weclome to my site: blog.csdn.net/sodangerous

Similar Threads

  1. E65 SIP connection problem
    By Razzle in forum VoIP
    Replies: 20
    Last Post: 2010-04-05, 13:10
  2. Problem using Nokia jsr180 RI with NIST JAIN SIP proxy
    By spozzi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2007-03-15, 14:04
  3. SIP MESSAGE problem
    By fox_alan in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2006-09-20, 14:30
  4. Problem with SIP Plug-in for Series 60 SDK 2.0
    By jalakuri in forum Symbian Tools & SDKs
    Replies: 27
    Last Post: 2005-08-22, 09:55
  5. Problem with installing Sip Testing program
    By isravoicer in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2004-08-21, 16: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
  •