Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/negbie/go-baresip
Go baresip wrapper for automated SIP tests
https://github.com/negbie/go-baresip
baresip go rtp sip speech-quality test-automation voip
Last synced: 26 days ago
JSON representation
Go baresip wrapper for automated SIP tests
- Host: GitHub
- URL: https://github.com/negbie/go-baresip
- Owner: negbie
- License: bsd-3-clause
- Created: 2021-05-02T13:40:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-22T01:46:05.000Z (about 2 years ago)
- Last Synced: 2024-06-19T18:11:33.524Z (5 months ago)
- Topics: baresip, go, rtp, sip, speech-quality, test-automation, voip
- Language: C
- Homepage:
- Size: 34.3 MB
- Stars: 13
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-baresip
Is a tiny wrapper around [baresip](https://github.com/baresip/baresip)
## Basic Usage```Go
func main() {gb, err := gobaresip.New(gobaresip.SetConfigPath("."))
if err != nil {
log.Println(err)
return
}eChan := gb.GetEventChan()
rChan := gb.GetResponseChan()go func() {
for {
select {
case e, ok := <-eChan:
if !ok {
continue
}
log.Println(e)
case r, ok := <-rChan:
if !ok {
continue
}
log.Println(r)
}
}
}()go func() {
// Give baresip some time to init and register ua
time.Sleep(1 * time.Second)if err := gb.CmdDial("012345"); err != nil {
log.Println(err)
}
}()err = gb.Run()
if err != nil {
log.Println(err)
}
defer gb.Close()
}
```