You are here: CSP Developer’s Guide: Internet Protocol > 5 Session-Initiation Protocol (SIP) Software > SIP Notify Subscription State

SIP Notify Subscription State

Overview

This features adds support for Subscription-State headers in REFER-NOTIFY requests in Call Agent Mode (CAM) and non-CAM configurations.

The benefits of this feature include:

• Host control on REFER-NOTIFY Subscription-State header.

• Host control on the duration of REFER-NOTIFY subscription ("expires" parameter).

• Host control on the retry-after time interval, which would be used to inform the remote UA when the REFER request could be retried in case the previous REFER failed.

• Customizable reason code in the Subscription-State header of REFER-NOTIFY that terminates the subscription.

Pertinent Specification

RFC 3265 and 3515

Description

The NOTIFY request for REFER now contains the Subscription-State header. This feature provides the following functionality:

• Access to Subscription-State header.

• Access to "expires" parameter when the subscription state is active.

• Access to reason code when the subscription state is terminated.

• Access to "retry-after" parameter when the subscription state is terminated unsuccessfully.

REFER-NOTIFY Subscription

Termination of the REFER-NOTIFY means either that the notifier (Referee) will not send any more REFER-NOTIFY messages or that the referrer will not accept any more REFER-NOTIFY requests once the REFER-NOTIFY subscription is terminated.

When the subscription is terminated the notifier CSP will nack the PPL the Event Request with message 0x1308. All REFER-NOTIFY requests to the referrer will receive a "481 Call/Transaction Does Not Exist" response.

API Call Control Messages

• PPL Event Request (0x0044)

• PPL Event Indication (0x0043)

API and CSA Configuring and Querying

This feature can be configured either using the API or CSA.

API Configuring and Querying

You can configure Subscription-State header reporting in a REFER-NOTIFY message. By default the CSP does not report the Subscription-State header if the header is present in the received REFER-NOTIFY message.

To enable the reporting, set bit 19 of the data part in SIP Message Information Mask TLV (0x027F) and send the TLV within the VoIP Protocol Configure API (0x00EE).

CSA Configuring and Querying

To configure and query the SIP stack for this feature, view the Configure SIP Advanced screen, Additional Host Signaling Parameters, and select Subscription State Refer-Notify message..

Call Flows

Blind REFER

The default PPL Event Request (that is, without the Notify Subscription State TLV) to generate NOTIFY for Blind REFER works as follows. Also, see the call flow diagram following these steps.

1. The NOTIFY will have a Subscription-State header with the string "active" if the host provides a provisional response status else it will be "terminated;reason=noresource" if the host provides a final response status.

2. Notifications for Blind refer do not contain "expires" parameter and hence the subscription never times out.

3. Notify with final response status or releasing a call would terminate the subscription.

4. If the NOTIFY gets a response in the range 3xx-6xx the subscription will be terminated.

Consultative REFER

The default PPL Event Request (that is, without the Notify Subscription State TLV) to generate NOTIFY for Consultative REFER works as follows: Also, see the call flow diagram following these steps.

1. The NOTIFY will have a Subscription-State header with the string "active;expire=x" if the host provides a provisional response status where x is 64*T1 (for default T1 of 500 ms x is 32 s) else it will be "terminated;reason=noresource" if the host provides a final response status.

2. Notifications for Consultative refer would have a default expiry interval of 64*T1.

3. Notify with final response status, exceeding the time interval in the expires parameter or releasing a call would terminate the subscription.

4. A timer with interval equal to the "expires" parameter value will be started or restarted at the UAs each time NOTIFY is send/received. The value of timer is the host supplied value or if host has not supplied it would be the default value of 64*T1. NOTIFY with subscription state of terminated stops this timer in both the UAs.

5. When the subscription expires the notifier CSP sends out a NOTIFY of status 603 Decline with Subscription-State header with string set to "terminated:reason=noresource".

6. When the subscription expires, the referrer CSP will terminate the subscription. No message will be send out to the remote UA.

7. If the NOTIFY gets a response in the range 3xx-6xx, the timer will be stopped and the subscription will be terminated.

Blind/Consultative

The PPL ER with the Notify Subscription State TLV duly filled to generate NOTIFY for REFER (Blind/Consultative) works in the following manner:

1. The NOTIFY will have a Subscription-State header with the string "active;expire=x" if the host either provides or sets the subscription state to active and expire parameter to 'x', irrespective of the response status provided.

2. The NOTIFY will have a Subscription-State header with the string "pending;reason=waiting" if the host either provides or sets the subscription state to pending and reason code to 'waiting', irrespective of the response status provided.

3. If a NOTIFY is generated when the subscription state is pending, its body should consist only of a status line containing a response code of 100 else the NOTIFY would be responded with 400 Bad Request.

