Skip to content

Commit

Permalink
Improve config
Browse files Browse the repository at this point in the history
  • Loading branch information
negbie committed May 30, 2021
1 parent 8954072 commit 3d72d0a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
11 changes: 4 additions & 7 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,19 @@ call_hold_other_calls no
# Audio
audio_path sounds
audio_player aubridge,nil
#audio_player alsa,default
#audio_source alsa,default
#audio_alert alsa,default
audio_source aufile,sounds/monorobo.wav
#audio_source ausine,440
#audio_alert ausine,440
ausrc_srate 48000
#auplay_srate 48000
auplay_srate 48000
#ausrc_channels 0
#auplay_channels 0
#audio_txmode poll # poll, thread
audio_txmode thread # poll, thread
audio_level no
ausrc_format s16 # s16, float, ..
auplay_format s16 # s16, float, ..
auenc_format s16 # s16, float, ..
audec_format s16 # s16, float, ..
audio_buffer 20-160 # ms
audio_buffer 20-400 # ms
# Video
#video_source v4l2,/dev/video0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ go 1.16

require (
github.com/coocood/freecache v1.1.1
github.com/negbie/go-baresip v0.0.5
github.com/negbie/go-baresip v0.0.7
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ github.com/coocood/freecache v1.1.1 h1:uukNF7QKCZEdZ9gAV7WQzvh0SbjwdMF6m3x3rxEka
github.com/coocood/freecache v1.1.1/go.mod h1:OKrEjkGVoxZhyWAJoeFi5BMLUJm2Tit0kpGkIr7NGYY=
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/negbie/go-baresip v0.0.5 h1:qLjG2e4M8gj154mgbLFpcs008JgvcRh+9xLYG+wYxQo=
github.com/negbie/go-baresip v0.0.5/go.mod h1:nTKUR3ZEyEHAhTVL/6PLm+mB7SLsVl/xZkwkAeL9LR4=
github.com/negbie/go-baresip v0.0.7 h1:KqJOmrsnQ27LA++FFLgGXVCRg4KI35NV0TxFj4i0mAM=
github.com/negbie/go-baresip v0.0.7/go.mod h1:nTKUR3ZEyEHAhTVL/6PLm+mB7SLsVl/xZkwkAeL9LR4=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
8 changes: 4 additions & 4 deletions webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import (
"time"
)

const warnEmo = " :warning: "
const fireEmo = " :fire: "
const warnEmo = ":warning: "
const fireEmo = ":fire: "

func page(webhookUrl string, level, msg string) error {
if level == "warning" {
msg = warnEmo + msg + warnEmo
msg = warnEmo + msg
} else if level == "error" {
msg = fireEmo + msg + fireEmo
msg = fireEmo + msg
}

text := "{\"text\":" + fmt.Sprintf("%q", msg) + ",\"username\":\"telefonist\"}"
Expand Down

0 comments on commit 3d72d0a

Please sign in to comment.