panel/views/freeswitch.moon

19 lines
767 B
Plaintext
Raw Normal View History

2015-01-07 16:42:49 +00:00
import Widget from require "lapis.html"
class Freeswitch extends Widget
content: =>
document type: "freeswitch/xml", ->
section name: "directory", ->
domain name: "$${domain}", ->
params ->
param name: "dial-string", value: "{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"
groups ->
group name: "default", ->
users ->
user id: "#{@user.id}", ->
params ->
param name: "password", value: "#{@user.registrar_password}"
variables ->
variable name: "accountcode", value: "#{@user.id}"
variable name: "user_context", value: "default"