Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 2.21 KB

README.md

File metadata and controls

65 lines (48 loc) · 2.21 KB

DIAGO

Go Report Card Coverage GitHub go.mod Go version

Short of dialog + GO.
Library for building communication (VOIP) solutions in GO!

Built on top of optimized SIPgo library!

For more information and documentation visit the website

Quick links:

If you find this project useful and you want to support/sponzor or need help in your projects, you can contact me on mail

Follow me on X/Twitter for regular updates

Contributions

Please open first issues instead PRs. Library is under development and could not have latest code pushed.

Usage

Checkout more on Getting started, but for quick view here is echotest (hello world) example.

ua, _ := sipgo.NewUA()
dg := diago.NewDiago(ua)

dg.Serve(ctx, func(inDialog *diago.DialogServerSession) {
	inDialog.Progress() // Progress -> 100 Trying
	inDialog.Answer(); // Answer

	// Make sure file below exists in work dir
	playfile, err := os.Open("demo-echotest.wav")
	if err != nil {
		fmt.Println("Failed to open file", err)
		return
	}
	defer playfile.Close()

	// Create playback and play file.
	pb, _ := inDialog.PlaybackCreate()
	if err := pb.Play(playfile, "audio/wav"); err != nil {
		fmt.Println("Playing failed", err)
	}
}

See more examples in this repo

Tracing SIP, RTP

While openning issue, consider having some traces enabled.

sip.SIPDebug = true // Enables SIP tracing
media.RTCPDebug = true // Enables RTCP tracing
media.RTPDebug = true // Enables RTP tracing. NOTE: It will dump every RTP Packet