4. The NOTIFY will have a Subscription-State header with the string "terminated;reason=noresource" if the host sets the subscription state to terminated and reason code to 'noresource, irrespective of the response status provided.

5. The CSP which receives the NOTIFY with expire parameter would terminate the subscription after the time interval expires. The CSP will not send any messages to inform the remote end about the termination.

6. A timer with interval equal to the "expires" parameter value, if present, will be started or restarted at the UAs each time NOTIFY is send/received. The value of timer is the host supplied value or if host has not supplied it would be the default value of 64*T1 seconds (default value only used for consultative refer).

7. The notifier CSP that sends NOTIFY with expire parameters would terminate the subscription after the time interval expires and also sends a NOTIFY of status 603 Decline with Subscription-State header string set to "terminated:reason=noresource".

8. The referrer CSP that received NOTIFY with expire parameters would terminate the subscription after the time expires. No messages would be send out to the remote UA.

9. If the NOTIFY gets a response in the range 3xx-6xx, the timer will be stopped and the subscription will be terminated.

10. The "retry-after" parameter will be added only if the host provides it in the PPL ER for REFER-NOTIFY that terminates the subscription. CSP will not add this by itself in any case.

11. The following figures show two instances of REFER-NOTIFY call flow.

Message Trace

The trace for call flow in figure 4 is given below.

CSP 1 API Trace:

H->X

[00 88 00 2c 00 00 01 00 01 0d 03 00 64 1f 02 03 00 1e 00 0f 00 02 01 16 00 02 00 00 01 1a 00 03 00 00 00 03 00 33 00 62 00 0a 27 7e 00 03 08 00 00 29 19 00 06 32 32 32 32 32 00 29 1b 00 0c 31 30 2e 31 30 2e 31 2e 32 35 32 00 29 1c 00 04 00 00 13 c4 29 23 00 06 31 31 31 31 31 00 29 25 00 0c 31 30 2e 31 30 2e 31 2e 32 35 34 00 29 26 00 04 00 00 13 c4 27 92 00 04 0a 0a 01 bf 27 93 00 04 00 00 10 7c 29 14 00 01 01]

X->H

[00 07 00 2c 00 00 01 00 10]

X->H

[00 11 00 43 00 50 01 00 01 0d 03 00 64 1f 00 a7 00 24 00]

H->X

[00 05 00 43 00 50 01]

H->X

[00 05 00 43 00 50 01]

X->H

[00 44 00 43 00 51 01 00 01 0d 03 00 64 1f 00 a7 00 20 01 03 00 33 00 2e 00 01 29 ff 00 28 2a 0e 00 04 0a 0a 01 ac 2a 01 00 1c 2a 03 00 01 00 2a 07 00 04 00 00 29 bc 2a 13 00 01 00 2a 02 00 06 2a 08 00 02 00 02]

X->H

[00 0d 00 2e 00 10 01 00 01 0d 03 00 64 1f 20]

H->X

[00 05 00 43 00 51 01]

H->X

[00 05 00 43 00 51 01]

H->X

[00 32 00 44 00 00 01 00 01 0d 03 00 64 1f 00 a7 00 27 01 03 00 33 00 1c 00 02 29 1e 00 06 32 30 35 39 37 00 29 20 00 0c 31 30 2e 31 30 2e 31 2e 32 35 34 00]

H->X

[00 05 00 2e 00 10 01]

X->H

[00 07 00 44 00 00 01 00 10]

H->X

[00 05 00 2e 00 10 01]

X->H

[00 1e 00 43 00 52 01 00 01 0d 03 00 64 1f 00 a7 00 27 01 03 00 33 00 08 00 01 29 15 00 02 00 ca]

H->X

[00 05 00 43 00 52 01]

H->X

[00 05 00 43 00 52 01]

X->H

[00 25 00 43 00 53 01 00 01 0d 03 00 64 1f 00 a7 00 28 01 03 00 33 00 0f 00 02 29 15 00 02 00 64 29 48 00 03 02 00 20]

H->X

[00 05 00 43 00 53 01]

H->X

[00 05 00 43 00 53 01]

X->H

[00 37 00 43 00 54 01 00 01 0d 03 00 64 1f 00 a7 00 28 01 03 00 33 00 21 00 02 29 15 00 02 00 c8 29 48 00 15 00 00 05 64 65 61 63 74 69 76 61 74 65 64 68 65 61 64 65 72 00]

H->X

[00 05 00 43 00 54 01]

H->X

[00 05 00 43 00 54 01]

H->X

[00 11 00 08 00 00 01 00 02 0d 03 00 64 1f 0d 03 00 64 1f]

X->H

[00 07 00 08 00 00 01 00 10]

X->H

