<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routes>
  <route mappingType="local">
    <routeFrom>${dollar}{SIPXCHANGE_DOMAIN_NAME}:${dollar}{PROXY_SERVER_SIP_PORT}</routeFrom>
    <routeFrom>${dollar}{MY_IP_ADDR}:${dollar}{PROXY_SERVER_SIP_PORT}</routeFrom>
    <routeFrom>${dollar}{MY_FULL_HOSTNAME}:${dollar}{PROXY_SERVER_SIP_PORT}</routeFrom>
    <routeFrom>${dollar}{MY_HOSTNAME}:${dollar}{PROXY_SERVER_SIP_PORT}</routeFrom>
#foreach ($route in ${routes})
    <routeFrom>$route</routeFrom>
#end	    

    <methodMatch>
      <methodPattern>SUBSCRIBE</methodPattern>

      <!-- Message waiting indication events -->
      <fieldMatch fieldName="Event">
        <fieldPattern>message-summary.*</fieldPattern>
        <!--this goes to the status server-->
        <routeTo>&lt;${dollar}{STATUS_SERVER_SIP_SRV_OR_HOSTPORT};transport=tcp&gt;</routeTo>
      </fieldMatch>

      <!-- All other SUBSCRIBE requests go to the SIP registry service -->
      <routeTo>&lt;${dollar}{REGISTRAR_SERVER_SIP_SRV_OR_HOSTPORT}&gt;</routeTo>

    </methodMatch>

    <!-- All other requests go to the SIP registry service -->
    <routeTo>&lt;${dollar}{REGISTRAR_SERVER_SIP_SRV_OR_HOSTPORT}&gt;</routeTo>

  </route>
</routes>
