## 6 TV Shopping/Food Ordering  
On a TV shopping channel, viewers can purchase the products through the TV remote controller. Similarly, the TV food ordering service provides web pages for subscribers to order pizzas or meals. With the click-to-dial function, the IPTV-CS establishes a call for the MOD user [UE1; (3) in Figure 1] to contact the vender [UE2; (10) in Figure 1] when the user is watching the TV shopping channel. Note that UE1 can be a special MOD remote controller with phone features, a SIP-based video phone, or a mobile phone. We assume that both UE1 and UE2 are mobile phones. The call flow for click-to-dial is described as follows (see Figure 8):  
**Step 1:** To purchase a product, UE1 selects this product shown on the TV screen by pressing the button of the remote controller. Then the browser on the STB sends an HTTP request to the MOD-SDP. The URI of the HTTP request is  
http://cs_ip:port_no/IMS/MakeCallServlet?black={$encrypted string}&item_id={$itemId} where cs_ip:port_no are the IP address/port number of the IPTV-CS, item_id indicates the merchandise the subscriber wants to order, black specifies the calling ID (_i.e._, the phone number of UE1), and the script MakeCallServlet under the directory IMS/ instructs the IPTV-CS to perform the _Third Party Call Control_ (TPCC) between the MOD user (UE 1) and the  
Figure 7: Message flow of SMS on TV screen. vendor (UE 2). The MOD-SDP forwards the message to the IPTV-CS for the authorization procedure. **Step 2:**: The authorization procedure is similar to Step 3 in Figure 6, and the details are omitted. **Step 3:**: After authorization, the IPTV-CS uses item_id to retrieve the called ID (the phone number of UE2) from its product database. Then the IPTV-CS sends the HTTP request to the MMAS Server with the following URI:  
[[http://mmas.ip:port_no/TPCC/dotpcc.jsp?calling=](http://mmas.ip:port_no/TPCC/dotpcc.jsp?calling=)]([http://mmas.ip:port_no/TPCC/dotpcc.jsp?calling=](http://mmas.ip:port_no/TPCC/dotpcc.jsp?calling=)){$calling_no}&called={$called_no},  
where mmas_ip:port_no are the IP address and port number of the MMAS Server, and the script dotpcc.jsp in directory TPCC/ instructs the MMAS server to perform the third party call control. Parameters called_no and calling_no are phone numbers of UE 2 and UE 1, respectively. **Step 4:**: The MMAS Server returns an HTTP \"processing\" response to the STB to indicate that the request is being processed. **Step 5:**: In parallel with Step 4, the MMAS Server initiates a SIP INVITE message without SDP to the Media Server. The Request-URI of the message is <sip:8890@ms_ip:5060>, where ms_ip is the IP address of the Media Server. The code 8890 is dedicated to a simple _Interactive Voice Response_ (IVR) function of the Media Server to play an announcement, which requests  
Figure 8: Message flow for TV shopping/food ordering. [PERSON] to dial digit \"#\" as the agreement to continue the call. This action confirms that [PERSON] will make this order. **Step 6:**: When the Media Server is ready to provide the 8890 function, it answers a SIP 200 OK with SDP of the Media Server to the MMAS Server. **Step 7:**: The MMAS Server establishes an RTP session to UE 1 following the standard SIP call setup procedure (the details are omitted). **Step 8:**: After [PERSON] dialed the digit \"#\", the Media Server sends this code to the MMAS Server by an HTTP request:  
http://mmas_ip:port_no/TPCC/receiveinformation.jsp?call_id={$sip_callid}&result={1}&co de={#},  
where the script receiveinformation.jsp in directory TPCC/ instructs the MMAS Server to receive UE1's dialed digit from the Media Server and then start to communicate with UE2 (with the called number stored in the MMAS server), call_id obtained in the Call-ID header field of the SIP INVITE request at Step 5 is used by the MMAS Server to retrieve the information about this call, result \"1\" means that the action is successful (other values mean failure), and code \"#\" is the dialed DTMF digit from UE1.