Test Case 3: Changing Calling Party Presentation to Restricted

Last Updated : Apr 24, 2018 |

Use Case

Required to change Calling Party Presentation to Restricted.

Script

within session "ALL"
{
	act on message where %DIRECTION="INBOUND" and %ENTRY_POINT="AFTER_NETWORK"
	{

			/*Checks if the privacy header value matches with the regular expression
			given(“none”). If it matches, then the privacy header value is changed to “id”*/

			if(%HEADERS["Privacy"][1] = "none")then

			{
			%HEADERS["Privacy"][1] = "id";
			}
	}
}

Description

The script processes all the messages of a session. A session is defined as a SIP dialog and has the same lifetime as that of a dialog consisting of Request and Responses. The script changes the Privacy header if the header exists in the message, so that the calling party is shown as restricted to the called party.

Limitations

None.