[00 57 00 69 00 10 01 00 01 0d 03 00 64 1f 02 02 1e 2a 00 05 01 04 00 04 00 00 00 00 01 05 00 04 00 00 00 3c 01 11 00 04 00 00 00 3c 01 10 00 04 00 00 25 80 01 12 00 04 00 00 25 80 03 00 33 00 18 00 03 27 4e 00 02 00 10 27 92 00 04 0a 0a 01 bf 27 93 00 04 00 00 10 7c]

H->X

[00 05 00 69 00 10 01]

CSP 2 API Trace:

X->H

[00 da 00 2d 00 17 02 00 01 0d 03 00 c8 17 00 33 01 03 00 33 00 c6 00 11 27 4e 00 02 00 05 27 7e 00 03 08 00 00 29 19 00 06 32 32 32 32 32 00 29 1b 00 0c 31 30 2e 31 30 2e 31 2e 32 35 32 00 29 1c 00 04 00 00 13 c4 29 23 00 06 31 31 31 31 31 00 29 25 00 0c 31 30 2e 31 30 2e 31 2e 32 35 34 00 29 26 00 04 00 00 13 c4 29 28 00 06 31 31 31 31 31 00 29 2d 00 06 31 31 31 31 31 00 29 2f 00 0c 31 30 2e 31 30 2e 31 2e 32 35 34 00 29 30 00 04 00 00 13 c4 29 33 00 01 01 27 18 00 08 02 00 00 00 05 11 11 10 27 17 00 06 02 00 05 22 22 20 29 ff 00 23 2a 0e 00 04 0a 0a 01 bf 2a 01 00 17 2a 03 00 01 00 2a 07 00 04 00 00 10 7c 2a 02 00 06 2a 08 00 02 00 02 29 16 00 01 01]

H->X

[00 0c 00 2d 00 17 02 00 01 0d 03 00 c8 17]

H->X

[00 0c 00 2d 00 17 02 00 01 0d 03 00 c8 17]

H->X

[00 11 00 bf 00 00 02 00 02 0d 03 00 c8 17 0d 03 00 c8

17]

X->H

[00 07 00 bf 00 00 02 00 10]

H->X

[00 0d 00 ba 00 00 02 00 01 0d 03 00 c8 17 01]

X->H

[00 07 00 ba 00 00 02 00 10]

X->H

[00 32 00 43 00 17 02 00 01 0d 03 00 c8 17 00 a7 00 21 01 03 00 33 00 1c 00 02 29 19 00 06 32 30 35 39 37 00 29 1b 00 0c 31 30 2e 31 30 2e 31 2e 32 35 34 00]

H->X

[00 05 00 43 00 17 02]

H->X

[00 05 00 43 00 17 02]

H->X

[00 25 00 44 00 00 02 00 01 0d 03 00 c8 17 00 a7 00 20 01 03 00 33 00 0f 00 02 29 4b 00 02 00 64 29 48 00 03 02 00 20]

X->H

[00 07 00 44 00 00 02 00 10]

H->X

[00 37 00 44 00 00 02 00 01 0d 03 00 c8 17 00 a7 00 20 01 03 00 33 00 21 00 02 29 4b 00 02 00 c8 29 48 00 15 00 00 05 64 65 61 63 74 69 76 61 74 65 64 68 65 61 64 65 72 00]

X->H

[00 07 00 44 00 00 02 00 10]

X->H

[00 57 00 69 00 17 02 00 01 0d 03 00 c8 17 02 02 1e 2a 00 05 01 04 00 04 00 00 00 00 01 05 00 04 00 00 00 3b 01 11 00 04 00 00 00 45 01 10 00 04 00 00 24 e0 01 12 00 04 00 00 2b 20 03 00 33 00 18 00 03 27 4e 00 02 00 10 27 92 00 04 0a 0a 01 ac 27 93 00 04 00 00 29 bc]

H->X

[00 05 00 69 00 17 02]

SIP Trace from CSP1:

1 -SENT To 10.10.1.252:5060 at 6262

INVITE sip:22222@10.10.1.252:5060 SIP/2.0

Via: SIP/2.0/UDP 10.10.1.254

To: 22222<sip:22222@10.10.1.252:5060>

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

Contact: 11111<sip:11111@10.10.1.254:5060>

User-Agent: Excel_CSP/83.10.9

Supported: timer

Session-Expires: 1800

Min-SE: 300

CSeq: 1 INVITE

Content-Type: application/sdp

Content-Length: 100

v=0

o=sip 0 0 IN IP4 10.10.1.254

s=SIP_Call

c=IN IP4 10.10.1.191

t=0 0

m=audio 4220 RTP/AVP 0

2 -RECEIVED From 10.10.1.252:5060 at 6262

SIP/2.0 100 Trying

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 1 INVITE

