Skip to content

Commit

Permalink
Remove unused files
Browse files Browse the repository at this point in the history
  • Loading branch information
negbie committed Jun 6, 2021
1 parent 2181e95 commit 8cd3f03
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 12 deletions.
10 changes: 1 addition & 9 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import (
//go:embed zip/sounds.tar.gz
var baresipSounds []byte

//go:embed zip/espeak-ng-data.tar.gz
var espeakNGData []byte

func createConfig(maxCalls uint, rtpNet, rtpPorts string, rtpTimeout uint, sipAddr string) {
if sipAddr != "" {
config = strings.Replace(
Expand Down Expand Up @@ -56,11 +53,6 @@ func createConfig(maxCalls uint, rtpNet, rtpPorts string, rtpTimeout uint, sipAd
panic(err)
}
}
if _, err := os.Stat("espeak-ng-data"); os.IsNotExist(err) {
if err := zip.Decompress(bytes.NewReader(espeakNGData), "."); err != nil {
panic(err)
}
}
if err := ioutil.WriteFile("config", []byte(config), 0644); err != nil {
panic(err)
}
Expand Down Expand Up @@ -93,7 +85,7 @@ call_hold_other_calls no
audio_path sounds
audio_player aubridge,nil
audio_source ausine,362
#audio_alert aufile,sounds/monorobo.wav
#audio_alert aufile,sounds/ring.wav
#ausrc_srate 48000
#auplay_srate 48000
#ausrc_channels 0
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.9
github.com/negbie/go-baresip v0.1.0
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ github.com/goccy/go-json v0.6.1 h1:O7xC9WR7B09imThbRIEMIWK4MVcxOsLzWtGe16cv5SU=
github.com/goccy/go-json v0.6.1/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
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.9 h1:eVBbqFa9Z0lIjxoNgPZpLdk/XAzgUPwjIImhD8rBvEY=
github.com/negbie/go-baresip v0.0.9/go.mod h1:rZ1+ZBEwbYxNOsm4KHZSnutgWMcA1qtpj9TBcSyOzPo=
github.com/negbie/go-baresip v0.1.0 h1:e0xuvvRmgZGqimZMIqGp5hZyp6LQeWfud9d2JW/wbs4=
github.com/negbie/go-baresip v0.1.0/go.mod h1:rZ1+ZBEwbYxNOsm4KHZSnutgWMcA1qtpj9TBcSyOzPo=
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=
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ package main

import (
"flag"
"fmt"
"log"
"os"

"github.com/coocood/freecache"
gobaresip "github.com/negbie/go-baresip"
)

const v = "v0.1.0"

func main() {
debug := flag.Bool("debug", false, "Set debug mode")
guiAddr := flag.String("gui_address", "0.0.0.0:8080", "Local GUI listen address")
Expand All @@ -18,10 +22,16 @@ func main() {
rtpPorts := flag.String("rtp_ports", "10000-11000", "RTP port range")
rtpTimeout := flag.Uint("rtp_timeout", 10, "Seconds after which a call with no incoming RTP packets will be terminated")
sipAddr := flag.String("sip_address", "", "SIP listen address like 0.0.0.0:5060")
version := flag.Bool("version", false, "Print version")
webhookDelay := flag.Uint("webhook_delay", 600, "Webhook resend delay of warnings and errors in seconds")
webhookURL := flag.String("webhook_url", "", "Send warnings and errors to this Mattermost or Slack webhook URL")
flag.Parse()

if *version {
fmt.Println(v)
os.Exit(0)
}

createConfig(*maxCalls, *rtpNet, *rtpPorts, *rtpTimeout, *sipAddr)

if *webhookDelay == 0 {
Expand Down
Binary file removed zip/espeak-ng-data.tar.gz
Binary file not shown.
Binary file modified zip/sounds.tar.gz
Binary file not shown.

0 comments on commit 8cd3f03

Please sign in to comment.