From 6886d6b63f65f0bc8590e9bb81fc8b720a19ea1d Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Wed, 8 Oct 2014 22:57:10 -0400 Subject: [PATCH] Allow arbitrary settings on SIP peers --- data_bags/asterisk_users/usera.json | 5 +++++ templates/default/sip.conf.erb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/data_bags/asterisk_users/usera.json b/data_bags/asterisk_users/usera.json index 53dc49a..27a57a2 100644 --- a/data_bags/asterisk_users/usera.json +++ b/data_bags/asterisk_users/usera.json @@ -6,4 +6,9 @@ "password": "usera", "username": "usera", "context": "adhearsion" + "additional_settings": { + "transport": "ws,wss", + "avpf": "yes", + "encryption": "yes" + } } diff --git a/templates/default/sip.conf.erb b/templates/default/sip.conf.erb index a44b7b4..7e8aece 100644 --- a/templates/default/sip.conf.erb +++ b/templates/default/sip.conf.erb @@ -109,4 +109,9 @@ type=friend callerid="<%= user['full_name'] %> <<%= user['username'] %>>" host=dynamic context=<%= user['context'] %> +<% if user['additional_settings'] + user['additional_settings'].each do |key, value| %> +<%= "#{key}=#{value}" %> + <% end + end %> <% end %>