17 lines
401 B
Plaintext
17 lines
401 B
Plaintext
lapis = require "lapis"
|
|
|
|
import respond_to from require "lapis.application"
|
|
|
|
require "models.user"
|
|
|
|
class Freeswitch extends lapis.Application
|
|
[freeswitch: "/freeswitch"]: respond_to {
|
|
POST: =>
|
|
uid = @params["user"] or @params["sip_auth_username"]
|
|
@user = Users\find extension: uid
|
|
if not @user
|
|
return status: 404, "no such user"
|
|
|
|
render: true, layout: false
|
|
}
|