Created by: Eric Rubin on 17-08-2010 06:32:49 PM I'm using SIP SUBSCRIBE to get presence information about phones. When I only monitor one one phone it works fine. I sent a SUBSCRIBE, get a 200 OK response, then an initial NOTIFY with the phone's busy/idle status. Shortly before the subscription's expiration time I send another SUBSCRIBE with the same Call-ID, event ID, and From tag as the first one and the same To tag as in the servers 200 response. (I increment the CSeq.) I again get a 200 OK response, and a NOTIFY. If I send 2 SUBSCRIBEs to monitor 2 different phones, each initial SUBSCRIBE gets a 200 OK and a NOTIFY, but the second set of SUBSCRIBES get dropped. I get no response back from the server. Eventually (30 minutes after the expiration time) I get a NOTIFY that the subscription has been terminated (reason=timeout). Any idea what's going on?
Here's the initial SUBSCRIBE: (192.168.97.54 is the server; 192.168.11.167 is my client) SUBSCRIBE sip:2040@192.168.97.54 SIP/2.0 Contact: <sip:192.168.11.167:5060;transport=UDP> Via: SIP/2.0/UDP 192.168.11.167:5060;branch=z9hG4bK-1-0-1-6061766 From: <sip:3200@192.168.97.54>;tag=729305 To: <sip:2040@192.168.97.54> Supported: 100rel, path Max-Forwards: 70 Content-Length: 0 Expires: 600 Call-ID: 1-2907@192.168.11.167 Cseq: 4842 SUBSCRIBE Event: presence;id=422488
Here's the server's response to the initial SUBSCRIBE: SIP/2.0 200 OK Date: Tue, 17 Aug 2010 13:36:09 GMT From: <sip:3200@192.168.97.54>;tag=729305 Content-Length: 0 To: <sip:2040@192.168.97.54>;tag=1281814172 Contact: <sip:2040@192.168.97.54:5060> Expires: 600 Call-ID: 1-2907@192.168.11.167 Via: SIP/2.0/UDP 192.168.11.167:5060;branch=z9hG4bK-1-0-1-6061766 CSeq: 4842 SUBSCRIBE
Subject: RE: Re-SUBSCRIBE request dropped when monitoring multiple phones Replied by: Eric Rubin on 02-09-2010 02:15:05 PM I finally figured out the problem. It's with the Cseq. I was incrementing the Cseq for every SUBSCRIBE I sent. But the Cseq is supposed to increment by 1 WITHIN EACH DIALOG (section 12.2.1.1 of RFC 3261). So when I had only 1 subscription (and thus 1 dialog) it worked, but when I had 2 subscriptions the Cseq was higher then the previous Cseq for the dialog. (In the example below the first Cseq is 4842 and the second is 4844.) The Call Manager drops requests when the Cseq is not 1 higher than the previous Cseq for the dialog. (I don't know why it doesn't send an "Invalid Cseq" response.) I was able to fix the problem by having Cseqs for each dialog that each incremented independently, or by having all the subscriptions within a single dialog.
I'm using SIP SUBSCRIBE to get presence information about phones. When I only monitor one one phone it works fine. I sent a SUBSCRIBE, get a 200 OK response, then an initial NOTIFY with the phone's busy/idle status. Shortly before the subscription's expiration time I send another SUBSCRIBE with the same Call-ID, event ID, and From tag as the first one and the same To tag as in the servers 200 response. (I increment the CSeq.) I again get a 200 OK response, and a NOTIFY.
If I send 2 SUBSCRIBEs to monitor 2 different phones, each initial SUBSCRIBE gets a 200 OK and a NOTIFY, but the second set of SUBSCRIBES get dropped. I get no response back from the server. Eventually (30 minutes after the expiration time) I get a NOTIFY that the subscription has been terminated (reason=timeout).
Any idea what's going on?
Here's the initial SUBSCRIBE: (192.168.97.54 is the server; 192.168.11.167 is my client) SUBSCRIBE sip:2040@192.168.97.54 SIP/2.0 Contact: <sip:192.168.11.167:5060;transport=UDP> Via: SIP/2.0/UDP 192.168.11.167:5060;branch=z9hG4bK-1-0-1-6061766 From: <sip:3200@192.168.97.54>;tag=729305 To: <sip:2040@192.168.97.54> Supported: 100rel, path Max-Forwards: 70 Content-Length: 0 Expires: 600 Call-ID: 1-2907@192.168.11.167 Cseq: 4842 SUBSCRIBE Event: presence;id=422488
Here's the server's response to the initial SUBSCRIBE: SIP/2.0 200 OK Date: Tue, 17 Aug 2010 13:36:09 GMT From: <sip:3200@192.168.97.54>;tag=729305 Content-Length: 0 To: <sip:2040@192.168.97.54>;tag=1281814172 Contact: <sip:2040@192.168.97.54:5060> Expires: 600 Call-ID: 1-2907@192.168.11.167 Via: SIP/2.0/UDP 192.168.11.167:5060;branch=z9hG4bK-1-0-1-6061766 CSeq: 4842 SUBSCRIBE
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: