From 4b76b164b0c9fdaf6f96b25cd88b87abe5be462d Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Mon, 29 Mar 2021 10:58:40 +0800 Subject: [PATCH] Add User to recipient. --- examples/client/main.go | 6 +++++- examples/register/main.go | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/client/main.go b/examples/client/main.go index 8fc44dd..1db8811 100644 --- a/examples/client/main.go +++ b/examples/client/main.go @@ -104,7 +104,7 @@ func main() { stack, ) - recipient, err := parser.ParseSipUri("sip:127.0.0.1:5081;transport=wss") + recipient, err := parser.ParseSipUri("sip:100@127.0.0.1:5060;transport=udp") if err != nil { logger.Error(err) } @@ -121,6 +121,10 @@ func main() { logger.Error(err) } + recipient, err = parser.ParseSipUri("sip:400@127.0.0.1:5060;transport=udp") + if err != nil { + logger.Error(err) + } go ua.Invite(profile, called, recipient, &sdp) <-stop diff --git a/examples/register/main.go b/examples/register/main.go index 3fb71c7..7d3e21d 100644 --- a/examples/register/main.go +++ b/examples/register/main.go @@ -57,7 +57,7 @@ func main() { stack, ) - recipient, err := parser.ParseSipUri("sip:127.0.0.1;transport=udp") // this is the remote address + recipient, err := parser.ParseSipUri("sip:100@127.0.0.1;transport=udp") // this is the remote address if err != nil { logger.Error(err) }