<%# -*- coding: UTF-8 -*- %> v=<%= protocol_version %> o=<%= username %> <%= id %> <%= version %> <%= network_type %> <%= address_type %> <%= unicast_address %> s=<%= name %> <% if information %> i=<%= information %> <% end %> <% if uri %> u=<%= uri %> <% end %> <% if email_address %> e=<%= email_address %> <% end %> <% if phone_number %> p=<%= phone_number %> <% end %> <% if connection_network_type %> c=<%= connection_network_type %> <%= connection_address_type %> <%= connection_address %> <% end %> <% if bandwidth %> b=<%= bandwidth_type %>:<%= bandwidth %> <% end %> t=<%= start_time %> <%= stop_time %> <% if repeat_interval %> r=<%= repeat_interval %> <%= active_duration %> <%= offsets_from_start_time %> <% end %> <% unless time_zones.nil? || time_zones.empty? %> <% if time_zones.class == Array %> z=<% time_zones.each do |time_zone| %><%= time_zone[:adjustment_time] %> <%= time_zone[:offset] %><% end %> <% else %> z=<%= time_zones[:adjustment_time] %> <%= time_zones[:offset] %><% end %> <% end %> <% if encryption_method %> k=<%= encryption_method %><% if encryption_key %>:<%= encryption_key %><% end %> <% end %> <% unless attributes.empty? %> <% attributes.each do |a| %> a=<%= a[:attribute] %><% if a[:value] %>:<%= a[:value] %><% end %> <% end %> <% end %> <% media_sections.each do |media_section| %> m=<%= media_section[:media] %> <%= media_section[:port]%> <%= media_section[:protocol]%> <%= media_section[:format]%> <% if media_section[:attributes] %> <% media_section[:attributes].each do |attribute| %> a=<%= attribute[:attribute] %><% if attribute[:value] %>:<%= attribute[:value] %> <% end %><% end %><% end %><% end %>