Contact: 22222<sip:22222@10.10.1.252:5060>

Via: SIP/2.0/UDP 10.10.1.254

User-Agent: Excel_CSP/83.10.9

Content-Length: 0

3 -RECEIVED From 10.10.1.252:5060 at 6263

SIP/2.0 180 Ringing

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 1 INVITE

Contact: 22222<sip:22222@10.10.1.252:5060>

Via: SIP/2.0/UDP 10.10.1.254

User-Agent: Excel_CSP/83.10.9

Content-Length: 0

4 -RECEIVED From 10.10.1.252:5060 at 6263

SIP/2.0 200 OK

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 1 INVITE

Contact: 22222<sip:22222@10.10.1.252:5060>

Require: timer

Supported: timer

Session-Expires: 1800; refresher=uas

Via: SIP/2.0/UDP 10.10.1.254

User-Agent: Excel_CSP/83.10.9

Content-Type: application/sdp

Content-Length: 131

v=0

o=sip 1151434244 1151434244 IN IP4 10.10.1.252

s=SIP_Call

c=IN IP4 10.10.1.172

t=0 0

m=audio 10684 RTP/AVP 0

a=sendrecv

5 -SENT To 10.10.1.252:5060 at 6263

ACK sip:22222@10.10.1.252:5060 SIP/2.0

Via: SIP/2.0/UDP 10.10.1.254

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 1 ACK

Content-Length: 0

6 -SENT To 10.10.1.252:5060 at 6263

REFER sip:22222@10.10.1.252:5060 SIP/2.0

Via: SIP/2.0/UDP 10.10.1.254

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 2 REFER

Max-Forwards: 70

Contact: 11111<sip:11111@10.10.1.254:5060>

Refer-To: <sip:20597@10.10.1.254>

User-Agent: Excel_CSP/83.10.9

Content-Length: 0

7 -RECEIVED From 10.10.1.252:5060 at 6263

SIP/2.0 202 Accepted

To: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

From: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 2 REFER

Contact: 22222<sip:22222@10.10.1.252:5060>

Via: SIP/2.0/UDP 10.10.1.254

User-Agent: Excel_CSP/83.10.9

Content-Length: 0

8 -RECEIVED From 10.10.1.252:5060 at 6264

NOTIFY sip:11111@10.10.1.254:5060 SIP/2.0

Via: SIP/2.0/UDP 10.10.1.252

To: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

From: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 3 NOTIFY

Event: refer

Contact: 22222<sip:22222@10.10.1.252:5060>

Subscription-State: active;expires=32

Content-Type: message/sipfrag;version=2.0

Content-Length: 20

SIP/2.0 100 Trying

9 -SENT To 10.10.1.252:5060 at 6264

SIP/2.0 200 OK

To: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

From: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 3 NOTIFY

Via: SIP/2.0/UDP 10.10.1.252

User-Agent: Excel_CSP/83.10.9

Content-Length: 0

10-RECEIVED From 10.10.1.252:5060 at 6264

NOTIFY sip:11111@10.10.1.254:5060 SIP/2.0

Via: SIP/2.0/UDP 10.10.1.252

To: 11111<sip:11111@10.10.1.254:5060>;tag=412781131876

From: 22222<sip:22222@10.10.1.252:5060>;tag=81131b2a

Call-ID: EXCEL-CSP1.101f.6262.800@10.10.1.254

CSeq: 4 NOTIFY

Event: refer

Contact: 22222<sip:22222@10.10.1.252:5060>

Subscription-State: terminated;retry-after=5;reason=deactivatedheader

Content-Type: message/sipfrag;version=2.0

The condition of a component at a given instant. The current "context" of a PPL object, such as Idle, Seizing, Answered. In PPL files, a State is represented by a circle.
A computer, attached to the Excel platform through an RS-232 or Ethernet link, from which you run the telecommunications application that controls the Excel platform.
See Programmable Protocol Language.
Setting up, monitoring, and tearing down calls.
A condition that, when met, drives a state machine from one state to another. A condition that drives a Component out of its current state by invoking an associated primitive.
See Converged Services Administrator.
Session-Initiation Protocol. A signaling protocol used for establishing sessions in an IP network. A session could be a simple, two-way telephone call, or it could be a collaborative multi-media conference session.
Tag-Length-Value block. A standardized block that allows data to inserted in a standard way into API messages.
Voice over Internet Protocol. The delivery of voice information in digital form in discrete packets rather than in the traditional circuit-committed protocols of the public-switched telephone network (PSTN).
Digital communications link - voice, data, and video at a 1.544 Mbps rate (24 64 Kbps channels)
Real-Time Transport Protocol. Supports transport of real-time data like interactive voice and video over packet-switched networks.
Positive acknowledgment to a message