< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate-users] The Dum says 400 Bad request when received aNOTIFY message


This is my code:

    static const Data presenceEvent("presence");
    mDum.addClientSubscriptionHandler(presenceEvent, this);


On Mon, Jul 21, 2008 at 8:50 PM, Scott Godin <slgodin@xxxxxxxxxxxx> wrote:

You are probably missing some configuration (ie. mDum.addClientSubscriptionHandler("presence", mHanlder)).  You should examine the resip logs, or step through the code in a debugger  in order to figure this out.  You may also find dum/test/UserAgent.cxx is good reference.

 

Scott

 

From: resiprocate-users-bounces@xxxxxxxxxxxxxxx [mailto:resiprocate-users-bounces@xxxxxxxxxxxxxxx] On Behalf Of Karlsson
Sent: Monday, July 21, 2008 4:08 AM
To: resiprocate-users@xxxxxxxxxxxxxxx
Subject: [reSIProcate-users] The Dum says 400 Bad request when received aNOTIFY message

 

Hi all, I try to implement the PRESENCE by reSIProcate - dum, but I send SUBSCRIBE to server, server replied me 202 accepted,
and it send NOTIFY to me later, but the DUM replied "400 Bad request " when it received the NOTIFY, how to do  ?


I have wrote these code:

    mMasterProfile->addSupportedMethod(NOTIFY);
    mMasterProfile->addSupportedMimeType(NOTIFY, Mime("message", "sipfrag"));
    mMasterProfile->addSupportedMimeType(NOTIFY, Mime("application", "simple-message-summary"));
    mMasterProfile->addSupportedMimeType(NOTIFY, Pidf::getStaticType());
    mMasterProfile->addSupportedMimeType(MESSAGE, Mime("text", "plain"));


There is the logs:


SUBSCRIBE sip:testuser2@xxxxxxxxx:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.128:6684;branch=z9hG4bK-d8754z-e563f4337b37c544-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:testuser1@xxxxxxxxxxxxx:6684>
To: <sip:testuser2@xxxxxxxxx:5060>
From: <sip:testuser1@xxxxxxxxx>;tag=e623f860
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, NOTIFY, REFER, REGISTER, SUBSCRIBE, MESSAGE, INFO
Proxy-Authorization: Digest

username="testuser1",realm="iptel.org",nonce="48843fd748843fcdcc6b39d482de0048ab5656a87988b0a6",uri="sip:testuser2@xxxxxxxxx:5060",response="a3ed7c2d5c27de671c8c5e7c4bc1a84

3",algorithm=MD5
Supported: replaces
User-Agent: TEST PHONE
Event: presence
Content-Length: 0



SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.128:6684;branch=z9hG4bK-d8754z-6a7fdd0750244763-1---d8754z-;rport=2591;received=222.244.116.11
To: <sip:testuser2@xxxxxxxxx:5060>;tag=b98f1230ac1a7949bf499aa7f9ea7038.49b5
From: <sip:testuser1@xxxxxxxxx>;tag=e623f860
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 1 SUBSCRIBE
Proxy-Authenticate: Digest realm="iptel.org", nonce="48843fd748843fcdcc6b39d482de0048ab5656a87988b0a6"
Server: Sip EXpress router (2.1.0-dev21-tcp (i386/linux))
Content-Length: 0
Warning: 392 213.192.59.75:5060 "Noisy feedback tells:  pid=442 req_src_ip=222.244.116.11 req_src_port=2591 in_uri=sip:testuser2@xxxxxxxxx:5060

out_uri=sip:testuser2@xxxxxxxxx:5060 via_cnt==1"




SUBSCRIBE sip:testuser2@xxxxxxxxx:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.128:6684;branch=z9hG4bK-d8754z-e563f4337b37c544-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:testuser1@xxxxxxxxxxxxx:6684>
To: <sip:testuser2@xxxxxxxxx:5060>
From: <sip:testuser1@xxxxxxxxx>;tag=e623f860
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 SUBSCRIBE
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, UPDATE, NOTIFY, REFER, REGISTER, SUBSCRIBE, MESSAGE, INFO
Proxy-Authorization: Digest

username="testuser1",realm="iptel.org",nonce="48843fd748843fcdcc6b39d482de0048ab5656a87988b0a6",uri="sip:testuser2@xxxxxxxxx:5060",response="a3ed7c2d5c27de671c8c5e7c4bc1a84

