<config>
    <!-- If an actual IPv6 address is needed for a URL use convention below:
         Enclose it with '[' and ']' as follows: http://[2001:4860:4860::8888]:80/target/path -->

    <!-- HTTP server name value from HTTP headers -->
    <http-server-name>AIS Streaming Server</http-server-name>

    <!-- Can add include sections anywhere in the file and the section will be replaced with included text before loading/validation -->
    <!-- Load will fail if a circular include is detected or if max include level is reached (maximum 10 includes may be chained) -->
    <!-- <include>/path/to/included/file</include> -->

    <!-- The public hostname for this server -->
    <!--<hostname>www.this-server-name.com</hostname>-->

    <!-- Network Time Server used to synchronise time between multiple server instances-->
    <network-time-server-url>pool.ntp.org</network-time-server-url>

    <!-- Purge the contents of the NFS directory (default true) -->
    <purge-nfs-on-startup>true</purge-nfs-on-startup>

    <!-- Enable ID3 detection in AAC HLS segments - at positions different then start -->
    <detect-instream-id3>false</detect-instream-id3>

    <!-- Create a separate ID3 tag for apple com.apple.streaming.transportStreamTimestamp -->
    <separate-id3-for-hls-privtag>true</separate-id3-for-hls-privtag>

    <!-- Boolean value enabling on the fly detection of the volume. Optional parameter, default value is false. When disabled, volume detection is done using the periodic detection of the stream's volume (as opposed to the on the fly detection) -->
    <enable-loudness-scanner>false</enable-loudness-scanner>

    <!-- default charset for received icy headers or pushed metadata to be converted from in monitoring pages and metadata connection -->
    <!-- Here we can have ISO8859-1 for example, when empty we consider everithing UTF-8 -->
    <!-- <input-charset></input-charset> -->

    <!-- Enable AAC key frame correction when transitioning from an ad back to stream -->
    <!-- <enable-keyframe-correction>false</enable-keyframe-correction> -->

    <!-- Enable cross site cookie usage, default value is false. See https://www.chromium.org/updates/same-site -->
    <!-- Please keep in mind that Secure tag will be added, this will make the browser to return the cookie only if the connection is secure (to ais or load balancer) -->
    <!-- <enable-cross-site-cookies>false</enable-cross-site-cookies> -->

    <!-- Use radio-id instead of mount name for ZC livestream mounts mapping-->
    <!-- <zc-match-livestreams-by-radio-id>false</zc-match-livestreams-by-radio-id> -->

    <limits>
        <!-- Number of threads used for keyframe correction, none if feature is disabled, (0) = number of cores otherwise  -->
        <!-- <keyframe-correction-threadpool-size>2</keyframe-correction-threadpool-size>     -->

        <!-- Number of threads reserved for relays; (0) = number of cores -->
        <relay-threadpool-size>2</relay-threadpool-size>

        <!-- Number of threads reserved for AD Server requests; (0) = number of cores -->
        <adserver-threadpool-size>2</adserver-threadpool-size>

        <!-- Number of threads reserved for AD Server reports; (0) = number of cores -->
        <!-- Threads will be created on first request for a podcast with cdn caching -->
        <statistics-threadpool-size>2</statistics-threadpool-size>

        <!-- Number of connections for sending reports to AD Server -->
        <statistics-connections>300</statistics-connections>

        <!-- Maximum number of sessions to be processed in a second when used under CDN; (0)= unlimited -->
        <!-- This is used in order not to flood the AD server with requests, to distribute them in time -->
        <!-- <maximum-cdn-sessions-processed-per-second>0</maximum-cdn-sessions-processed-per-second> -->

        <!-- Life time of chunks from NFS directory -->
        <nfs-files-lifetime-seconds>900</nfs-files-lifetime-seconds>

        <!-- Max metadata items returned on metadata request -->
        <max-metadata-count-per-listener>10</max-metadata-count-per-listener>

        <!-- Life time of an listener session after last request -->
        <!-- <session-timeout-seconds>45</session-timeout-seconds> -->

        <!-- Default value for the maximum number of connected listeners on a mount (can be overridden in mount config)-->
        <!-- <maximum-connected-clients-on-mount>50000</maximum-connected-clients-on-mount> -->

        <!-- Default value for the maximum duration of a session on a mount (can be overridden in mount config)-->
        <!-- <maximum-session-duration-seconds-on-mount>86400</maximum-session-duration-seconds-on-mount> -->

        <!-- Maximum number of connections for the authentication service (default is 100)-->
        <max-connections-authentication>100</max-connections-authentication>

        <!-- Specify the duration of burst in milliseconds when listener first connect  (can be overridden in mount config)-->
        <icy-burst-duration>10000</icy-burst-duration>

        <!-- Blacklist file used for blocking ips -->
        <!-- <blacklist-file>blacklist.txt</blacklist-file> -->

        <!-- Whitelist file for whitelisting IPs and user agents-->
        <!-- <whitelist-file>whitelist.txt</whitelist-file> -->

        <!-- XML file with podcast classification rules -->
        <podcast-classification-file>podcast-classification.xml</podcast-classification-file>

        <!-- Allow client SDK to report ads impressions-->
        <allow-client-side-reporting>false</allow-client-side-reporting>

        <!--Specify the maximum number of process files descriptors percentage to be used by cache files
            When this value is reached, AIS will start to unload cached files from memory -->

        <max-cache-files-descriptors-percentage>70</max-cache-files-descriptors-percentage>

        <!--Specify the global maximum number of process files descriptors percentage to be used
            When this level is reached AIS will not accept new incoming connections except ingest and monitoring-->

        <max-global-files-descriptors-percentage>95</max-global-files-descriptors-percentage>

        <!-- AIS is sending to AdServer the configured query-timeout-milliseconds value for an ad request.
             The value configured here is substracted from that before sending the value further and
             the purpose of it would be to compensate for any additional time needed due to netweork latency -->

        <!-- <query-latency-compensation-ms>250</query-latency-compensation-ms> -->

        <!-- Maximum allowed size of a HTTP request -->
        <!-- <max-http-request-size-bytes>10240</max-http-request-size-bytes> -->
    </limits>

    <authentication>
        <!-- All fields from this node support AWS Secrets Manager.
            For using with AWS Secrets Manager, add a secret in AWS and provide its
            name here with the following prefix: "ADW___AWS_SECRET_MANAGER:"
 	        Example, add source-pwd-secret in AWS and configure like this:
            <source-password>ADW___AWS_SECRET_MANAGER:source-pwd-secret</source-password> -->

        <!-- Global password used for push tools; Can be overwritten on mounts-->
        <source-password>hackme</source-password>

        <!-- Credentials used for monitoring pages-->
        <admin-user>admin</admin-user>
        <admin-password>hackme</admin-password>

        <!-- This password must be configured (only) in master server for enabling auto relay feature -->
    </authentication>

    <security>
        <!-- A list of certificates supported on all sockets, one entry for every domain or subdomain supported -->
        <!-- The certificate with empty domain ("") will be the default certificate if no other certificate matches, if this is missing, negotiation will fail if unsupported domain -->

        <!-- <ssl-certificate password="" domain="">defaultcert.pem</ssl-certificate> -->
        <!-- <ssl-certificate password="" domain="mydomain.com">mydomain.pem</ssl-certificate> -->
        <!-- <ssl-certificate password="" domain="subdomain.mydomain.com">mydomain.pem</ssl-certificate> -->

        <!-- If server is started as root, after opening listener port privileges can be dropped-->
        <!-- <changeowner>
            <user>ais</user>
            <group>ais</group>
        </changeowner> -->

        <!-- <ssl-trusted-certificates>/etc/ssl/certs/ca-certificates.crt</ssl-trusted-certificates> -->
        <!-- <ssl-trusted-certificates-path>/etc/ssl/certs</ssl-trusted-certificates-path> -->
        <!-- <enable-ssl-certificate-validation>true</enable-ssl-certificate-validation> -->
        <!-- Minimum allowed SSL version. If not specified, default is "TLS 1.2" (TLS 1.2 and TLS 1.3 allowed). Case insensitive. This is not hot swappable -->
        <!-- <ssl-minimum-version>TLS 1.0|TLS 1.1|TLS 1.2|TLS 1.3</ssl-minimum-version> -->
    </security>

    <!-- Optional configuration for uploading client reporting data -->
    <reporting-service>
        <!-- URL for uploading client reporting data -->
        <!-- <reporting-service-url></reporting-service-url> -->
        <!-- User and password for uploading client reporting data -->
        <!-- <reporting-service-user></reporting-service-user> -->
        <!-- <reporting-service-pwd></reporting-service-pwd> -->
        <!-- <compress-data>false</compress-data> -->
        <!-- <suppress-mount-details>false</suppress-mount-details> -->
        <!-- <suppress-group-details>false</suppress-group-details> -->
        <!-- Allowed values: PUT / POST / TCP -->
        <!-- <upload-method>PUT</upload-method> -->
        <!-- for metric format, we accept the following placeholders/tokens:
             {{Hostname}}, {{InstallationId}}, {{TLInstance}}, {{TimeSeconds}}, {{TimeMiliseconds}},
             {{TimeMicroseconds}}, {{TimeNanoseconds}}, {{MetricKey}}, {{MetricValue}}
             {{streamType}} - "podcast" or "stream" for that mount
             {{threadpool}} - name of the thread pool. Used by performance metrics
             {{zcMatch}} - name of the matching ZC configuration. "notMapped" if no match.
             {{domain}} - name of the virtual domain
             {{mount}} - name of the mount
             {{OriginUrl}}] - url of the origin
             Every token may define one(!) content sanitization method using a pipe character "|". Ex: {{mount|sanitizeMount}}. The following sanitization methods are supported:
             sanitize - replaces all "/" with SLSH, metric-key-separator with SPRTR, and characters that are not allowed by configuration(do not match <regex-allowed-chars>) with <replacement-for-forbidden-chars>(default empty string).
             sanitizeMount - if first '/' character is removed. Calls sanitize for the resulted string.
             sanitizeUrl - Removes leading "http://" or "https://". Calls sanitize for the resulted string.
             Optional tokens are included between [[ and ]]. If their value cannot be determined, or is not applicable for a given metric, they are removed from the output line of that metric.
             Ex: [[_{{streamType}}]] will be replaced with "_podcast" for a podcast mount, or removed if not applicable for a not applicable metric, like CPU usage.

             Tokens can appear in any combination, any order, but they cannot be duplicated. -->

        <!-- <metric-format>ais_server_{{MetricKey}}[[_{{streamType}}]][[_{{threadpool}}]][[_{{zcMatch|sanitize}}]][[_{{domain|sanitize}}]][[_{{mount|sanitizeMount}}]][[_{{OriginUrl|sanitizeUrl}}]][[_{{errorCode}}]] {{MetricValue}}</metric-format> -->
        <!-- The metric-key-separator is used for formating the MetricKey, for example if you set . as separator,
             the MetricKey would be threadpool.turnaround.utility, if you set _, it would be threadpool_turnaround_utility -->

        <!-- <metric-key-separator>_</metric-key-separator> -->
        <!-- <regex-allowed-chars>[a-zA-Z0-9_]</regex-allowed-chars> -->
        <!-- regex specifying the set of allowed chars for the metric key; Default is [a-zA-Z0-9_], meaning alfanumeric and '_' character -->
        <!-- <replacement-for-forbidden-chars></replacement-for-forbidden-chars> -->
        <!-- specifies the string used to replace forbidden character. Default is empty, meaning those characters will be deleted -->
    </reporting-service>

    <!-- Live streams service used for HLS and ICY protocol-->
    <live-stream-service>

        <!-- Default (0) - number of cores -->
        <live-stream-threadpool-size>0</live-stream-threadpool-size>

        <!-- Create HLS chunks by default for relayed streams -->
        <create-hls-chunks-for-relayed-streams>false</create-hls-chunks-for-relayed-streams>

        <!-- Interval to perform audio chunks synchronizations for ABR. Value 0 disables the feature -->
        <synch-audio-chunks-period-seconds>0</synch-audio-chunks-period-seconds>

        <!-- Default metadata interval used for ICY protocol. This value is the default value it is not specified for mount.
        For improving compatibility with legacy devices this should be changed  to 16000,
        but having it set to a lower value increases metadata precision.
        -->

        <icy-metadata-interval>1024</icy-metadata-interval>

        <!-- Split artist from title field when pushing metadata, this is integer:
                0 means dont split - this is the default
                1 means split
        -->

        <metadata-push-parse-method>0</metadata-push-parse-method>

        <!-- When sending data using FLV or RTMP send artist as separate field in metadata.
            Equivalent to TL_USE_UPDATED_METADATA_IMPL environmental variable.
            For backwards compatibility, if this config option is not present
                it will fallback to reading TL_USE_UPDATED_METADATA_IMPL.
            If env variable exists (and has value > 0) this will be set to true,
            otherwise this will be set to false.
        -->

        <send-separate-artist-flv-rtmp>false</send-separate-artist-flv-rtmp>

        <!-- Change the way RTMP metadata is mapped to ICY metadata, when input stream is RTMP format -->

        <!--<icy-format-of-rtmp-metadata>-->
        <!-- Format of data on ICY - each item enclosed by {} is an item inside RTMP Metadata -->
        <!--<text>StreamTitle='{artist} - {title} {url}'</text>-->

        <!-- Users can apply regexes to the attributes to change certain items -->
        <!-- Example: clean up the whole text if we have "Spot Block end" in it -->
        <!--<replace>-->

        <!-- Empty if it should apply to the whole string or RTMP parameter name if it should apply to one of the attributes -->
        <!--<input></input>-->

        <!-- Regex to match and replace -->
        <!--<regex>'.*(Spot Block End).*'</regex>-->

        <!-- Data to insert in place of matched regex -->
        <!--<output>'  - '</output>-->
        <!--</replace>-->
        <!--</icy-format-of-rtmp-metadata>-->

        <!-- Reconnect relay if last seen byte is more than specified value in milliseconds away -->
        <reconnect-relay-if-last-byte-more-than-ms>60000</reconnect-relay-if-last-byte-more-than-ms>

        <!-- Reconnect relay if slowness is bigger than specified value in milliseconds -->
        <reconnect-relay-if-slowness-more-than-ms>60000</reconnect-relay-if-slowness-more-than-ms>

        <!-- Multiple listen interfaces/ports can be configured -->
        <listen-socket>
            <port>8000</port>

            <!-- To bind to all IPv4/IPv6 interfaces use '::' as address instead of '0.0.0.0' -->
            <bind-address>0.0.0.0</bind-address>

            <!-- <require-hls-client-token>false</require-hls-client-token> -->

            <!-- <is-ssl>true</is-ssl> -->

            <!-- If this matches client request or is the default interface, apply settings found here. -->
            <!-- Matching is made on: SSL Hostname if provided or HTTP 'Host' header otherwise. -->
            <!-- To match a fixed domain without subdomains: "adswizz.com" -->
            <!-- To match a fixed domain and all subdomains: ".adswizz.com" -->
            <!-- <virtual-domain></virtual-domain> -->

            <!-- <maximum-connected-clients>0</maximum-connected-clients> -->
            <!-- <maximum-session-duration-seconds>0</maximum-session-duration-seconds> -->

            <!-- This option will set an HTTP cookie, AISSessionId with value session ID; Can be used for LB stickiness-->
            <!-- <set-session-cookie>false</set-session-cookie> -->

            <!-- This option will set an HTTP cookie, ListenerInfo with information used to restore session-->
            <!-- <set-session-information-cookie>true</set-session-information-cookie> -->

            <!-- Allow ICY listeners to reconnect in case of accidental disconnect -->
            <!-- When activated, the ICY session is kept for configured session timeout waiting for the listener to reconnect -->
            <!-- <keep-icy-sessions-alive>false</keep-icy-sessions-alive> -->

            <!-- This option will allow ICY listeners to fallback on another mount with an incompatible stream encoding -->
            <!-- WARNING: Setting this on 0, it may generate playback issues after listener was moved to fallback -->
            <check-encoding-compatibility-on-fallback>1</check-encoding-compatibility-on-fallback>

            <!-- The default mount name that will be used on this port in case it can't be identified from url request -->
            <!-- <default-mount>/Radio1</default-mount> -->

            <!-- <inactivity-timeout-ms>120000</inactivity-timeout-ms> -->
            <!-- Allowed range is (10000..60000) -->
            <!-- <receive-header-timeout-ms>15000</receive-header-timeout-ms> -->
            <!-- Allowed value is greater than 100 for low-speed-limit-bps. Allowed range is (10..60) for low-speed-time-seconds -->
            <!-- <write-timeout low-speed-limit-bps="100" low-speed-time-seconds="10" /> -->

            <!-- When set to true, response will be ICY 200 OK, instead of HTTP 200 OK, some devices needs this for compatibility with icecast -->
            <!-- <use-icy-response-proto>false</use-icy-response-proto> -->

            <!-- Custom configuration of HTTP response headers
                 For <add> tag we support code attribute which can be set to specific code (for example '200') or generic code ('2xx')
                 Multiple code values can be specified separated by space, example <add code='4xx 5xx'>error: 1</add>
                 Empty code or unspecified involves always adding the specified header
            -->

            <http-headers>
                <!-- <add>X_RadioName: Radio</add> -->

                <!-- If the client request contains "Origin" we are programatically setting Access-Control-Allow-Origin: ["Origin" value].
                     You can override it to Access-Control-Allow-Origin: *-->

                <!-- <add>Access-Control-Allow-Origin: *</add> -->
                <!--  Needed if the stream will be served from a website not on the same origin using CORS. For example, a minimum configuration for ICY would be: Access-Control-Allow-Headers: Content-Type, Icy-Metadata -->
                <!-- <add>Access-Control-Allow-Headers: *</add> -->

                <!-- This header is required for enabling CORS on second connection (give access to cookie)-->
                <!-- <add>P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI"</add> -->

                <!--If is  an aac file and the user agent contains "Chrome", ensure content type is audio/aac -->
                <!-- <add regex="GET.*\.aac.*User-Agent: [^\n].*Chrome.*">Content-Type: audio/aac</add> -->

                <!-- <remove>X-Header</remove> -->
            </http-headers>

            <!-- Enable HTTP 1.1 chunked transfer encoding -->
            <chunked-transfer-enabled>false</chunked-transfer-enabled>

            <proxy>
                <!-- The session will have this value stored in it; a different server (receiving this value) will know that the request is addressed to this server and it will act ast proxy. -->
                <!-- <proxy-address>localhost:8000</proxy-address> -->

                <!-- HTTP header used to mark proxy forwarded for IP ; This is not hot swappable -->
                <proxy-forward-http-header>X-Forwarded-For</proxy-forward-http-header>

                <!-- Enable proxy just for requests that does not contain listener information in cookie; This is not hot swappable -->
                <proxy-just-requests-without-session-cookie>true</proxy-just-requests-without-session-cookie>
                <!-- Handle requests locally when remote server is not reachable -->
                <!-- <proxy-adopt-requests>true</proxy-adopt-requests> -->
            </proxy>

            <!-- Send the sessionId back to the client in a user defined header -->
            <!-- <session-id-header>X-AIS-SessionID</session-id-header> -->
        </listen-socket>

        <!-- Static definition for master playlist -->
        <!-- <master-playlists>
            <master-playlist>
                <url>http://localhost:8000/1234/hls/64k/playlist.m3u8</url>

                <media-playlist>
                        <local-mount-playlist>/Radio1</local-mount-playlist>
                </media-playlist>

                <media-playlist>
                        <playlist-url>http://127.0.0.2:8010/RadioName/Storage1/playlist.m3u8</playlist-url>
                        <metadata>PROGRAM-ID=1,BANDWIDTH=65000,CODECS="mp4a.40.5"</metadata>
                </media-playlist>

            </master-playlist>
        </master-playlists> -->
    </live-stream-service>

    <!-- On Demand service used to deliver podcasts-->
    <audio-on-demand-service>

        <!-- Default (0) - number of cores -->
        <on-demand-threadpool-size>0</on-demand-threadpool-size>

        <!-- (0) = number of cores -->
        <audio-parsing-threadpool-size>3</audio-parsing-threadpool-size>

        <!-- Enhance protection for original file being overwriting while AIS is parsing it. Needed only if you use rsync (or similar tools). Only applies to local files. CPU intensive operation, use it only if you use rsync -->
        <protect-for-rewrite-during-parsing>false</protect-for-rewrite-during-parsing>

        <!-- If a session id is provided but a session with that id does not exists, a new session with a new session id is generated -->
        <!-- Set it to true if you want to create a session with provided id (this used to be the default behaviour in the past) -->
        <reuse-expired-session-ids>false</reuse-expired-session-ids>

        <!-- Multiple listen interfaces/ports can be configured -->
        <listen-socket>
            <port>8001</port>

            <!-- To bind to all IPv4/IPv6 interfaces use '::' as address instead of '0.0.0.0' -->
            <bind-address>0.0.0.0</bind-address>

            <!-- <is-ssl>true</is-ssl> -->

            <!-- <maximum-connected-clients>0</maximum-connected-clients> -->
            <!-- <maximum-session-duration-seconds>0</maximum-session-duration-seconds> -->

            <!-- This option will set an HTTP cookie AISSessionId with value session ID; Can be used for LB stickiness-->
            <!-- <set-session-cookie>false</set-session-cookie> -->

            <!-- Override cookie domain with provided value-->
            <!-- <session-cookie-domain></session-cookie-domain> -->

            <!-- ITunes and most of IOS podcast apps set X-Playback-Session-Id and does not follow http redirect ; Proxy does not work if this is enabled! -->
            <!-- <use-xplayback-sessionid>false</use-xplayback-sessionid> -->

            <!-- When active, the redirect url will contain a hash - eg for podcast.mp3, redirect url will
                 be podcast.mp3/{HASH}.mp3 (for example: podcast.mp3/1c300c421518d175dcac765a7847f83d.mp3) -->

            <!-- <cdn-caching-enabled>false</cdn-caching-enabled> -->

            <!-- This setting affects the way requests on the same session are handled simultaneously
                0 - only one request is handled, other are waiting for first request to complete (session is locked by the first one, default behaviour)
                1 - all requests are handled simultaneously
                4xx-5xx (number bigger than 400) - the number is interpreted as HTTP response code and the requests that comes
                    while the session is locked by another one will get this response code -->

            <!-- <allow-session-concurrent-requests>0</allow-session-concurrent-requests> -->

            <!-- When set, this value is used when composing podcast redirect url - when ais is generating the redirect,
                 the host from initial url will always be replaced by this value -->

            <!-- <cdn-domain-prefix></cdn-domain-prefix> -->

            <!-- Value is used when composing redirects to main domain. Used in cases where content has expired from AIS
                 Clients will ask AIS to regenerate content and continue playback on that
                 Value should be the main entry point, the prefix used for published podcasts -->

            <!-- <recreate-session-fallback-prefix></recreate-session-fallback-prefix> -->

            <!-- If enabled, sets "Cache-Control: max-age=<value>", if not set, default value configured on CDN is in effect -->
            <!-- <cdn-caching-max-age-seconds></<cdn-caching-max-age-seconds> -->

            <!-- set to true if you want streaming vs download classification -->
            <!-- <classify-podcast-listeners>false</classify-podcast-listeners>-->

            <!-- <inactivity-timeout-ms>120000</inactivity-timeout-ms> -->
            <!-- Allowed range is (10000..60000) -->
            <!-- <receive-header-timeout-ms>15000</receive-header-timeout-ms> -->
            <!-- Allowed value is greater than 100 for low-speed-limit-bps. Allowed range is (10..60) for low-speed-time-seconds -->
            <!-- <write-timeout low-speed-limit-bps="100" low-speed-time-seconds="10" /> -->

            <!-- Custom configuration of HTTP response headers
                 For <add> tag we support code attribute which can be set to specific code (for example '200') or generic code ('2xx')
                 Multiple code values can be specified separated by space, example <add code='4xx 5xx'>error: 1</add>
                 Empty code or unspecified involves always adding the specified header
            -->

            <http-headers>
                <add>Content-Disposition: attachment</add>
                <!-- Needed for CORS -->
                <!-- <add>Access-Control-Allow-Origin: *</add> -->
                <!-- <add>Access-Control-Allow-Headers: *</add> -->
                <!-- <remove>X-Header</remove> -->
            </http-headers>

            <proxy>
                <!-- will set the proxy address in cookie to this value -->
                <!-- <proxy-address>localhost:8001</proxy-address> -->

                <!-- HTTP header used to mark proxy forwarded for IP -->
                <proxy-forward-http-header>X-Forwarded-For</proxy-forward-http-header>

                <!-- Enable proxy just for requests without cookie information present -->
                <proxy-just-requests-without-session-cookie>true</proxy-just-requests-without-session-cookie>
            </proxy>
        </listen-socket>

        <origin>
            <!-- <url>http://127.0.0.1:80/podcaststorage</url> -->
            <!-- <timeout>10000</timeout> -->
            <!-- <origin-fallback>http://127.0.0.1:80/podcaststorage2</origin-fallback> -->
            <!-- <regex>.*</regex> -->
            <!-- <ping-interval-ms>60000</ping-interval-ms> -->

            <!-- Deliver the podcasts based on playlists instead of MP3 files. -->
            <!-- Effectively AIS will search for .lst files on the origin -->
            <!-- <is-podcast-playlist-source>false</is-podcast-playlist-source> -->

            <!-- When using playlist source ignore adbreak markers from ID3 metadata from files. That metadata is dropped -->
            <!-- This also enables the usage of tag #OUTPUT-FILE-ID3-METADATA in playlist file. This will force the final podcast metadata -->
            <!--        to be the one from the next file from this tag -->
            <!-- <ignore-markers-from-podcast-files>false</ignore-markers-from-podcast-files> -->
        </origin>

        <!-- Podcast caching functionality - stores the podcast in "chunks" generated based on insertion triggers -->
        <!-- When the feature is enabled, the amount of memory required for loading a podcast is reduced -->
        <podcast-caching>
            <!-- Boolean flag, hot swapable -->
            <enabled>0</enabled>

            <!-- local path to the location where podcast segments will be stored, needs to have RW rights -->
            <absolute-local-path></absolute-local-path>

            <!-- The cached data is split in multiple folders on two levels depth; the number of folders on each level will be equal with this value;
                 Default value is 5 which means 5 subfolders  on first level containing 5 subfolders each one -->

            <!-- <cache-subdirectories-number-per-level>5</cache-subdirectories-number-per-level> -->

            <!-- Maximum size occupied by podcast segments. Cache has FIFO policy on last access time. No upper limit. Lower limit must be at least two times RAM size.-->
            <max-size-mb>0</max-size-mb>

            <!-- time that a podcast segment lives on disk since last usage. Needs to be higher than session TTL -->
            <segment-timeout-seconds>86400</segment-timeout-seconds>

            <!-- Persistent sessions support - session information on disk in order to be able to re-load-it later without re-parsing the podcast -->
            <persistent-session>
                <!-- Boolean flag enabling/disabling (0/1), hot swapable -->
                <!-- <enabled>false</enabled> -->

                <!-- Configuration for external storage to use for persistent session information. -->
                <!-- <database> -->
                <!-- <namespace>test</namespace> -->
                <!-- <table>incomplete</table> -->
                <!-- <username></username> -->
                <!-- <password></password> -->
                <!-- <retries>3</retries> -->
                <!-- <timeout-ms>3000</timeout-ms> -->
                <!-- Declaration for Aerospike nodes. Recommended to declare multiple cluster nodes for redundancy. Up to 255 declarations can be provided  -->
                <!-- <server> -->
                <!-- <ip>127.0.0.1</ip> -->
                <!-- <port>3000</port> -->
                <!-- </server> -->
                <!-- </database> -->

                <!-- minimum/maximum time to keep persistent sessions. By default these are kept alive for 3 x duration of delivered content,
                     with minimum/maximum values enforced here. Range is 1 to 24 hours with recommendation of 1 to 6 hours -->

                <!-- <min-session-ttl-seconds>3600</min-session-ttl-seconds> -->
                <!-- <max-session-ttl-seconds>21600</max-session-ttl-seconds> -->
            </persistent-session>
        </podcast-caching>
        <!-- User agent regex for which we'll generate static sessions -->
        <!-- 
            <user-agent-with-static-session regex="iphone" maskIPv6InterfaceId="false"/>
            <user-agent-with-static-session regex="android" maskIPv6InterfaceId="false"/>
        -->

        <!-- By default, we will generate static sessions for all user agents -->
        <user-agent-with-static-session></user-agent-with-static-session>

        <!-- User agent string for which we'll not support range request -->
        <!--
            <deny-range-request-user-agent contains="Amazon CloudFront"/>
            <deny-range-request-user-agent contains="*"/>
        -->

        <!-- <remote-podcast-ping-interval-ms>60000</remote-podcast-ping-interval-ms> -->
        <!-- <remote-podcast-ping-interval-threadpool-size>10</remote-podcast-ping-interval-threadpool-size> -->
        <!-- Podcast API remote storage configuration; Default server will store output in NFS dir-->
        <push-podcast-api>
            <!-- <output-url-template>http://localhost:8001/{podcast-name}</output-url-template> -->

            <remote-storage>
                <!-- Possible values: S3, ftp, file-system-->
                <type>S3</type>

                <!-- Unique storage id-->
                <storage-id>S3-Storage1</storage-id>

                <!-- Folder name on storage-->
                <folder-name>Radio1</folder-name>

                <!-- Host of ftp or S3 storage-->
                <host>s3.amazonaws.com</host>

                <!-- Only for S3 enable https support -->
                <!-- <https>false</https> -->

                <!-- S3 storage credentials -->
                <!-- <s3-access-key>XXXXXXXXXXXXXXXX</s3-access-key> -->
                <!-- <s3-secret-key>XXXXXXXXXXXXXXXXXXXXXXXXX</s3-secret-key> -->

                <!-- FTP storage credentials -->
                <!-- <username>XXXXXXXX</username> -->
                <!-- <password>XXXXXXXX</password> -->
                <!-- <passive>true</passive> -->
                <!-- <ftp-enable-rfc1738>true</ftp-enable-rfc1738> -->
                <retry-count>2</retry-count>
                <timeout>1000</timeout>
            </remote-storage>
        </push-podcast-api>
    </audio-on-demand-service>

    <!-- Ingester service used to receive requests from RelayStreamer or other push tools-->
    <ingest-stream-service>
        <!-- (0) = number of cores -->
        <ingest-threadpool-size>1</ingest-threadpool-size>

        <!-- Create HLS chunks by default for ingested streams -->
        <create-hls-chunks-for-ingested-streams>false</create-hls-chunks-for-ingested-streams>

        <!-- Multiple listen interfaces/ports can be configured -->
        <listen-socket>
            <port>8003</port>

            <!-- To bind to all IPv4/IPv6 interfaces use '::' as address instead of '0.0.0.0' -->
            <!-- <bind-address>0.0.0.0</bind-address> -->

            <!-- <is-rtmp-push>false</is-rtmp-push>   -->
            <!-- <maximum-connected-clients>0</maximum-connected-clients> -->
            <!-- <maximum-session-duration-seconds>0</maximum-session-duration-seconds> -->

            <!-- <allow-metadata-push-on-relayed-mounts>false</allow-metadata-push-on-relayed-mounts> -->
            <!-- <allow-custom-metadata>true</allow-custom-metadata> -->

            <!-- <inactivity-timeout-ms>120000</inactivity-timeout-ms> -->
            <!-- Allowed range is (10000..60000) -->
            <!-- <receive-header-timeout-ms>15000</receive-header-timeout-ms> -->
            <!-- Allowed value is greater than 100 for low-speed-limit-bps. Allowed range is (10..60) for low-speed-time-seconds -->
            <!-- <write-timeout low-speed-limit-bps="100" low-speed-time-seconds="10" /> -->
        </listen-socket>

        <!--Non-authenticated RTMP Live App - allows publishing to mounts specified in <allowed-mount> list and anything that matches regex: <allowed-mounts-regex>-->
        <!--
            <rtmp-app>
            <app-name>live</app-name>
            <allowed-mounts-regex>public.*</allowed-mounts-regex>
            <allowed-mount>livestream</allowed-mount>
            </rtmp-app>
        -->

        <!--Authenticated app - allows acces only via username/password combination.
            Once authenticated users can publish to any mount specified in <allowed-mount> list and anything that matches regex: <allowed-mounts-regex>-->

        <!--
            <rtmp-app>
            <app-name>liveAuth</app-name>
            <user>admin</user>
            <pass>hackme</pass>
            <allowed-mounts-regex>secureStream.*</allowed-mounts-regex>
            <allowed-mount>secure1</allowed-mount>
            <allowed-mount>secure2</allowed-mount>
            <allowed-mount>secure3</allowed-mount>
            <allowed-mount>secure4</allowed-mount>
            </rtmp-app>
        -->
    </ingest-stream-service>

    <!-- Monitoring service used to handle monitoring pages requests-->
    <monitoring-service>

        <!-- Default (0) - number of cores -->
        <monitoring-threadpool-size>1</monitoring-threadpool-size>

        <!-- Interval to refresh monitoring data. Value 0 disable monitoring -->
        <monitoring-period-seconds>360</monitoring-period-seconds>

        <!-- Multiple listen interfaces/ports can be configured -->
        <listen-socket>
            <port>8002</port>

            <!-- To bind to all IPv4/IPv6 interfaces use '::' as address instead of '0.0.0.0' -->
            <bind-address>0.0.0.0</bind-address>

            <!-- <is-ssl>true</is-ssl> -->

            <!-- <maximum-connected-clients>0</maximum-connected-clients> -->
            <!-- <maximum-session-duration-seconds>0</maximum-session-duration-seconds> -->

            <!-- <inactivity-timeout-ms>120000</inactivity-timeout-ms> -->
            <!-- Allowed range is (10000..60000) -->
            <!-- <receive-header-timeout-ms>15000</receive-header-timeout-ms> -->
            <!-- Allowed value is greater than 100 for low-speed-limit-bps. Allowed range is (10..60) for low-speed-time-seconds -->
            <!-- <write-timeout low-speed-limit-bps="100" low-speed-time-seconds="10" /> -->
        </listen-socket>
    </monitoring-service>

    <logging>
        <!-- for session/access logs - can use {domain} to split files per virtual domains -->
        <sessionlog>session_%Y-%m-%d_%H__pid_{pid}.log</sessionlog>
        <errorlog>tl.{instance}/tl_%Y-%m-%d_%H__pid_{pid}.log</errorlog>
        <!-- <playlog>play_%Y-%m-%d_%H__pid_{pid}.log</playlog> -->

        <!-- if configured, additional log information needed by bogus traffic detector is generated -->
        <!-- <btdlog>btd.{instance}/btd_%Y-%m-%d_%H__pid_{pid}.log</btdlog> -->

        <loglevel>3</loglevel>

        <!-- <accesslog>access_%Y-%m-%d_%H-%M-%S_pid_{pid}.log</accesslog> -->

        <!-- Syslog configuration for access log and tl log -->
        <syslog>
            <!-- <hostname>localhost</hostname> -->
            <!-- <port>514</port> -->
            <!-- <filter>ACCESS</filter> -->
        </syslog>
        <syslog>
            <!-- <hostname>localhost</hostname> -->
            <!-- <port>515</port> -->
            <!-- <filter>ERROR|WARNING|MONITOR|VERIFY|LOGIC</filter> -->
        </syslog>
    </logging>

    <!-- Edge server should contain these configuration for auto relay -->
    <!-- edge-request-protocols is a comma separated list of protocols. Possible values for each protocol: ICY, FLV-ICY, HLS, E-HLS -->

    <!-- <auto-relay>
        <act-as-relay>false</act-as-relay>
        <edge-request-protocols>theProtocolsList</edge-request-protocols>
        <master-server>
            <master>
                <primary>false</primary>
                <dns>dns here</dns>
                <url>http://url path here</url>
                <master-password>hackme</master-password>
            </master>
            <master>
                <primary>false</primary>
                <dns>dns here</dns>
                <url>http://url path here</url>
                <master-password>hackme</master-password>
            </master>
        </master-server>
        <master-server>
            <master>
                <primary>false</primary>
                <dns>dns here</dns>
                <url>http://url path here</url>
                <master-password>hackme</master-password>
            </master>
            <master>
                <primary>false</primary>
                <dns>dns here</dns>
                <url>http://url path here</url>
                <master-password>hackme</master-password>
            </master>
        </master-server>
    </auto-relay>-->

    <!-- <yellow-pages-information>

        <shoutcast-v2-key>xxxxxxxxxx</shoutcast-v2-key>
        <yp-bind-address>127.0.0.1</yp-bind-address>

        <directory>
            <protocol>icecast</protocol>
            <send-timeout-seconds>3</send-timeout-seconds>
            <delay-between-connects-minutes>60</delay-between-connects-minutes>
            <url>http://dir.xiph.org/cgi-bin/yp-cgi</url>
            <hostname>http://127.0.0.1:8000</hostname>
            <user-agent>yp</user-agent>
        </directory>
        <directory>
            <protocol>shoutcast-v1</protocol>
            <send-timeout-seconds>3</send-timeout-seconds>
            <delay-between-connects-minutes>60</delay-between-connects-minutes>
            <url>http://yp.shoutcast.com</url>
            <user-agent>yp</user-agent>
        </directory>
        <directory>
            <protocol>shoutcast-v2</protocol>
            <send-timeout-seconds>3</send-timeout-seconds>
            <delay-between-connects-minutes>60</delay-between-connects-minutes>
            <url>http://yp.shoutcast.com</url>
            <port>8000</port>
            <user-agent>yp</user-agent>
        </directory>
    </yellow-pages-information> -->

    <mount>
        <local-mount>/Radio1</local-mount>

        <!-- Used to group multiple mount with the same audio content -->
        <radio-id>RadioName</radio-id>

        <!-- Fallback mount configuration-->
        <!-- <fallback>/Radio2</fallback> -->

        <!-- If original mount is up again after fallback move listeners back-->
        <!-- <move-back-to-original-mount>true</move-back-to-original-mount> -->

        <!-- User for this mount -->
        <!-- <source-user>source</source-user> -->
        <!-- Source password (override the global source-password) -->
        <!-- <source-password>hackme</source-password> -->

        <!-- Maximum number of connected clients on this mount-->
        <!-- <maximum-connected-clients>0</maximum-connected-clients> -->

        <!-- Maximum duration of a session in seconds for this mount-->
        <!-- <maximum-session-duration-seconds>86400</maximum-session-duration-seconds> -->

        <!-- Timeout of internal audio buffer in milliseconds after relay is disconnected; If this value is commented, internal buffer never expires -->
        <!-- <input-buffer-timeout>20000</input-buffer-timeout> -->

        <!-- Send socket buffer size (in bytes) -->
        <!-- <send-buffer-size>65536</send-buffer-size> -->

        <!-- Maximum amount of audio duration needed to be sent once to a listener -->
        <!-- <max-audio-duration-send-once-milliseconds>1000</max-audio-duration-send-once-milliseconds> -->

        <!-- Used for activating stream authentication -->
        <!-- Timeout value should be between 100 and 5000 ms -->
        <!-- Url type authentication is always forced before the augmenter type. It doesn't matter the order specified here -->
        <!-- reauth_period is used for listener_add. If present, specifies(in seconds) the period when authentication is needed again. Range: 180-600 seconds -->
        <!-- <authentication type="url">  -->
        <!--     <option name="mount_add" value="https://sample-auth.com:4443/stream_start"/> -->
        <!--     <option name="mount_remove" value="https://sample-auth.com:4443/stream_end"/> -->
        <!--     <option name="listener_add" value="https://sample-auth.com:4443/listener_joined?geoip_allow=true&geoip_country_list=us"/> -->
        <!--     <option name="reauth_period" value=300"/> -->
        <!--     <option name="listener_remove" value="https://sample-auth.com:4443/listener_left"/> -->
        <!--     <option name="auth_header" value="icecast-auth-user: 1"/> -->
        <!--     <option name="timelimit_header" value="icecast-auth-timelimit:"/> -->
        <!--     <option name="headers" value=""/> -->
        <!--     <option name="header_prefix" value=""/> -->
        <!--     <option name="stream_auth" value=""/> -->
        <!--     <option name="timeout" value="5000"/> -->
        <!--     <option name="stream_auth_timeout" value="100"/> -->
        <!--     <option name="presume_innocent" value="no"/> -->
        <!--     <redirect-on-error-code value="408" mount="/Radio2" /> -->
        <!--     boolean yes/no or 0/1, applies only for listener_add and stream_auth -->
        <!--     <option name="send_client_url" value="yes"/>  -->
        <!-- </authentication> -->

        <!-- Used for activating augmenter authentication -->
        <!-- Timeout value should be between 100 and 5000 ms -->
        <!-- <authentication type="augmenter">
            <option name="listener_add" value="https://sample-auth.com:4443/listener_joined?geoip_allow=true&geoip_country_list=us"/>
            <option name="timeout" value="5000"/>
            <augument-on-listener-add-response regex=".*" mount="/Radio2" />
            <option name="send_client_url" value="no"/>
        </authentication> -->

        <chunked-stream>
            <!-- HLS Configuration-->
            <hls>
                <!-- Enable or disable chunking of input stream-->
                <enable-hls>false</enable-hls>

                <!-- Generate TS chunks; Can be requested with type=.ts playlist URL argument-->
                <create-mpeg-ts-chunks>false</create-mpeg-ts-chunks>

                <!-- Playlist configuration should be present on Edge config.xml-->
                <playlist-min-chunks>3</playlist-min-chunks>
                <enable-playlist-custom-metadata>false</enable-playlist-custom-metadata>
                <enable-playlist-custom-ads-metadata>false</enable-playlist-custom-ads-metadata>
                <!-- all  	    Add EXT-X-PROGRAM-DATE-TIME for every chunk
		     one/true/1     Add EXT-X-PROGRAM-DATE-TIME only for the first chunk
		     none/false/0   No chunk will have EXT-X-PROGRAM-DATE-TIME-->

                <enable-date-range-metadata>false</enable-date-range-metadata>

                <!-- Add EXT-X-DISCONTINUITY in HLS playlist before and after adbreak-->
                <!-- <enable-discontinuity-tag>false</enable-discontinuity-tag> -->

                <!-- This should be set on true in case of ABR -->
                <!-- <keep-listener-at-real-time>false</keep-listener-at-real-time> -->

                <!-- HLS media-playlist configuration -->
                <!--  <media-playlist>
                    <playlist-url>http://127.0.0.1:8000/RadioName/Storage1/playlist.m3u8</playlist-url>
                    <chunk-url>http://{active_relay_hostname}/Radio1/{chunk_name}</chunk-url>
                </media-playlist> -->

                <!--  <media-playlist>
                    <playlist-url>http://127.0.0.1:8000/RadioName/Storage1/playlist.m3u8</playlist-url>
                    <chunk-url>http://{active_relay_hostname}/Radio1/{chunk_name}</chunk-url>
                    <ad-chunk-url>http://deliveryengine.releases27.adswizz.com/{chunk_name}</ad-chunk-url>
                </media-playlist> -->

                <!-- <media-playlist>
                    <playlist-url>http://127.0.0.2:8000/RadioName/Storage2/playlist.m3u8</playlist-url>
                    <metadata>PROGRAM-ID=1,BANDWIDTH=65000,CODECS="mp4a.40.5"</metadata>
                </media-playlist> -->

                <!-- Media playlists configured in a <mount> may use the {domain} and {mount} placeholders -->
                <!-- The placeholders are available for playlist-url, chunk-url and ad-chunk-url -->
                <!--  <media-playlist>
                    <playlist-url>/{domain}/{mount}/playlist.m3u8</playlist-url>
                    <chunk-url>http://{active_relay_hostname}/{mount}/{chunk_name}</chunk-url>
                    <ad-chunk-url>http://deliveryengine.releases27.adswizz.com/{chunk_name}</ad-chunk-url>
                </media-playlist> -->

                <!-- If present, this will enable HLS Encryption when creating chunks
                     Type: NONE, AES-128
                     Url: URL that players can request key from. This will authorize players and, if succesful, return a 16 byte binary key in 200 OK.
                     Key/IV: 20 byte hex string (either 0x... or just the bytes)  -->

                <!-- <encryption>
                       <type>AES-128</type>
                       <url>http://mystreamingserver.com/key.bin</url>
                       <key>831B0C43C232D66CF2258F4075DBB5A1</key>
                       <iv>0x3fd2f35d33b0a2045b6fa289030b7136</iv>
                    </encryption> -->
            </hls>

            <!-- DASH Configuration-->
            <dash>
                <enable-dash>false</enable-dash>
                <playlist-min-chunks>6</playlist-min-chunks>
                <chunk-base-url>http://cdn.example.com/chunks/</chunk-base-url>
                <enable-mp4-metadata>false</enable-mp4-metadata>
                <!-- when dashfmt=elementary is used, metadatas are sent in manifest -->
                <enable-manifest-metadata>1</enable-manifest-metadata>
                <!-- create also elementary audio chunks -->
                <enable-elementary-audio-chunks>0</enable-elementary-audio-chunks>
            </dash>

            <!-- Chunking configuration should be present on Master config.xml-->
            <chunk-duration-in-milliseconds>5000</chunk-duration-in-milliseconds>

            <!-- Split chunks at each metadata received -->
            <!-- If this is set to true the the "metadata-min-interval-cut-during-adbreak-ms" option is ignored-->
            <!-- <split-chunks-at-each-metadata>false</split-chunks-at-each-metadata> -->

            <!-- During adbreaks chunks are created at each metadata transition -->
            <!-- Do not cut chunks at metadata transitions that are closer to each other than this interval (in milliseconds)-->
            <!-- <metadata-min-interval-cut-during-adbreak-ms>1000</metadata-min-interval-cut-during-adbreak-ms> -->

            <enable-chunk-metadata>true</enable-chunk-metadata>

            <!-- Set the max usage time for a metadata. By default a metadata is set to all subsequent chunks until a new one is received. -->
            <!-- Setting here a value greather than 0 will limit the usage of the metadata only for chunks within this time interval -->
            <!-- <chunk-metadata-max-age-seconds>0</chunk-metadata-max-age-seconds> -->

            <!-- Enable transportStreamTimestamp priv tag.
                 WARNING: For backwards compatibility with already encoded ads please contact Adswizz -->

            <enable-audiochunk-priv-tag>false</enable-audiochunk-priv-tag>

            <!-- Enable	only if the relay is an HLS server and chunks contain transportStreamTimestamp priv tag.-->
            <!--chunk-synch-by-origin-data>false</chunk-synch-by-origin-data-->

            <!-- Synchronization of chunks created by multiple servers; configuration should be present on Master config.xml-->
            <chunk-synch-by-rare-event>true</chunk-synch-by-rare-event>
            <chunk-synch-by-metadata>false</chunk-synch-by-metadata>

            <!-- Synchronize chunks for mounts with the same audio data at different bitrates!-->
            <chunk-synch-by-audio-data>false</chunk-synch-by-audio-data>

            <!-- Definition of HLS storages for HLS enabled mounts; One default storage is configured in NFS folder -->
            <storage>
                <!-- Possible values: S3, ftp, file-system-->
                <type>S3</type>

                <!-- Unique storage id-->
                <storage-id>S3-Storage1</storage-id>

                <!-- Folder name on storage-->
                <folder-name>Radio1</folder-name>

                <!-- Host of ftp or S3 storage-->
                <host>s3.amazonaws.com</host>

                <!-- Only for S3 enable https support -->
                <!-- <https>false</https> -->

                <!-- S3 storage credentials -->
                <!-- <s3-access-key>XXXXXXXXXXXXXXXX</s3-access-key> -->
                <!-- <s3-secret-key>XXXXXXXXXXXXXXXXXXXXXXXXX</s3-secret-key> -->

                <!-- FTP storage credentials -->
                <!-- <username>XXXXXXXX</username> -->
                <!-- <password>XXXXXXXX</password> -->
                <!-- <passive>true</passive> -->
                <!-- <ftp-enable-rfc1738>true</ftp-enable-rfc1738> -->
                <retry-count>2</retry-count>
                <timeout>1000</timeout>
            </storage>
        </chunked-stream>

        <!-- ICY Configuration - fields that are sent in HTTP response header on ICY protocol -->
        <icy>
            <!-- the station name -->
            <!-- <icy-name></icy-name> -->

            <!-- the station description -->
            <!-- <icy-description></icy-description> -->

            <!-- the station genre -->
            <!-- <icy-genre></icy-genre> -->

            <!-- the station url -->
            <!-- <icy-url></icy-url> -->

            <!-- The metadata interval used for this mount
                 For improving compatibility with legacy devices this should be changed  to 16000,
                 but having it set to a lower value increases metadata precision -->

            <!-- <icy-metadata-interval>1024</icy-metadata-interval> -->

            <!-- Specify the duration of burst in milliseconds when listener first connect -->
            <!-- <icy-burst-duration>10000</icy-burst-duration> -->

            <!-- Specify stream bitrate -->
            <!-- <icy-bitrate>32000</icy-bitrate> -->
        </icy>

        <relay>
            <!-- <dns>127.0.0.1</dns> -->

            <!-- Encrypted HLS notes:
                 - supported ciphers: AES-128. SAMPLE-AES
                 - Key URLs are requested with 'User agent: AIS VirtualListener'.
                 - Remote server must authorize AIS and provide key. This can be done using server's IP, user-agent or parameters in relayed URL.
             -->

            <!-- <url>http://127.0.0.1:8001/mount/playlist.m3u8</url> -->
            <!-- <url>http://127.0.0.1:8001/mount.mp3</url> -->

            <!-- Relay socket timeout in seconds -->
            <!-- <timeout>30</timeout> -->

            <!-- Edge server should contain extended-hls tag -->
            <!-- <extended-hls>1</extended-hls> -->

            <!-- Icy relay between AIS servers should be done with flv wrapping on true -->
            <!-- <flv-wrapping>1</flv-wrapping> -->

            <!-- Activate relay for this stream just when there are listeners requesting it-->
            <!-- <on-demand>false</on-demand> -->

            <!-- Reuse existing chunks and preserve their timestamps -->
            <!-- <reuse-original-chunks>false</reuse-original-chunks> -->

            <!-- Specify the duration of source unavailability after which existing chunks are discarded. Only available if reusing original chunks -->
            <!-- <restart-mount-on-disconnect-limit-seconds>1200</restart-mount-on-disconnect-limit-seconds-chunks> -->

            <!-- <master>
                <dns>127.0.0.1</dns>
                <url>http://127.0.0.1:8001/mount/playlist.m3u8</url>
            </master> -->

            <!-- <master>
                <dns>127.0.0.1</dns>
                <url>http://127.0.0.2:8002/mount/playlist.m3u8</url>
            </master> -->

            <!-- <master>
                <url>http://127.0.0.2:8001/mount.mp3</url>
            </master> -->

            <!-- <master>
                <url>http://127.0.0.2:8002/mount.mp3</url>
                </master> -->

            <!-- If <url> tag is missing, following section can be used to define remote target
                 <server>127.0.0.1</server>
                 <port>8010</port>
                 <mount>/livestream</mount>
                 <protocol>rtmp</protocol>
                 <rtmp-application>live</rtmp-application>
            -->
        </relay>

        <!-- <yellow-pages-information>
            <icecast-cluster-password>abc123</icecast-cluster-password>
            <shoutcast-v2-auth-hash>auth_hash</shoutcast-v2-auth-hash>
            <shoutcast-v1-cluster-address>127.0.0.1:18000</shoutcast-v1-cluster-address>
            <public>false</public>
        </yellow-pages-information> -->

        <!-- Autorelay mount configuration -->
        <!-- <auto-relay-config> -->

        <!-- Define the relay protocol that will be used by edge servers; Possible values: ICY, FLV-ICY, HLS, E-HLS -->
        <!-- <export-as>ICY</export-as> -->

        <!-- Specifies if Edge server should expport this mount as active relay -->
        <!-- <use-active-relay>false</use-active-relay> -->

        <!-- This section is send to edge in order to configure this mount on edge side -->
        <!-- This section can contain all options from mount configuration -->
        <!-- <mount-config> -->
        <!-- <input-buffer-timeout>29000</input-buffer-timeout> -->
        <!-- </mount-config> -->
        <!-- </auto-relay-config> -->

        <!-- default charset for received icy headers or pushed metadata to be converted from in monitoring pages and metadata connection -->
        <!-- <input-charset></<input-charset> -->
    </mount>

    <!-- Use this section if you want a catch-all configuration for mounts.
           Matching is made based on regex given in <local-mount>.
           <local-mount> in this section is a regular expression with capturing groups used to extract variables

           If a mount name matches regex placed in this element:
           - 9 variables are generated based on capturing groups: regex1, regex2, ... regex9
           - 1 special variable will hold full mount name: regex0
           - captured variables are replaced in xml element.
           - XML element generated after steps above is used as configuration for created mount.

           Matching is done in the order which elements were defined. (Server attempts to match regex on first, default-mount, if it does not match, then it moves to the second and so on)

           Each section needs to have a name which is used internally as identifier for this kind of section.

           Notes:
           - Any special XML characters need to be escaped before usage in regex below.
           - <relay> section is ignored.
           - any other option present on a mount can be defined here and regex variables placed as needed.


           Example provided below extracts 2 variables and uses them in config.
           If a push is made against mount name: "/live_hls_true_chunkDuration_1234" then config for this mount will have:
           - enable-hls:                      true
           - chunk-duration-in-milliseconds:  1234
           - folder-name:                     /live_hls_true_chunkDuration_1234
      -->

    <!--
      <default-mount>
         <name>live hls streams</name>
         <local-mount>/live_hls_(.*)_chunkDuration_(.*)</local-mount>
         <chunked-stream>
           <hls>
             <enable-hls>regex1</enable-hls>
           </hls>
           <chunk-duration-in-milliseconds>regex2</chunk-duration-in-milliseconds>
           <enable-chunk-metadata>false</enable-chunk-metadata>
           <chunk-synch-by-rare-event>true</chunk-synch-by-rare-event>
           <chunk-synch-by-metadata>false</chunk-synch-by-metadata>
           <chunk-synch-by-audio-data>false</chunk-synch-by-audio-data>

        <storage>
          <type>S3</type>
          <storage-id>S3-Storage5</storage-id>
          <folder-name>regex0</folder-name>
          <host>s3.amazonaws.com</host>
          <retry-count>2</retry-count>
          <timeout>1000</timeout>

          <s3-access-key>XXXXXXXXXXXXXXXX</s3-access-key>
          <s3-secret-key>XXXXXXXXXXXXXXXXXXXXXXXXX</s3-secret-key>
        </storage>

         </chunked-stream>
      </default-mount>
      -->

    <!-- When no ad is inserted in the podcast, the listener will be redirected to this url (cheaper delivery option)
             The url can be configured as //127.0.0.1, in which case the protocol will be extracted from the client request-->

    <!-- <no-ads-redirect-url>http://127.0.0.1:80/podcaststorage</no-ads-redirect-url>
    </default-mount> -->

    <!-- <default-mount> -->
    <!-- <local-mount>/podcast_RAD_(.*)</local-mount> -->

    <!-- <remote-audio-data> -->
    <!-- <adbreaks> -->
    <!-- enables events insertion in ad breaks -->
    <!-- <enable>false</enable> -->
    <!--prefix for inserted events names -->
    <!-- <prefix>ais-generated</prefix> -->
    <!-- </adbreaks> -->

    <!-- <auto-generate> -->
    <!-- enables generation or RAD metadata based on the following configuration -->
    <!-- <enable>false</enable> -->
    <!-- <overwrite-existing-rad>false</overwrite-existing-rad> -->
    <!-- <trackingUrls> -->
    <!-- at least one tracking URL must be provided -->
    <!-- <trackingUrl>http://www.sample.com</trackingUrl> -->
    <!-- </trackingUrls> -->

    <!-- <events> -->
    <!-- <event label="myLabel" position="+1s"> -->
    <!-- label and position are mandatory attributes!
                        position is absolute (ends with "s") or relative (ends with "%").
                        Measured from the start(begins with "+") or the end (begins with "-")
                        Additional event properties are added as nodes.
                        Nodes are defined by label and value mandatory attributes. The optional "source" attribute
                        specifies how to interpret the value. Can be "uri-regex" or "static". Default is static.
                        Some examples below:
                        <node label="podcastID" value="awCollectionId=(\d+)" source="uri-regex"/>
                        <node label="episodeID" value="awEpisodeId=(\d+)" source="uri-regex"/>
                        <node label="channel" value="5" source="static"/>
                        <node label="channel" value="5" /> -->

    <!-- <event> -->

    <!-- examples -->
    <!--
                    <event label="start" position="+0s"/>
                    <event label="quarter" position="+25%">
                        <node label="episodeID" value="episodeID=(\d+)" source="uri-regex"/>
                    </event>
                    <event label="middle" position="+50%"/>
                    <event label="threeQuarters" position="-25%"/>
                    <event label="end" position="-1s"/>
                    -->

    <!-- </events> -->
    <!--
                Additional RAD properties are added as nodes.
                Nodes are defined by label and value mandatory attributes. The optional "source" attribute
                specifies how to interpret the value. Can be "uri-regex" or "static". Default is static.
                Some examples below:
                <node label="podcastID" value="awCollectionId=(\d+)" source="uri-regex"/>
                <node label="episodeID" value="awEpisodeId=(\d+)" source="uri-regex"/>
                <node label="channel" value="5" source="static"/>
                <node label="channel" value="5" />
                -->

    <!-- </auto-generate> -->
    <!-- </remote-audio-data> -->
    <!-- </default-mount> -->

    <!-- Aliases definition - source = alias, dest = real mount -->
    <!-- <aliases>
        <alias source="/Radio1_alias" dest="/Radio1"/>
    </aliases> -->

    <!-- mount group definitions => enables access limit per group of mounts

    format: <mount-group name="sampleName" type="regex|radio-id|list" max-listeners=6666>value</mount-group>
    Details:
    The type attribute cand be one of the following: regex, radio-id or list

    Examples:
    <mount-group name="group1" type="regex" max-listeners="33333">TheObserver.*</mount-group>
    <mount-group name="group2" type="list" max-listeners="33333">/mount1,/mount2</mount-group>
    <mount-group name="group3" type="radio-id" max-listeners="33333">testRadioId</mount-group>
    -->

    <!-- sample virtual domain definition
    Resources per virtual domain:
        String name;
        Container mounts;
        Container defaultMounts;
        AISConfig::OriginServer::Container originServers;
        Aliases aliases;
        Container audioOnDemandInterface;
        Container liveStreamInterface;
        Container ingestInterface;
        YellowPagesInformation yellowPagesInformation;
        Container mountGroups;

        The rules of definition are the same as per global/default domain.
        It is not possible to define services, only a subset of the defined services. See bellow: 
        live-stream-service => define additional <listen-socket> and <master-playlists> for that virtual domain
        audio-on-demand-service => define additional <listen-socket> and <origin> for that virtual domain
        ingest-stream-service => define additional <listen-socket> for that virtual domain
    -->

    <!-- <virtual-domain>
        <name>x1.test.com</name>
        <live-stream-service>
            <listen-socket>
                <port>18000</port>
                <maximum-connected-clients>0</maximum-connected-clients>
                <bind-address>0.0.0.0</bind-address>
                <is-ssl>0</is-ssl>
            </listen-socket>
            <listen-socket>
                <port>8000</port>
                <maximum-connected-clients>0</maximum-connected-clients>
                <bind-address>0.0.0.0</bind-address>
                <is-ssl>0</is-ssl>
            </listen-socket>
            <master-playlists>
                <master-playlist>
                    <url>http://localhost:8000/1234/hls/64k/playlist.m3u8</url>
                    <media-playlist>
                            <local-mount-playlist>/Radio1</local-mount-playlist>
                    </media-playlist>
                    <media-playlist>
                            <playlist-url>http://127.0.0.2:8010/RadioName/Storage1/playlist.m3u8</playlist-url>
                            <metadata>PROGRAM-ID=1,BANDWIDTH=65000,CODECS="mp4a.40.5"</metadata>
                    </media-playlist>
                </master-playlist>
            </master-playlists>
        </live-stream-service>
        <audio-on-demand-service>
            <listen-socket>
                <port>18001</port>
                <maximum-connected-clients>0</maximum-connected-clients>
                <bind-address>0.0.0.0</bind-address>
                <is-ssl>0</is-ssl>
            </listen-socket>
            <origin>
                <url>http://sampleorigin.com/playlists/</url>
                <timeout>10000</timeout>
                <origin-fallback>http://sampleorigin-fallback.com</origin-fallback>
                <is-podcast-playlist-source>true</is-podcast-playlist-source>
                <ignore-markers-from-podcast-files>false</ignore-markers-from-podcast-files>
            </origin>
        </audio-on-demand-service>
        <ingest-stream-service>
            <listen-socket>
                <port>18003</port>
                <maximum-connected-clients>0</maximum-connected-clients>
                <is-rtmp-push>true</is-rtmp-push>
                <bind-address>0.0.0.0</bind-address>
                <is-ssl>0</is-ssl>
            </listen-socket>
        </ingest-stream-service>
        <mount>
            <local-mount>/sampleMount</local-mount>
            <radio-id>test</radio-id>
            <input-buffer-timeout>10000</input-buffer-timeout>
            <move-back-to-original-mount>true</move-back-to-original-mount>
            <chunked-stream>
                <hls>
                    <enable-discontinuity-tag>true</enable-discontinuity-tag>
                    <create-mpeg-ts-chunks>1</create-mpeg-ts-chunks>
                    <keep-listener-at-real-time>true</keep-listener-at-real-time>
                    <enable-hls>true</enable-hls>
                </hls>
                <enable-audiochunk-priv-tag>true</enable-audiochunk-priv-tag>
                <chunk-synch-by-rare-event>true</chunk-synch-by-rare-event>
            </chunked-stream>
            <icy>
                <icy-name>Test Radio vd</icy-name>
                <icy-description>description radio fm</icy-description>
                <icy-genre>Rock</icy-genre>
                <icy-url>www.radiofm.com</icy-url>
                <icy-bitrate>128000</icy-bitrate>
            </icy>
            <relay>
                <url>SampleRelayURL</url>
                <on-demand>false</on-demand>
            </relay>
            <yellow-pages-information>
                <public>true</public>
            </yellow-pages-information>
        </mount>
        <default-mount>
            <local-mount>(.*)</local-mount>
            <chunked-stream>
                <hls>
                    <enable-hls>true</enable-hls>
                    <playlist-min-chunks>4</playlist-min-chunks>
                    <media-playlist>
                        <playlist-url>http://x1.test.com:8001regex0/playlist.m3u8</playlist-url>
                        <chunk-url>{protocol}x1.test.com:8001regex0/{chunk_name}</chunk-url>
                    </media-playlist>
                    <enable-discontinuity-tag>true</enable-discontinuity-tag>
                </hls>
                <enable-audiochunk-priv-tag>true</enable-audiochunk-priv-tag>
            </chunked-stream>
        </default-mount>
        <aliases>
            <alias source="/sampleMount_alias" dest="/sampleMount"/>
        </aliases>

        <mount-group name="mgvd1" type="list" max-listeners="2">/sampleMount, /sampleMount2</mount-group>
        <mount-group name="mgvd2" type="regex" max-listeners="33333">TheObserver.*</mount-group>
        <mount-group name="mgvd3" type="radio-id" max-listeners="33333">testRadioId</mount-group>

        <yellow-pages-information>
            <shoutcast-v2-key>xxxxxxxxxx</shoutcast-v2-key>
            <yp-bind-address>127.0.0.1</yp-bind-address>
            <directory>
                <protocol>icecast</protocol>
                <send-timeout-seconds>3</send-timeout-seconds>
                <delay-between-connects-minutes>60</delay-between-connects-minutes>
                <url>http://dir.xiph.org/cgi-bin/yp-cgi</url>
                <hostname>http://127.0.0.1:8000</hostname>
                <user-agent>yp</user-agent>
            </directory>
            <directory>
                <protocol>shoutcast-v1</protocol>
                <send-timeout-seconds>3</send-timeout-seconds>
                <delay-between-connects-minutes>60</delay-between-connects-minutes>
                <url>http://yp.shoutcast.com</url>
                <user-agent>yp</user-agent>
            </directory>
            <directory>
                <protocol>shoutcast-v2</protocol>
                <send-timeout-seconds>3</send-timeout-seconds>
                <delay-between-connects-minutes>60</delay-between-connects-minutes>
                <url>http://yp.shoutcast.com</url>
                <port>8000</port>
                <user-agent>yp</user-agent>
            </directory>
        </yellow-pages-information>
    </virtual-domain> -->
</config>