Skip to content

Commit

Permalink
fix: comment register options until implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
emiago committed Nov 17, 2024
1 parent 8e10d11 commit 587fdfa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diago.go
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,8 @@ type RegisterOptions struct {
AllowHeaders []string

// Useragent default will be used on what is provided as NewUA()
UserAgent string
UserAgentHostname string
// UserAgent string
// UserAgentHostname string
}

// Register will create register transaction and keep registration ongoing until error is hit.
Expand Down
8 changes: 8 additions & 0 deletions register_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ func newRegisterTransaction(client *sipgo.Client, recipient sip.Uri, contact sip
req.AppendHeader(sip.NewHeader("Allow", strings.Join(allowHDRS, ", ")))
}

// if opts.Username == "" {
// opts.Username = opts.UserAgent
// }

if opts.Username == "" {
opts.Username = client.Name()
}

t := &RegisterTransaction{
Origin: req, // origin maybe updated after first register
opts: opts,
Expand Down

0 comments on commit 587fdfa

Please sign in to comment.