Hello all!

I'm trying to develop a service of user location using CPL in a networking architecture SIP. I'm not expert in CPL and for this reason I need help to correct a script for the xml code.
 
The service of intelligent user location has, such as final goal, to give the user the posibility of others users to localize him/her in different places depending of the hours during the day, for example, in the case Mary wants to be localized since 00:00:00 hours until 06:00:00 in the [EMAIL PROTECTED] location and since 18:00:00 until 12:00:00 in the [EMAIL PROTECTED] location.
 
The explanation of my design is as follow:
 
The first address-switch asks for the host where reside the service. If the domain is ITEC-telecom.com.co, to pass second address-switch, otherwise the call is reject.
 
The second address-switch asks for the user. If the user is Mary, the call reach to the first time switch, otherwise the call is reject.
 
The first time switch indicate that the user will be localized since the 00:00:00 hours until 6 hours after in the [EMAIL PROTECTED] location.
 
If  the local time is not accord with the time established in the time-switch, the call will reach the second time-switch.
 
The second time-switch indicate that the user will be localized since the 06:00:00 hours until 12:00:00 hours. If the local time is accord with this interval, the user will be localized in the [EMAIL PROTECTED] location, otherwise the call will be reject.
 
The proxy action signalling has three outputs. The busy and failure outputs correspond to the events: response 486 and 3xx respectively in the SIP protocol, the noanswer output go to a subaction called Mail, that contains a location node and a redirect action signalling.
 
The cpl diagram and the xml code with its respective dtd are attached.
 
I need to know if this design and if the xml code are right.
 
Thanks in advance
 
 
Katherine Morera Olarte
Research Division
ITEC-TELECOM
Bogot� Colombia

SERVICIO.zip

<!DOCTYPE cpl SYSTEM "cpl.dtd"> 
  <cpl>
  <subaction id="Mail">
   <location url="sip:[EMAIL PROTECTED]">
    <redirect/>
   </location>
  </subaction>
  <incoming>
   <address-switch field="To" subfield="host">
    <address subdomain-of="ITEC-telecom.com">
     <address-switch field="To" subfield="user">
      <address is="Mary">
       <time-switch tzid="America\Bogota">
        <time dtstart="20010309T000000" duration="PT6H" freq="daily">
         <location url="sip:[EMAIL PROTECTED]">
          <proxy timeout="15s">
           <busy/>
           <noanswer>
            <sub ref="Mail">
            </sub>
           </noanswer>
           <failure/>
          </proxy>
         </location>
        </time>
        <otherwise>
         <time-switch tzid="America\Bogota" >
          <time dtstart="20010309T000000" duration="PT6H" freq="daily">
           <location url="sip:[EMAIL PROTECTED]">
            <proxy timeout="15s">
	     <busy/>
	     <noanswer>
	      <sub ref="Mail">
	      </sub>
	     </noanswer>
	     <failure/>
            </proxy>
           </location>
          </time>        
          <otherwise>           
           <sub ref="Mail">
           </sub>
          </otherwise>
         </time-switch> 
        </otherwise>
       </time-switch>
      </address>
      <otherwise>
       <reject status="error"/>
      </otherwise>
     </address-switch>     
    </address>
    <otherwise>
     <reject status="reject"/>
    </otherwise>
   </address-switch>  
  </incoming>
 </cpl>
 
 

CPL2.dtd

Reply via email to