## 3 Message Flow for Location Information  
By dialing the service access numbers, a user [the UE; (3) in Figure 1] can access MMAS/IPTV-CS services. In our example, the service access number for dining information service is 1270181. These service access numbers are stored in the service configuration table of the MMAS Server. The service scripts corresponding to these service access numbers are stored in the Media Server under the directory /home/ivr. Furthermore, every service access number is mapped to the MMAS Server's IP address mmas_ip (_i.e._, 172.28.41.6) in the routing table of the CSCF. Figure 4 illustrates how location information can be retrieved. For example, when a user dials the service access number 1270181 to access the location information of a restaurant (just like a typical phone number dialing), the following steps are executed:  
Figure 3: IMS Registration. **Step 1:**: The UE sends a SIP INVITE request to the CSCF. The Request-URI is \(<\)sip:[EMAIL_ADDRESS]\(>\). The _Session Description Protocol_ (SDP) [9] of this request specifies UE's audio and video formats (e.g., the voice codec is AMRnb, the audio _Real-time Transport Protocol_ (RTP) port is 17946, the video codec is H263, _Common Intermediate Format_ (CIF) (352 x 288) resolution, and the video RTP port is 42360). The restaurant name is indicated in SDP session information field. **Step 2**: When the CSCF receives this SIP INVITE request, it replies a SIP 100 Trying response to UE to indicate that the setup procedure is in progress. **Step 3**: In parallel with Step 2, the CSCF uses 1270181 to retrieve the MMAS Server's IP address from the routing table, and forwards the SIP INVITE request to this IP address. **Step 4**: If the service access number 1270181 (retrieved from the Request-URI of the INVITE) is found in the service configuration table, the MMAS Server replies the SIP 100 Trying response to inform the CSCF that the request is being handled. **Step 5**: The MMAS Server sends SIP INVITE to the Media Server to execute service script 1270181. **Step 6**: The Media Server replies 100 Trying response and starts a thread for this service with the following command:  
Creation of ExecBox id:5 pid:14473 userid:0 directory:/home/ivr/1270181' and the script 1270181 located at directory /home/ivr/ is executed. **Step 7**: The script 1270181 instructs the GIS Server to provide the electronic map by issuing the command [[http://map.cht.com.tw/IntegratedMapService/GetAPI.aspx?key=xxxx](http://map.cht.com.tw/IntegratedMapService/GetAPI.aspx?key=xxxx)]([http://map.cht.com.tw/IntegratedMapService/GetAPI.aspx?key=xxxx](http://map.cht.com.tw/IntegratedMapService/GetAPI.aspx?key=xxxx)), setCenter (new CLatLng(X, Y), 9)), where map.cht.com.tw is the GIS Server's domain name, IntegratedMapService is the directory of the map service functions, and GetAPI.aspx?key=xxxx instructs the GIS Server to perform the authentication procedure with key xxxx. Function setCenter(new CLatLng(X, Y), 9) specifies the restaurant geographic coordinate (X, Y) translated from the restaurant name by the Media Server, and the radius 900 meters of the map to be retrieved. **Step 8**: If the request is authorized, the GIS Server copies the map picture and sends it back to the Media Server. **Step 9**: In parallel with Step 7, the Media Server replies the SIP 200 OK with the SDP (_i.e._, the negotiated audio and video formats) to the UE through the MMAS and the CSCF. **Step 10**: The UE sends the SIP ACK to the Media Server. **Step 11**: At this point, the RTP session is established, and the requested map is delivered from the Media Server to the UE through path (5)-(2)-(c)-(3) in Figure 1.
**Step 12**: Besides the RTP connection, the Media Server will also provide touch screen information to the UE. This information provides the grid location translation to _Dual Tone Multi-Frequency_ (DTMF) digits.