Chapter 12. Implementing the IMS sample service 405
Figure 12-55 GetDistance details
59.Select the Loop Through Addresslist While loop.
60.Right-click and select Add Snippet.
61.Rename the new snippet Assign GetDistance Output.
62.With the snippet selected, open the Properties view.
63.Select the Details tab.
64.Create a visual snippet as shown in Figure 12-56.
Figure 12-56 Assign GetDistance Output snippet
406 Developing SIP and IP Multimedia Subsystem (IMS) Applications
65.Select the Determine Closest Address sequence.
66.Right-click and select Add Snippet.
67.Rename the new snippet Assign Closest Address.
68.With the snippet selected, open the Properties view .
69.Select the tab Details.
70.Create a visual snippet as shown in Figure 12-57.
Figure 12-57 Assign Closest Address snippet
At this stage we have calculated the closest address and we are ready to return
a response to the initial request.
Implement the Return Reply sequence
This sequence responds to the initial request by returning a status and the
address that is closest to the originator. The Reply node was automatically
created when we created the business process. We just have to add some
tracing information.
1. Select the Reply node.
2. Right-click and select Insert Before Snippet.
3. Rename the new snippet Log Reply.
4. With the snippet is selected, open the Properties view.
5. Select the Details tab.
6. Create a visual snippet as shown in Figure 12-58.
Figure 12-58 Log Reply snippet
Chapter 12. Implementing the IMS sample service 407
Implement the Establish Call sequence
This sequence invokes the Third Party Call Control service to establish a call
between the originator and the closest address
Before we invoke the Third Party Call Control service we need to define the
required input and output variables. Using the Add icon next to the Variables
label add the following variables:
Table 12-9 Variables for Establish Call sequence
Follow these steps to make a call.
1. Select the Establish Call sequence, and right-click.
2. Select Add Choice.
3. Rename the new choice node Establish Call Choice.
4. Select the default case.
5. Open the Properties view and select the Description tab.
6. Enter Status OK as Display Name.
7. Select the Details tab.
8. Click Create a New Condition. This will open the visual editor.
9. Create a condition as shown in Figure 12-59.
Figure 12-59 Establish Call condition
10.Select the Status OK case.
11.Right-click and select Add Snippet.
12.Rename the new snippet Assign MakeCall Input.
13.With the snippet selected, open the Properties view .
14.Select the Details tab.
15.Create a visual snippet as shown in Figure 12-60.
Variable Data type
MakeCallParameters makeCall
MakeCallResponse makeCallResponse
bMakeCallFault boolean
408 Developing SIP and IP Multimedia Subsystem (IMS) Applications
Figure 12-60 Assign MakeCall Input snippet
Add the Otherwise condition to cover the error case
16.Select the Establish Call choice node.
17.Right-click and select Add Otherwise.
18.Select the Otherwise case.
19.Right-click and select Add Snippet.
20.Rename the new snippet Log No Call.
21.With the snippet selected, open the Properties view .
22.Select the Details tab.
23.Create a visual snippet as shown in Figure 12-61.
Figure 12-61 Log No Call snippet
We are ready to invoke the makeCall operation of the Third Party Call Control
Web service.
24.Select the Status OK case.
25.Right-click and select Add Invoke.
26.Rename the new Invoke node MakeCall.
27.With the Invoke node selected, open the Properties view.
Chapter 12. Implementing the IMS sample service 409
28.Select the Details tab.
29.Click Browse to select a Reference Partner. The partner selection dialog box
will be opened.
30.Select ThirdPartyCallControlPartner.
31.Click OK.
32.The selected Partner and Interface are displayed in the Details tab.
33.Choose makeCall as the operation.
34.Make sure that Use Data Type Variables check box is checked.
35.Similar to the getLocation Invoke node (see Step 24 on page 400) assign the
following variables to the input and output parameters of the makeCall
operation:
Table 12-10 Assign variables to the makeCall parameters
When finished, the MakeCall Details tab should look like Figure 12-62 on
page 409.
Figure 12-62 MakeCall details
Parameter Variable
parameters MakeCallParameters
result MakeCallResponse

Get Developing SIP and IP Multimedia Subsystem (IMS) Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.