3",algorithm=MD5
Supported: replaces
User-Agent: TEST PHONE
Event: presence
Content-Length: 0



SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.1.128:6684;received=222.244.116.11;branch=z9hG4bK-d8754z-e563f4337b37c544-1---d8754z-;rport=2591
Record-Route: <sip:213.192.59.75;lr;avp=mV0BBwB1YWNfbmF0AQAAAA>
Contact: <sip:testuser2@xxxxxxxxxxxxxx:63999;rinstance=b6d39b43e1696b09>
To: <sip:testuser2@xxxxxxxxx:5060>;tag=a714b457
From: <sip:testuser1@xxxxxxxxx>;tag=e623f860
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 SUBSCRIBE
Expires: 3600
User-Agent: Bria release 2.3 stamp 47296
Content-Length: 0




NOTIFY sip:testuser1@xxxxxxxxxxxxxx:2591 SIP/2.0
Record-Route: <sip:213.192.59.75;avp=VEABBwB1YWNfbmF0AQAAAAEHAHVhY19uYXQBAAAA;lr=on>
Via: SIP/2.0/UDP 213.192.59.75;branch=z9hG4bK88ec.638e082.0
Via: SIP/2.0/UDP 192.168.1.30:40088;received=222.244.116.11;branch=z9hG4bK-d8754z-9078724d573ba36b-1---d8754z-;rport=63999
Max-Forwards: 16
Contact: <sip:testuser2@xxxxxxxxxxxxxx:63999;rinstance=b6d39b43e1696b09>
To: <sip:testuser1@xxxxxxxxx>;tag=e623f860
From: <sip:testuser2@xxxxxxxxx:5060>;tag=a714b457
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 NOTIFY
User-Agent: Bria release 2.3 stamp 47296
Subscription-State: pending;expires=3600
Event: presence
Content-Length: 0
P-hint: rr-enforced



SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 213.192.59.75;branch=z9hG4bK88ec.638e082.0
Via: SIP/2.0/UDP 192.168.1.30:40088;received=222.244.116.11;branch=z9hG4bK-d8754z-9078724d573ba36b-1---d8754z-;rport=63999
To: <sip:testuser1@xxxxxxxxx>;tag=e623f860
From: <sip:testuser2@xxxxxxxxx:5060>;tag=a714b457
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 NOTIFY
User-Agent: TEST PHONE
Content-Length: 0


NOTIFY sip:testuser1@xxxxxxxxxxxxxx:2591 SIP/2.0
Record-Route: <sip:213.192.59.75;avp=VEABBwB1YWNfbmF0AQAAAAEHAHVhY19uYXQBAAAA;lr=on>
Via: SIP/2.0/UDP 213.192.59.75;branch=z9hG4bK88ec.638e082.0
Via: SIP/2.0/UDP 192.168.1.30:40088;received=222.244.116.11;branch=z9hG4bK-d8754z-9078724d573ba36b-1---d8754z-;rport=63999
Max-Forwards: 16
Contact: <sip:testuser2@xxxxxxxxxxxxxx:63999;rinstance=b6d39b43e1696b09>
To: <sip:testuser1@xxxxxxxxx>;tag=e623f860
From: <sip:testuser2@xxxxxxxxx:5060>;tag=a714b457
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 NOTIFY
User-Agent: Bria release 2.3 stamp 47296
Subscription-State: pending;expires=3600
Event: presence
Content-Length: 0
P-hint: rr-enforced



SIP/2.0 400 Bad Request
Via: SIP/2.0/UDP 213.192.59.75;branch=z9hG4bK88ec.638e082.0
Via: SIP/2.0/UDP 192.168.1.30:40088;received=222.244.116.11;branch=z9hG4bK-d8754z-9078724d573ba36b-1---d8754z-;rport=63999
To: <sip:testuser1@xxxxxxxxx>;tag=e623f860
From: <sip:testuser2@xxxxxxxxx:5060>;tag=a714b457
Call-ID: MTZmMDhlZjViZjEwZGE0NWQ4NWI4YzQwNDUxNmFlM2Y.
CSeq: 2 NOTIFY
User-Agent: TEST PHONE
Content-Length: 0