Question

I'm writing a SIP client, and I'm having some weird issues when using SUBSCRIBE to an existing client (different, freeware software)

I'm using my own server, but it's not the problem because if I'm doing a SUBSCRIBE from a different client (pjsip), it all works fine.

I'm sending out this SUBSCRIBE message:

SUBSCRIBE sip:3009@10.0.0.4 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.7:5060;rport;branch=z9hG4bKPj3893ccd****************
Max-Forwards: 70
From: <sip:10.0.0.7>;tag=023a965a14a143eb8*******
To: sip:3009@10.0.0.5;tag=8cfb7*********
Contact: <sip:10.0.0.7:5060;ob>
Call-ID: bf5d48fe8ca0***************
CSeq: 14388 SUBSCRIBE
Route: <sip:10.0.0.5;lr;ftag=023a965a14a143eb8*********>
Event: presence
Expires: 600
Supported: replaces, 100rel, timer, norefersub
Accept: application/pidf+xml, application/xpidf+xml
Allow-Events: presence, message-summary, refer
Content-Length:  0

After that message, an OK is received, but then I'm receiving a NOTIFY message for every presence change that the other client did since HE registered to the server.

The problem doesn't happen with different clients..

If it matters, I'm developing on Visual Studio 2008 on Windows 7 64bit

Any ideas?

Thanks!

Était-ce utile?

La solution

From the comments the issue seems to be that you are not sending a valid response to the client and therefore it is sending multiple retransmits of each NOTIFY request.

To generate a valid response the key aspect is that you have to set the Via branch parameter and CSeq to the same values as the request, see RFC 3261, section 17.1.3.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top